How to execute multiple goals in one maven command, but with different arguments for each goal

后端 未结 2 1992
你的背包
你的背包 2021-01-19 20:53

I am trying to run 2 maven goals in one maven command like:

mvn release:prepare release:perform -Darguments=\'-Dmaven.test.skip=true\'

but,

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-19 21:00

    I have spent hours on this.

    My working release command is:

    -Darguments='-DskipTests=true' -DskipTests release:prepare release:perform
    

    The problem actually was in my release plugin:

    
                org.apache.maven.plugins
                maven-release-plugin
                
                    ${release.arguments}
    

    The "arguments" parameter of the release plugin was overriding the -Darguments that I pass to the release:prepare (in order to be passed to release:perform by release:prepare).

提交回复
热议问题