Venu S
Venu S

Reputation: 3691

How to add patterns with rtMaven.deployer.deployArtifacts

I am using as below in Jenkins pipeline

def buildInfo = rtMaven.run pom: 'src/bwceapp.parent/pom.xml', goals: 'clean 
package initialize'

but this builds a lot of artifacts, I just want deploy with pattern i.e. only EAR,

rtMaven.deployer.deployArtifacts buildInfo is deploying EAR along with lot of other artifacts such as dependency jars etc..

I could not find in the documentation how to use pattern in my approach, Any help is greatly appreciated.

tried this, rtMaven.deployer.deployArtifacts buildInfo.addInclude("*.ear") , but did not work.

And this did not work as well

rtMaven.deployer.artifactDeploymentPatterns.addInclude("*.ear") buildInfo

Upvotes: 0

Views: 1792

Answers (1)

Venu S
Venu S

Reputation: 3691

I was able to get it to working as below.

rtMaven.deployer.artifactDeploymentPatterns.addInclude("*.ear")

def buildInfo = rtMaven.run pom: 'src/bwceapp/pom.xml', goals: 'clean package initialize'

rtMaven.deployer.deployArtifacts  buildInfo 

Upvotes: 2

Related Questions