可能重复:
Maven multi-module project - copying all “package” JARS from submodules into parent/target/
我有一个pom结构:
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
我们能实现这个吗?如果可以的话,我们怎么做?
答案 0 :(得分:1)
请看这里:https://github.com/khmarbaise/maven-copy-example。我改变的唯一一件事是不使用像我这样的文件夹我在maven风格中使用target / dist。