I need a best-practice solution for the following problem. I have a maven multi-module project with 3 subprojects:
module-*-that-uses-client is a bunch of static xml config files with a client-module.jar which is packaged as a .zip file. So, the packaged structure of a module-*-that-uses-client would look like:
I wonder how I can implement following build strategies. If I build client-module, then:
If I build any of module-*-that-uses-client, then:
Appreciate any help on this problem.
One solution would be the usage of --also-make
and --also-make-dependents
.
--also-make
builds all dependencies of the specified module. Example: mvn --projects module-1-that-uses-client --also-make clean install
builds client-module and module-1-that-uses-client in this order.
--also-make-dependents
builds the specified module and all other modules with a dependency to the specified module. Example: mvn --projects client-module --also-make-dependents clean install
builds first client-module and then both module-*-that-uses-client.
See also the Guide to Working with Multiple Modules .
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.