你好我有一个多模块maven项目。每个项目都有自己的pom,父pom.xml的包装类型为pom,其他所有都是jar。
Parent Pom (packaging pom)
Module1 (packaging jar)
Module2 (packaging jar)
...
Module_n (packaging jar)
Extension1 (packaging jar)
extension2 (packaging jar)
...
现在我想配置项目,所有模块都放在像C:\ repo \ modules这样的本地存储库中 并将所有扩展名放到c:\ repo \ extension \ 和alle依赖jar应该放在c:\ repo \ lib \
我在父母pom中的第一次尝试如下:
<properties>
<Repository>file://${user.home}\repo</Repository>
</properties
<distributionManagement>
<repository>
<id>Deploy/id>
<url>${Repository}</url>
</repository>
</distributionManagement>
这里的第一个问题是,所有子项目都放在一个名为项目名称的自己的目录中。 2.没有将模块或扩展的依赖性部署到存储库 3.我还需要将一些设置文件从一些项目复制到存储库。我怎么能这样做谢谢你的帮助!
答案 0 :(得分:0)
你应该检查maven依赖插件。在主pom和每个模块的基础上配置它,特定于您希望复制依赖项的位置。参见:
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html
对于您的特定文件,请使用资源插件复制它们。参见:
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html