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
490 stars 182 forks source link

Udpate versions (pom and property) in the same run #272

Closed lalmeras closed 3 years ago

lalmeras commented 3 years ago

If versions:set and versions:set-property are launched in separate maven commands, versions:set-property can fail as poms are in an inconsistent state.

Attached test case shows a practical use-case where a property is used in dependencyManagement declaration in a multi-module project.

If project is not installed, versions:set-property 1.0.1-SNAPSHOT -> 1.0.1 fails as maven tries to resolve dependency 1.0.1-SNAPSHOT in a project already versionned in 1.0.1.

This PR builds a unique maven command, adding conditionally versions:set and versions:set-property parameters.

aleksandr-m commented 3 years ago

@lalmeras Thanks!