Hi,

 

I am trying to use the release plugin with a new project where I want the 
entire project to use a single version number (vs. one version number per 
module).  I have the single version number part working like this:

 

1.)    In my parent pom, I do the following:

  <groupId>test</groupId>

 <artifactId>snapshots-parent</artifactId>

  <version>1.0.1-SNAPSHOT</version>

  <packaging>pom</packaging>

 

  <properties>

    <my-project-version>${project.version}</my-project-version>

  </properties>



2.)    In my submodule POMs, I do the following:

  <artifactId>snapshots-consumer</artifactId>

 <packaging>jar</packaging>

  <name>snapshots-consumer</name>

 

  <parent>

    <groupId>test</groupId>

    <artifactId>snapshots-parent</artifactId>

    <version>${my-project-version}</version>

    <relativePath>../parent/pom.xml</relativePath>

  </parent>

 

  <dependencies>

    <dependency>

      <groupId>${project.parent.groupId}</groupId>

      <artifactId>snapshots-util</artifactId>

      <version>${project.parent.version}</version>

    </dependency>

  </dependencies>

 

This all works fine.  Unfortunately, when I run the release plugin's 
release:prepare goal, it replaces gthe parent version in all of my submodule 
POMs with the hard-coded value:

  <parent>

    <groupId>test</groupId>

    <artifactId>snapshots-parent</artifactId>

    <version>1.0.1</version>

    <relativePath>../parent/pom.xml</relativePath>

  </parent>

 

It should would be nice if I could figure out a way to get it to not do this.

 

Any thoughts?

Robert

 

Reply via email to