简体   繁体   English

Jenkins Artifactory插件+ Maven Flatten插件+ rtMavenDeployer。 有没有办法部署扁平化的pom文件?

[英]Jenkins Artifactory Plugin + Maven Flatten plugin + rtMavenDeployer. Is there a way to deploy flatten pom files?

Using Artifactory plugin for Jenkins pipeline is a bliss, just follow the docs and you are good. 对于Jenkins管道使用Artifactory插件是一件乐事,只需按照文档操作即可,一切都很好。 But then I introduced Maven Flatten plugin to resolve the pom.xml files for parent and submodules mvn flatten:flatten . 但是后来我引入了Maven Flatten插件来解决mvn flatten:flatten父模块和子模块的pom.xml文件。 The only thing I didn't got to work was the Maven deployer step to pickup the flatten pom files (.flatten-pom.xml) instead of original ones. 我唯一不需要工作的是Maven部署程序步骤,以提取平坦的pom文件(.flatten-pom.xml)而不是原始文件。 I wonder if there is a way to specify that on deployer. 我想知道是否有一种方法可以在部署程序上指定它。 A workaround may be using mnv deploy if repository is set in the pom file, but that overlaps Artifactory plugin, which is very convenient. 如果在pom文件中设置了存储库,则可能使用mnv deploy解决方法,但这与Artifactory插件重叠,这非常方便。 Did someone had to deal with this already? 有人已经处理了吗?

In rtMavenRun stage, you can set the parent pom name: rtMavenRun阶段,您可以设置父pom名称:

rtMavenRun (
    ...
    pom: 'flatten-pom.xml',
    ...
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM