简体   繁体   中英

maven multi module build with a shared utility project

Hi I am converting a ear project to Maven. Below is the structure

-projA-ear

-projA-static

-projA-web

-shared-util

The shared util is shared by multiple unrelated projects handled by our team. Currently my deployment assembly is handled by eclipse and the shared-util.jar is automatically built inside the projA-web.war's WEB-INF/lib directory

When I convert my setup to Maven project, I am reading that I need multi module aggregator setup, and need to define shared-util as a module, and then define the aggregator POM as the parent to my modules. The problem is I cannot define projA-mvn as parent in the shared-util project as the other projects would be using it too as a module(when they decide to move to maven). Can someone please suggest a solution?

1) Make shared-util as a separate standalone Maven project.

2) Put projA-ear, projA-web and projA-static under a separate parent Maven project.

3) Declare shared-util jar as a dependency in your projA-web pom.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM