简体   繁体   中英

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. But then I introduced Maven Flatten plugin to resolve the pom.xml files for parent and submodules mvn flatten:flatten . 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. 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. Did someone had to deal with this already?

In rtMavenRun stage, you can set the parent pom name:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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