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

Alex Pogrebnyak updated MRELEASE-860:
-------------------------------------

    Description: 
When you run 'prepare-with-pom' goal, it will update snapshot version number on 
dependencies.

Contrary to that behavior, update-versions, will only update parent's version.

If you have these poms:

{code:title=aggregator-pom.xml|borderStyle=solid}

<artifactId>aggregator</artifactId>

<parent>
  <groupId>my.group.id</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
  <relativePath>parent/pom.xml</relativePath>
</parent>

<modules>
  <module>dependent</module>
  <module>dependency</module>
</modules>
{code}

{code:title=dependent-pom.xml|borderStyle=solid}
<artifactId>dependent</artifactId>

<parent>
  <groupId>my.group.id</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
  <relativePath>../parent/pom.xml</relativePath>
</parent>

<dependencies>
  <dependency>
    <groupId>my.group.id</groupId>
    <artifactId>dependency</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>
{code}

Then, when you run
{code}
mvn -DdevelopmentVersion=1.1-SNAPSHOT \
    -DautoVersionSubmodules=true release:update-versions
{code}

The dependent-pom.xml will be incorrect:

{code:title=dependent-pom-1.1.xml|borderStyle=solid|xml}
<artifactId>dependent</artifactId>

<parent>
  <groupId>my.group.id</groupId>
  <artifactId>parent</artifactId>
  <version>1.1-SNAPSHOT</version>
  <relativePath>../parent/pom.xml</relativePath>
</parent>

<dependencies>
  <dependency>
    <groupId>my.group.id</groupId>
    <artifactId>dependency</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>
{code}

Notice that dependency's version is still {{{color:red}1.0-SNAPSHOT{color}}}
If I were to do {{release:prepare}} and {{release:perform}} the version would 
have been updated in both places

Just to state: I cannot use $\{project.version\}, and custom version property 
does not work because of MRELEASE-782



  was:
When you run 'prepare-with-pom' goal, it will update snapshot version number on 
dependencies.

Contrary to that behavior, update-versions, will only update parent's version.

If you have these poms:

{code:title=aggregator-pom.xml|borderStyle=solid}

<artifactId>aggregator</artifactId>

<parent>
  <groupId>my.group.id</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
  <relativePath>parent/pom.xml</relativePath>
</parent>

<modules>
  <module>dependent</module>
  <module>dependency</module>
</modules>
{code}

{code:title=dependent-pom.xml|borderStyle=solid}
<artifactId>dependent</artifactId>

<parent>
  <groupId>my.group.id</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
  <relativePath>../parent/pom.xml</relativePath>
</parent>

<dependencies>
  <dependency>
    <groupId>my.group.id</groupId>
    <artifactId>dependency</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>
{code}

Then, when you run
{code}
mvn -DdevelopmentVersion=1.1-SNAPSHOT \
    -DautoVersionSubmodules=true release:update-versions
{code}

The dependent-pom.xml will be incorrect:

{code:title=dependent-pom-1.1.xml|borderStyle=solid|xml}
<artifactId>dependent</artifactId>

<parent>
  <groupId>my.group.id</groupId>
  <artifactId>parent</artifactId>
  <version>1.1-SNAPSHOT</version>
  <relativePath>../parent/pom.xml</relativePath>
</parent>

<dependencies>
  <dependency>
    <groupId>my.group.id</groupId>
    <artifactId>dependency</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>
{code}

Notice that dependency's version is still {{{color:red}1.0-SNAPSHOT{color}}}

Just to state: I cannot use $\{project.version\}, and custom version property 
does not work because of MRELEASE-782

    
> update-versions goal does not update dependency versions
> --------------------------------------------------------
>
>                 Key: MRELEASE-860
>                 URL: https://jira.codehaus.org/browse/MRELEASE-860
>             Project: Maven Release Plugin
>          Issue Type: Bug
>          Components: update-versions
>    Affects Versions: 2.4.2
>            Reporter: Alex Pogrebnyak
>
> When you run 'prepare-with-pom' goal, it will update snapshot version number 
> on dependencies.
> Contrary to that behavior, update-versions, will only update parent's version.
> If you have these poms:
> {code:title=aggregator-pom.xml|borderStyle=solid}
> <artifactId>aggregator</artifactId>
> <parent>
>   <groupId>my.group.id</groupId>
>   <artifactId>parent</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <relativePath>parent/pom.xml</relativePath>
> </parent>
> <modules>
>   <module>dependent</module>
>   <module>dependency</module>
> </modules>
> {code}
> {code:title=dependent-pom.xml|borderStyle=solid}
> <artifactId>dependent</artifactId>
> <parent>
>   <groupId>my.group.id</groupId>
>   <artifactId>parent</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <relativePath>../parent/pom.xml</relativePath>
> </parent>
> <dependencies>
>   <dependency>
>     <groupId>my.group.id</groupId>
>     <artifactId>dependency</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </dependency>
> </dependencies>
> {code}
> Then, when you run
> {code}
> mvn -DdevelopmentVersion=1.1-SNAPSHOT \
>     -DautoVersionSubmodules=true release:update-versions
> {code}
> The dependent-pom.xml will be incorrect:
> {code:title=dependent-pom-1.1.xml|borderStyle=solid|xml}
> <artifactId>dependent</artifactId>
> <parent>
>   <groupId>my.group.id</groupId>
>   <artifactId>parent</artifactId>
>   <version>1.1-SNAPSHOT</version>
>   <relativePath>../parent/pom.xml</relativePath>
> </parent>
> <dependencies>
>   <dependency>
>     <groupId>my.group.id</groupId>
>     <artifactId>dependency</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </dependency>
> </dependencies>
> {code}
> Notice that dependency's version is still {{{color:red}1.0-SNAPSHOT{color}}}
> If I were to do {{release:prepare}} and {{release:perform}} the version would 
> have been updated in both places
> Just to state: I cannot use $\{project.version\}, and custom version property 
> does not work because of MRELEASE-782

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

Reply via email to