Do not use install-file and package like that.

Just run

mvn install

that will package the jar and install the jar and pom into the local repo. That 
way the dependency info in the pom will not get lost.

manfred

Philipp Kraus wrote on 2016-05-25 13:14:

> Hello,
> 
> I’m working on my first Maven framework, I would like to test the framework
> in another project,
> so I build a jar file with „mvn package", and then I install the jar into my
> local repository with „mvn install:install-file -Dfile=myjar.jar“.
> 
> I can use the package in another project with a dependency entry, but my
> framework has got different dependencies e.g. to AntLR, Guava
> or Apache Commons, but in my project the dependencies are not found.
> 
> The pom of the framework is defined with:
> 
> <groupId>mygroup</groupId>
> <artifactId>framework</artifactId>
> <version>0.1-SNAPSHOT</version>
> <packaging>jar</packaging>
> 
> and the project has got
> 
> <dependency>
>    <groupId>mygroup</groupId>
>    <artifactId>framework</artifactId>
>    <version>0.1-SNAPSHOT</version>
>    <scope>compile</scope>
> </dependency>
> 
> IMHO I create a incomplete pom.xml on my framework, but I don’t know how I
> can create it with the correct
> way, so I can deploy the framework to my local repository only for
> testing-case. Two other test projects should
> use this deployed framework.
> 
> Can you help me to create a correct pom.xml?
> 
> Thanks for help
> 
> Phil
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to