maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darryl L. Miles (JIRA)" <j...@codehaus.org>
Subject [jira] (MRELEASE-808) prepare-with-pom needs to be run twice when <finalName> contains ${project.version}
Date Thu, 06 Dec 2012 16:14:13 GMT

    [ https://jira.codehaus.org/browse/MRELEASE-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315155#comment-315155
] 

Darryl L. Miles commented on MRELEASE-808:
------------------------------------------

I can confirm that testing with the unit test (this PASSES) but without any version of my
patch fails to process a real release run with the following command line:

mvn -X -DignoreSnapshots=true release:prepare-with-pom

With my patch it works as expected with 2 new commits generated with correct information.


The reason for using -DignoreSnapshots=true is because I am using the version of the plugin
and its dependency from my local M2 repository with the following configuration:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-release-plugin</artifactId>
	<version>2.4-SNAPSHOT</version>
	<dependencies>
		<dependency>
			<groupId>org.apache.maven.scm</groupId>
			<artifactId>maven-scm-providers-standard</artifactId>
			<version>1.9-SNAPSHOT</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.scm</groupId>
			<artifactId>maven-scm-provider-gitexe</artifactId>
			<version>1.9-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.scm</groupId>
			<artifactId>maven-scm-api</artifactId>
			<version>1.9-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.release</groupId>
			<artifactId>maven-release-manager</artifactId>
			<version>2.4-SNAPSHOT</version>
			</dependency>
		</dependencies>
</plugin>


                
> prepare-with-pom needs to be run twice when <finalName> contains ${project.version}
> -----------------------------------------------------------------------------------
>
>                 Key: MRELEASE-808
>                 URL: https://jira.codehaus.org/browse/MRELEASE-808
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>            Reporter: Darryl L. Miles
>         Attachments: 0001-MRELEASE-808-Allow-fixup-of-SNAPSHOT-version-in-fina.patch,
0001-MRELEASE-808-Allow-fixup-of-SNAPSHOT-version-in-fina.patch
>
>
> Setup your project with a <project><build><finalName> element setup
like:
> <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
> Setup ${project.version} to a SNAPSHOT like:
> <version>0.0.1-SNAPSHOT</version>
> The key thing here is the use of ${project.version} in the <finalName> and ew start
with a SNAPSHOT version trying to perform a release.
> Now we run: mvn release:prepare-with-pom
> It will bail out with error now and a message ... "Cannot reliably adjust the finalName
of project:" and I believe this is due to the -SNAPSHOT being visible and the code that throw
the exception is looking at the original, unedited version of the pom.xml.
> I think after editing the pom.xml the in-memory model should be refreshed and all ${variable}
be re-interpreted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message