Execute JAR of dependent artifact in Maven -
i'm working on multi-module maven project looks this:
parent-project (pom) +- module1 (executable-jar) +- module2 (executable-jar) +- module3 (jar) +- ... +- distribution (pom)
the distribution module lists dependencies on module1, module2, , module3. want distribution module test project , package up. i'm using module testing since distribution contains necessary configuration files. if start tests manually command line this:
$ # pre-integration-test: $ java -djava.rmi.server.codebase=file:module3.jar -jar module1.jar $ java -djava.rmi.codebase=file:module3.jar -jar module2.jar
i've looked @ exec-maven-plugin binding these calls pre-integration-test phase, plugin includes jars on classpath instead of directory holding jar itself. think benefit plugin can easliy execute jars produced project's dependencies. way, can in distribution pom:
... <plugin> <artifactid>some-magic-plugin</artifactid> <executions><execution> <phase>pre-integration-test</phase> <goals><goal>exec-dependency</goal></goals> <configuration> <artifactid>module1</artifactid> <vmarguments>...</vmarguments> <arguments>...</arguments> </configuration> </execution></executions> </plugin>
is there plugin this? ideally, able to:
- execute jar artifact given maven-coordinates
- put directories containing artifacts' jars on path (so can include jars command line arguments)
i've laso looked @ dependency:copy goal try , copy jars common path first, seems unnecessary since jars built part of project. (i'm not sure directory make best copy-destination).
Comments
Post a Comment