Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass command line parameters like -X and -B to rtMavenRun in Artifactory Maven Plugin?

In my declarative Jenkinsfile, I am invoking maven with this block sourced from https://www.jfrog.com/confluence/display/RTF/Working+With+Pipeline+Jobs+in+Jenkins

           rtMavenRun (
                tool: 'maven-3.6.0',
                pom: 'pom.xml',
                goals: 'clean test',
                resolverId: 'maven-resolver-id',
                deployerId: 'maven-deployer-id',
                buildNumber: '99',
                buildName: 'my-build'
            )

When it runs, the output is flooded with lots of 'Progress' entries. The way to turn that off is the use -B on the mvn command line.

How to do so using rtMavenRun() ?

I tried using the 'options:' parameter found https://jenkins.io/doc/pipeline/steps/artifactory/#rtmavenrun-run-artifactory-maven but that only defines JVM parameters rather than maven parameters.

like image 935
Stevko Avatar asked Jan 21 '26 23:01

Stevko


1 Answers

Change the 'goals' parameter to have value '-B clean test'.

like image 200
user944849 Avatar answered Jan 25 '26 21:01

user944849



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!