Maven multiple parent-child hierarchy -
i have project built in next manner: parent module named production, holds 2 modules named apps , libs, each of them holds various projects.
production apps common utils libs api dev
production pom
<groupid>com.prod</groupid> <packaging>pom</packaging> <modules> <module>libs</module> <module>apps</module> </modules>
apps pom
<parent> <groupid>com.prod</groupid> <artifactid>apps</artifactid> </parent> <modules> <module>common</module> <module>utild</module> </modules>
where packaging of production, apps , libs pom
. while packaging rest war
/jar
.
when try run mvn install
on production (or other module/project) non-resolvable parent pom: failure find
only when run mvn install -n
on production, apps , libs, can start working projects.
is there better way accomplish successful modules , projects alignment without running mvn install -n
? pom
definition or other solution?
without seeing poms, guessing missing <module>
elements naming children in production, apps , libs poms.
once have that, if else in order, can build production folder mvn install
, have reactor figure out right order build various modules are, subject inter-module dependencies. note <module>
elements relative paths child projects, not gav of project.
see http://books.sonatype.com/mvnex-book/reference/multimodule.html more information proper setup multi-module projects.
Comments
Post a Comment