Normally you need to use the -Darguments="-Dexec.skip=true" for the release plugin to pass on options to the child invocations.
mvn -DdryRun -Dexec.skip=true -Darguments="..." release:prepare Gruss Bernd -- http://bernd.eckenfels.net ________________________________ Von: Dani <[email protected]> Gesendet: Mittwoch, November 20, 2019 11:30 AM An: [email protected] Betreff: -D args not propagating from release plugin invocation Greetings. I'm having trouble running a sentence like this: "$> mvn release:prepare -DdryRun -Dexec.skip=true" With this configuration: " ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.5.3</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <phase>test</phase> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>com.globera.Main</mainClass> <arguments> <argument>environmentProperties</argument> </arguments> <skip>${exec.skip}</skip> </configuration> </plugin> </plugins> </build> ... " While defining the property inside the POM as: " <properties> <exec.skip>true</exec.skip> </properties> " Runs smoothly with "$> mvn release:prepare -DdryRun" That configuration works fine too with other phases or goals when passed as command line argument, so the guess, by this two reasons is the plugin is flawed. Actual output to ' mvn release:prepare -DdryRun -Dexec.skip=true' is: ... [INFO] --- exec-maven-plugin:1.2.1:java (default) @ some-execution --- 11:13:59,288 INFO c.g.Main Parameter passed to main class = environmentProperties (which is the hard coded literal in config of exec plugin) Which should not been executing, due to -Dexec.skip=true If you have any hint on how to circumvent this, it will be much appreciated. Best regards. -- Saludos *********************************************** Daniel G. Gamonal Sistemas de Informacion ***********************************************
