Hi,

The parent pom belongs to a build config project and contains common build
configuration, ie dependency management, plugin management etc.

The parent pom is common for many projects with different release cycles,
therefore it will have a different version than the child projects.

Some of the plugin definitions in the plugin management section of the
parent pom refer to plugins (or libs that the plugins depend on) within the
build config project and thus have the same version as the parent pom. 

It is these references within plugin management that I would like to avoid
having to manually update when doing a release.

The relevant parts of the parent pom:

<pluginManagement>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <version>2.1</version>
    <dependencies>
      <dependency>
        <groupId>com.orc.maven</groupId>
        <artifactId>checkstyle_config</artifactId>
        <version>1.3-SNAPSHOT</version>
      </dependency>
    </dependencies>
    ....
  </plugin>
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>native-maven-plugin</artifactId>
    <version>1.3-SNAPSHOT</version>
    ....
  </plugin>

The bold parts are the ones I like to replace with a reference to the
version of the pom they reside in.

    Peter


Wayne Fay wrote:
> 
> You've never said why you need this, so it is possible there are
> better ways to do what you're trying to do that would not require the
> manual step at release. Perhaps you can explain the reason behind this
> whole thing?
> 
> Wayne
> 
> On 9/5/07, PeterNilsson <[EMAIL PROTECTED]> wrote:
>>
>> Yes, that would work. The problem is that the release plugin will not
>> update
>> that property, so
>> we get a manual step when doing a release.
>>
>>      Peter
>>
>>
>> Andrew Williams-5 wrote:
>> >
>> > Not entirely certain if this will help or not, but could you define a
>> > property and reference that instead?
>> >
>> > i.e.
>> > <property>
>> >    <myversion>1.0-SNAPSHOT</myversion>
>> > </property>
>> >
>> > then using ${myversion} will always return you that version
>> >
>> > Andy
>> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-version-of-the-pom-itself---not-the-child-projects-pom-tf4359342s177.html#a12517044
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to