maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Harbulot <>
Subject Providing external jar file as part of a larger project
Date Tue, 05 May 2009 12:07:17 GMT

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,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message