Copy artifacts of each module in multi-module project to specific folder [duplicate]
Possible Duplicate:
Maven multi-module project - copying all “package” JARS from submodules into parent/target/
I have an pom开发者_StackOverflow社区 structure:
project1
|
|______ pom.xml
|______ module 1
| |_____ pom.xml
| |_____ dist
| |_____ bin
| |_____ lib
|______ module 2
| |_____ pom.xml
| |_____ dist
| |_____ bin
| |_____ lib
|______ dist
| |____ bin
| |____ lib
Requirements:
+ When build each module, bundle file will be copied to its' dist/bin and dependencies copied to its' dist/lib
+ When build project1, bundle file of each module will be copied to project1/dist/bin and dependencies of all modules copied to project/dist/lib
Can we achieve this??? If it can, how we do it???
Just take a look here: https://github.com/khmarbaise/maven-copy-example . The only thing i changed is not to use a a folder like dist i use target/dist in the maven style.
精彩评论