Maven 2.x Release Plugin

Release plugin should preserve pom properties and ${...} variables

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0-beta-9
  • Fix Version/s: None
  • Component/s: prepare
  • Labels:
    None
  • Number of attachments :
    0

Description

When I run release:prepare on a parent pom with properties and ${...} variables they get resolved in the release plugin created pom. It would be nice if these ${...} variables could remain unchanged. This is usually a problem in the case of parent poms that expose properties for their children to use to override certain values. The release plugin's removing of these variables makes it so that child poms dependent upon these properties no longer work.

Issue Links

Activity

Hide
Olivier Lamy added a comment -

which version of mvn are you using ?
Do you have a test case (pom.xml) ?

Show
Olivier Lamy added a comment - which version of mvn are you using ? Do you have a test case (pom.xml) ?
Hide
Mike Youngstrom added a comment -

Oops my bad. I guess it only resolves the scm elements. Which is still a problem for my case but not as severe. Here is an example pom. I'm using Maven 2.2.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<jiraId>1234</jiraId>
<moduleId>test</moduleId>
</properties>

<issueManagement>
<system>JIRA</system>
<url>http://jira&amp;component=${jiraId}</url>
</issueManagement>

<scm>
<connection>scm:svn:https://someFakeSCM/${moduleId}</connection>
<developerConnection>scm:svn:https://someFakeSCM/${moduleId}/trunk/</developerConnection>
<url>https://someFakeSCM/${moduleId}</url>
</scm>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-9</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

Show
Mike Youngstrom added a comment - Oops my bad. I guess it only resolves the scm elements. Which is still a problem for my case but not as severe. Here is an example pom. I'm using Maven 2.2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>test</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> <jiraId>1234</jiraId> <moduleId>test</moduleId> </properties> <issueManagement> <system>JIRA</system> <url>http://jira&amp;component=${jiraId}</url> </issueManagement> <scm> <connection>scm:svn:https://someFakeSCM/${moduleId}</connection> <developerConnection>scm:svn:https://someFakeSCM/${moduleId}/trunk/</developerConnection> <url>https://someFakeSCM/${moduleId}</url> </scm> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.0-beta-9</version> </plugin> </plugins> </pluginManagement> </build> </project>
Hide
Michael Wenig added a comment - - edited

MRELEASE-128 Solves the problem with properties in scm-tags (patch inside)

Show
Michael Wenig added a comment - - edited MRELEASE-128 Solves the problem with properties in scm-tags (patch inside)
Hide
Mike Youngstrom added a comment -

Duplicate of MRELEASE-128

Show
Mike Youngstrom added a comment - Duplicate of MRELEASE-128

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: