[ 
https://issues.apache.org/jira/browse/MRELEASE-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MRELEASE-840.
-----------------------------------
    Resolution: Auto Closed

This issue has been auto closed because it has been inactive for a long period 
of time. If you think this issue still applies, retest your problem with the 
most recent version of Maven and the affected component, reopen and post your 
results.

> Merge SNAPSHOT Parents to avoid unnecessary aborts
> --------------------------------------------------
>
>                 Key: MRELEASE-840
>                 URL: https://issues.apache.org/jira/browse/MRELEASE-840
>             Project: Maven Release Plugin
>          Issue Type: Improvement
>            Reporter: Bernhard Mähr
>            Priority: Major
>
> Handling of the version numbers in bigger projects with Maven is still a big 
> pain.
> I have a suggestion to improve the situation dramatically: The release plugin 
> should be able to merge SNAPSHOT-parent POMs into the POM just released.
> I have implemented that with a batch job. The algorithm is:
> call mvn help:effective-pom -B -Doutput=./pom.xml.effective -N
> ren pom.xml pom.xml.original
> ren pom.xml.effective pom.xml
> sed -n -r -i 
> "1h;1!H;${;g;s/<dependencyManagement>.*<\/dependencyManagement>//g;p;}" 
> pom.xml
> sed -n -r -i "1h;1!H;${;g;s/<parent>.*<\/parent>//g;p;}" pom.xml
> sed -n -r -i "1h;1!H;${;g;s/<extensions>.*<\/extensions>//g;p;}" pom.xml
> call mvn release:prepare -B 
> -DcheckModificationExcludeList=pom.xml,pom.xml.original
> grep "project.dev." release.properties > setversion.bat
> sed -n -r -i 
> "1h;1!H;${;g;s/project\.dev\.[A-Za-z\.\-]+\\:[A-Za-z\.\-]+=([0-9\.]+\-SNAPSHOT)/call
>  mvn versions:set \-DgenerateBackupPoms=false \-DnewVersion=\1/g;p;}" 
> setversion.bat
> call mvn release:perform -B
> del pom.xml
> ren pom.xml.original pom.xml 
> call setversion.bat
> del setversion.bat
> svn commit -m "Restore development version by mvnrelease" pom.xml
> Basically the pom ist replaced by the effective pom, SNAPSHOT-dependecies not 
> used by release are removed to avoid abort, release is performd and the old 
> pom is restored with the new version number



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to