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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to