You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephane Passignat <pa...@hotmail.com> on 2022/06/24 19:19:18 UTC

plugin to update version to patch version

Hello,

I actually create a branch (using scm plugin) from a tag (created by 
release plugin) to patch a release version of a library. After the 
branching I need to change the pom version from minor (ex: 1.0.2) to 
patch (ex: 1.0.2.0-SNAPSHOT).

Are there any plugin for that ?

I looked at version plugin but I don't see...


thanks for your help

Stephane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: plugin to update version to patch version

Posted by Stephane Passignat <pa...@hotmail.com>.
thank you Hervé. To set the version I think there is also versions:set 
but I haven't found yet how to read to update the version to the next 
minor or patch, without providing any parameter.


I'm just imagining two options illustrate my mind: setPatchVersion and 
setVersionSuffix

mvn release:update-version -DsetPatchVersion=1 -DsetVersionSuffix=SNAPSHOT

setPatchVersion: would add a digit to the version number

setVersionSuffix: would add SNAPSHOT to the version


So far I think I need to do that on the command line. That's not very 
portable...

something like this: mvn versions:set -DnewVersion=$(mvn help:evaluate 
-Dexpression=project.version -q -DforceStdout).0-SNAPSHOT


Le 2022-06-25 à 08:26, herve.boutemy@free.fr a écrit :
> release plugin has an update-versions goal https://maven.apache.org/maven-release/maven-release-plugin/update-versions-mojo.html
>
> ----- Mail original -----
> De: "Stephane Passignat" <pa...@hotmail.com>
> À: "Maven Users List" <us...@maven.apache.org>
> Envoyé: Vendredi 24 Juin 2022 21:19:18
> Objet: plugin to update version to patch version
>
> Hello,
>
> I actually create a branch (using scm plugin) from a tag (created by
> release plugin) to patch a release version of a library. After the
> branching I need to change the pom version from minor (ex: 1.0.2) to
> patch (ex: 1.0.2.0-SNAPSHOT).
>
> Are there any plugin for that ?
>
> I looked at version plugin but I don't see...
>
>
> thanks for your help
>
> Stephane
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: plugin to update version to patch version

Posted by he...@free.fr.
release plugin has an update-versions goal https://maven.apache.org/maven-release/maven-release-plugin/update-versions-mojo.html

----- Mail original -----
De: "Stephane Passignat" <pa...@hotmail.com>
À: "Maven Users List" <us...@maven.apache.org>
Envoyé: Vendredi 24 Juin 2022 21:19:18
Objet: plugin to update version to patch version

Hello,

I actually create a branch (using scm plugin) from a tag (created by 
release plugin) to patch a release version of a library. After the 
branching I need to change the pom version from minor (ex: 1.0.2) to 
patch (ex: 1.0.2.0-SNAPSHOT).

Are there any plugin for that ?

I looked at version plugin but I don't see...


thanks for your help

Stephane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org