aleksandr-m / gitflow-maven-plugin

The Git-Flow Maven Plugin supports various Git workflows, including GitFlow and GitHub Flow. This plugin runs Git and Maven commands from the command line.
https://aleksandr-m.github.io/gitflow-maven-plugin/
Apache License 2.0
487 stars 180 forks source link

[Question] release:perform #392

Closed DempseyRoller closed 1 year ago

DempseyRoller commented 1 year ago

Hi! I'm looking in to this project and it seems quite near. However a relatively new Maven user I'm wondering if there's a way to release a version with this similar to release:perform of the maven release plugin. And of course if it is, how?

aleksandr-m commented 1 year ago

Take a look at the provided goals.

For releasing there is gitflow:release goal and gitflow:release-start and gitflow:release-finish if you want to use separate branch for releases.

DempseyRoller commented 1 year ago

Thanks for the quick answer. I worded my question poorly. I wanted to do a deploy with my release. And it seems the parameter -DpostReleaseGoals can do that. Am I correct that there's no way to put those same arguments inside the pom file?

mzatko commented 1 year ago

@DempseyRoller , you can do it directly in pom.xml

    <pluginManagement>
        <plugins>
            ...
            <plugin>
                <groupId>com.amashchenko.maven.plugin</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <version>${gitflow-maven-plugin.version}</version>
                <configuration>
                    ...
                    <postHotfixGoals>deploy</postHotfixGoals>
                    <postReleaseGoals>deploy</postReleaseGoals>
                    ...
                </configuration>
            </plugin>
            ...
        </plugins>
    </pluginManagement>
DempseyRoller commented 1 year ago

@mzatko Thanks! I though I tried it already but I had written the parameter wrong. Enbolded by your comment I tried it again with the right parameter name and lo and behold! It works!

Thanks again!