How do I make the compile of one maven 3 project depend on the install of another? -


i have directory pom.xml , several subdirectories own pom.xml files

one subdirectory local called thirdparty. contains several jar files , installs them local maven repo when mvn install executed. these needed mvn compile phase of other artifacts. root pom.xml executes same step on each child pom.xml.

i'd modify root pom.xml mvn compile install on third party folder before executing other folders. tried in maven-compiler-plugin:

<executions>     <execution>         <id>thirdparty</id>         <phase>install</phase>     </execution> </executions> 

i see nothing in documentation specifying phase in dependency element.

to make sure have straight, sounds have aggregator pom, agg, , submodules, , b, nothing third-party jars have installed in local repo before b compile. if that's true, 2 possibilities spring mind:

1) away , instead install third party jars appropriate standalone repo, local nexus server, , add repo pom. "maven" way of doing it.

2) add dependency on b's <dependencies>. in a, configure install plugin execution per jar needs installed, , bind these executions compile phase. when run compile on agg, first run compile on a, install jars, followed compile on b. note have side effect of producing a.jar, dependency of b, because maven assumes every module produces 1 artifact of type. might forced add @ least 1 class or resource a.jar can built. not sure one. alternately, experiment setting a's packaging "pom".


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -