If this is not possible then whats is the best way to avoid duplication of conetnt between base.pom and extension.pom?

Also please see a typo fix inline below...

Farrukh Najmi wrote:
Dear Colleagues,

I have two separate projects "base" and "extension".
Each project is really a multi-project inheritance hierarchy.
Finally extension pom is a sub pom of base pom.

The pom inheritance is as follows:

base
   base-sub1
   base-sub2

   extension
       extension-sub1
       extension-sub2

Since base and pom are separately released projects they need to be version independent of each other.

For example it should be possible for version 2.0 of base be the parent pom of version 1.0 of extension.

I recently discovered that this may not be possible. It seems that if I give extension pom a version it applies the same version to parent during build even though parent was give a separate and explicit version:

<project>
   <modelVersion>4.0.0</modelVersion>
   <parent>
       <groupId>base</groupId>
       <artifactId>base</artifactId>
       <version>2.0</version>
   </parent>
     <groupId>derived</groupId>
   <artifactId>derived</artifactId>
   <version>1.0</version>

   ...
</project>

Oops above should have read:

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
      <groupId>base</groupId>
      <artifactId>base</artifactId>
      <version>2.0</version>
  </parent>
    <groupId>extension</groupId>
  <artifactId>extension</artifactId>
  <version>1.0</version>

  ...
</project>


It appears that building above pom causes version 1.0 of base to be used instead of 2.0.

What am I doing wrong?



--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com



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

Reply via email to