maven dependencies and jetty - avoiding deploy
        Posted  
        
            by James Cooper
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by James Cooper
        
        
        
        Published on 2010-04-08T21:07:39Z
        Indexed on 
            2010/04/08
            21:13 UTC
        
        
        Read the original article
        Hit count: 513
        
Hi,
I have a project with 3 artifacts:
common - entities, business logic. no UI code webapp-a - a public web app webapp-b - an admin web app
webapp-a and webapp-b depend on common. common is configured to deploy to a local maven repo.
so far so good.
I have IntelliJ configured so that each artifact is a separate module. Module dependencies are configured properly. I can add a new method to a class in common and immediately use that method in a class in a webapp.
However, when I run mvn jetty:run it uses the currently deployed common snapshot in my repository.  It does not use my local classes.  If I add a method to a class in common, it compiles fine, but blows up at runtime.
So is it possible to either:
a) Convince jetty:run to use my local common build output
or
b) Deploy my common output to my local ~/.m2/repo while I'm testing locally before I want to commit/deploy
or
c) some other solution?
thank you!
-- James
© Stack Overflow or respective owner