Maven release plugin - resolving RELEASE version of parent when tagging -


i release projects using maven release plugin. version of parent-pom set 'release'.

like this:

<parent>     <groupid>my.group.id</groupid>     <artifactid>my-parent-pom</artifactid>     <version>release</version> </parent> <artifactid>my application</artifactid> <version>1.1.1-snapshot</version> 

are there ways release-plugin tag project in git actual parent-pom version, while still keeping release in master/branch?

i pom.xml in tag (only) this:

<parent>     <groupid>my.group.id</groupid>     <artifactid>my-parent-pom</artifactid>     <version>2.4.2</version> </parent> <artifactid>my application</artifactid> <version>1.1.1</version> 

in cases need use latest release of parent. e.g. make sure ci server build , test children upon new parent release. however, if later need go previous tag have manually figure out version of parent pom used @ time first tagged.

the way can think of doing use 'versions plugin' resolve parent before releasing, make sure revert 'release' afterwards. me sounds messy option developers going forget time, not mention hassle , git-pushing each , every release.

if version-tag contains string "release" when pom loaded memory maven; is, that's string $project.version resolves to, that's version available plugins , not able change it.

i assume you're using ci actual release. if you're using jenkins , m2 release plugin, have environment variables @ disposition might you: $mvn_release_versionand $is_m2releasebuild. instance use input maven scm plugin , manual tag.

that said, if <version>-tag doesn't contain version of pom, you're pretty on own. should consider conforming standard way of using maven, , find other solution whatever problem caused put string there in first place.

a final note on subject of releasing in maven , git: atlassian has develop release plugin more versatile original maven release plugin, link. tailored "git flow" branching model.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -