You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bram de Kruijff <br...@gx.nl> on 2007/05/29 18:28:00 UTC

How to set parent version in archetype

Hi,

any ideas on how to solve this use-case?

In my project I have an archetype for plugins into my platform with
version x.y.z. When someone uses the archetype the resulting module
should have as parent my 'plugin base artifact' of the correct version.
Eg:

>> archetype-resource/pom.xml

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>platform</groupId>
    <artifactId>platform-plugin</artifactId>
    <version>x.y.z</version>
  </parent>
  <groupId>${groupId}</groupId>
  <artifactId>${artifactId}</artifactId> 
</project>

But I don't want to hardcode the platform version as it is always the
version of the archetype artifact itself eg. ${pom.version} and the
release plugin will not update it. But the maven-plugin packaging will
not filter it at build time (for obvious reasons) so ${pom.version} is
no good.

Now if I configure the archetype resources to filter the
archetype-resources/pom.xml it will filter all variables like groupId
which is obviously no good. Or can I escape these?

Unfortunaly also using ${archetypeVersion} or even ${what.ever} as
parameter and adding this with -D on the commandline when creating a
project based on this archetype doesn't seem te work. The variable
simply does not get replaced.

Any tips would be appriciated! :)

regards,
Bram


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org