如何指示 Maven 3.0.3 仅将公共 jar 文件提取到新生成的工件中?
我正在使用 Maven 3.0.3 并尝试实现以下目标:
project-a(这是我的父 POM)--> 程序集 pom--> dev/test/qa/prod POM,它生成 zip 文件(每个文件一个)环境)。我确实有很多“通用”属性文件和 xml 文件,我想将它们放入通用 zip 文件中,并“嵌入”或“提取”到 dev/test/qa/prod zip 文件中。我试图避免将这些通用组件放入程序集 pom 中,然后使用相对路径(即“../common”之类的东西)访问它们,而是创建一个依赖于 dev/test/qa/prod POM 的 POM ...我如何指示这些 POM 只提取一个 zip 或 jar 文件,即 project-common.jar!
I'm using Maven 3.0.3 and trying to achieve the following:
project-a (this is my parent POM)-->assembly pom-->dev/test/qa/prod POMs which generating zip files (one per environment). I do have quite a few "common" property files and xml files that I'd like to put into common zip file and "embed" or "extract" into dev/test/qa/prod zip files. I was trying to avoid putting these common components into assembly pom and then reach to them by using relative path (i.e. something like "../common") and instead create a POM that would be dependent from dev/test/qa/prod POMs... How can I instruct those POMs to extract ONLY one zip or jar file that is project-common.jar!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能 maven-dependency-plugin 可以帮助提取您的工件:http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html
Possible the maven-dependency-plugin can help to extract your artifact: http://maven.apache.org/plugins/maven-dependency-plugin/examples/unpacking-artifacts.html