Question

I am trying to do a non-interactive maven release:

mvn clean install \
  -PmyAssembly,attach-installer \
  -DcustomerFlag=simple \
  release:clean \
  release:prepare \
  release:perform \
  -DreleaseVersion=1.0.1 \
  -DdevelopmentVersion=1.0.2-SNAPSHOT \
  -Dtag=my-project-1.0.1

But the property -DcustomerFlag=simple is not set when running perform only when running prepare.

Do I need to specify all command line arguments and profile twice, once for prepare and once for perform ?

Alternatively I guess I can just skip the perform step and do a regular build/deploy afterwards with the parameters I need from the generated tag.

Was it helpful?

Solution

None of the -D args from the commandline are passed by the maven-release-plugin to the inner Maven calls. You should use -Darguments="-DcustomerFlag=simple" to get the expected result, see arguments

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top