Closed jeffwji closed 1 year ago
AFAIK Maven doesn't support this. Ideas of workarounds are welcome.
i think it should work "classic maven way"
<plugin>
<artifactId>gitflow-maven-plugin</artifactId>
...
<configuration>
<!-- common configuration -->
</configuration>
<executions>
<execution>
<goals>
<goal>release-start</goal>
</goals>
<configuration>
<!-- per-goal(s) configuration -->
<pushRemote>true</pushRemote>
</configuration>
</execution>
<execution>
<goals>
<goal>release-finish</goal>
</goals>
<configuration>
<!-- per-goal(s) configuration -->
<pushRemote>false</pushRemote>
</configuration>
</execution>
</executions>
</plugin>
@mzatko Each execution must have unique id.
One possible workaround is to use execution id in command line - see Maven 3.3.1 Release Notes.
I think you can define some profiles, for example release-start, release-finish and configure in each profile the specic configuration (pushRemote,....).
Then execute the gitflow goal with the related profile
mvn giflow:release-start -Prelease-start
@jeffwji Have you resolved this?
@jeffwji Have you resolved this?
Yes, it has been resolved!
@jeffwji Good. Can you post which solution did you use, to help future visitors.
For example, if I prefer push to remote when perform
release-start
. but not pushing whenrelease-finish
, I have to set-DpushRemote=true
to the first command, and set-DpushRemote=false
the the second. Which is very annoy. However there is a<pushRemote>
option under<configuration>
but it looks affect globally. I'm hoping it can be set separately and works to every command line parameter. For example: