How to configure a subproject dependency in Maven without deploying jars?

Posted by MikeHoss on Stack Overflow See other posts from Stack Overflow or by MikeHoss
Published on 2010-04-06T13:42:19Z Indexed on 2010/04/06 14:13 UTC
Read the original article Hit count: 262

Filed under:
|

I googled this and it seems that no one has an answer, yet it seems like such an elementary thing that it should be possible.

I have the following project structure:

parent
   ---sub-project1
   ---sub-project2

sub-project2 needs to have sub-project1 as a dependency.

So I have this in sub-project2's pom:

 <dependencies>
    <dependency>
         <artifactId>sub-project1</artifactId>
        <groupId>mygroup</groupId>
        <version>1.0-SNAPSHOT</version>
    </dependency>

....

When I do this, Maven tries to dowload the sub-project1.jar file, which does not exist because it's not ready for the repo yet.

I tried to put a <scope>import</scope> in the dependency, but that didn't work either -- same result.

So what do I have to do to get Maven to look at sub-project1 when building sub-project2?

© Stack Overflow or respective owner

Related posts about maven

Related posts about subproject