Closed danprince1 closed 5 years ago
+1
+1 particularly as it appears that skipTests does not include failsafe integration tests, which I would prefer to skip when releasing some modules.
If you work with Maven 3.3 / Java 8 you can try this fork: https://github.com/SourcePond/multi-module-release-maven-plugin. It supports parameter passing to the release build + supports a config item
A bit late to the party, but for the ones coming across this issues. As a workaround, you can do this:
<plugin>
<groupId>com.github.danielflower.mavenplugins</groupId>
<artifactId>multi-module-maven-release-plugin</artifactId>
<version>2.1.4</version>
<configuration>
<releaseGoals>
<releaseGoal>deploy ${arguments}</releaseGoal>
</releaseGoals>
</configuration>
</plugin>
mvn releaser:release -Darguments="-Dcredentials=something"
Well, I have in my project many profiles that are activated by a combination of files and system properties being passed in command-line, including those that MUST be activate at release as the sign, javadoc and others. Unfortunately none of then are being activate while using this plugin.
This issue is opened since 2015, is that improvement so hard to implement?
I'm not sure if it's hard to implement or not. If someone wants to help, just adding a failing test would be a good start. There is an established test pattern in the repo. Just add the simplest possible sample project and call the build from a test and assert on build result or log.
As of 3.0.1
you can specify arguments: http://danielflower.github.io/multi-module-maven-release-plugin/release-mojo.html#arguments
Fixed as part of this commit which also added tests to prove that MAVEN_OPTS
and other env vars get passed through (so I suppose someone fixed this during the 4 years that this ticket has been open).
If arguments, maven options, or env vars aren't working for you on version 3.0.1 or later please open a new ticket with details.
Thanks for this plugin.
In the README there is this: "Figure out if things like MVN_OPTIONS and other JVM options need to be passed during release". Then answer from my perspective is yes!
Our unit tests require credentials be passed as system properties, which we normally do via MAVEN_OPTS in our Jenkins builds. I can't find a way to do this when the tests are started as part of a release via this plugin, so I had to disable tests when doing a release. And it would be nice to do that by doing -DskipTests=true, but that doesn't work either, so I did:
This works OK but it would be nice to pass these options in the normal way, on the command line or MAVEN_OPTS. Thanks!