You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bruno Harbulot <Br...@manchester.ac.uk> on 2009/05/05 14:07:17 UTC
Providing external jar file as part of a larger project
Hello,
Is there a way to provide a jar file that is not available in a Maven
repository as part of a multi-module project?
For example, if in a multi-module project
(groupId=example,artifactId=exampleroot), a sub-module
(groupId=example,artifactId=mainapp) depends on a jar that's not
available in any repository -- the dependency being expressed as
(groupId=example,artifactId=extlib), it's possible to resolve this
dependency using "mvn install:install-file -DgroupId=example
-DartifactId=extlib ..." beforehand.
However, I wonder if there would be a way to provide this jar within a
sub-module, without having to use "mvn install:install-file" manually,
so that "mvn clean package" works from the top of the multi-module
project directly.
The structure would be like this:
|-- pom.xml (groupId=example,artifactId=exampleroot)
|-- mainapp
|-- pom.xml (groupId=example,artifactId=mainapp)
|-- src
...
|-- extlib
|-- pom.xml (groupId=example,artifactId=extlib)
|-- lib
|-- extlib.jar
One way to solve this could be to unjar extlib.jar into
extlib/target/classes during its 'compile' phase, but this doesn't seem
very clean. Any better solution?
Best wishes,
Bruno.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org