目标“复制依赖关系"是指目标“复制依赖性".不复制父pom [英] The goal "copy-dependencies" does not copy the parent pom

查看:144
本文介绍了目标“复制依赖关系"是指目标“复制依赖性".不复制父pom的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目结构如下:

* Foo
  - API
  - Core
  - OSGi

所有子项目都将 Foo 定义为其父项(父项具有dependencyManagement).

All child projects define Foo as their parent (parent has dependencyManagement).

另一个团队将使用我的项目.他们只需要我的API层,就不能访问我的Maven存储库.

Another team is going to use my project. They only need my API layer and they cannot access my maven repository.

我需要为他们提供API的所有依赖关系,因此我执行了以下maven命令:

I need to give them all the dependencies of my API so I executed the following maven command:

mvn dependency:copy-dependencies -DincludeScope=compile -Dmdep.copyPom
-Dmdep.useRepositoryLayout

除了父pom之外,该依赖项插件可以复制所有内容.如何将父pom.xml添加到输出文件夹?

The dependency-plugin copies everything just fine except for the parent pom. How can I add the parent pom.xml to the output folder?

推荐答案

请参阅此处的addParentPoms选项

see the addParentPoms option here http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html

这篇关于目标“复制依赖关系"是指目标“复制依赖性".不复制父pom的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆