maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bayne <>
Subject Embed project version in archetype
Date Fri, 26 Aug 2011 16:08:30 GMT

I'm creating a Maven archetype which generates a project skeleton that 
will include a dependency on the project from which the archetype 

For example, the origin project looks like:

origin/archetype/... archetype for generating project
       /core/... core services
       /extra/... extra services

and the archetype will generate a project with a POM that contains 
dependencies like so:


I want SOMEVERSION to be the version of the origin project at the time 
that the archetype is built and installed into the repository.

So if the origin project is at version 1.0-SNAPSHOT and is "mvn 
install"ed, then I want the archetype to generate a dependency on 
1.0-SNAPSHOT. And when the origin project is released, and automatically 
bumped to version 1.0, I want the archetype to generate a dependency on 
origin-core 1.0.

Basically I'd like to use ${archetypeVersion} as a Velocity variable in my 
POM, but that doesn't seem possible.

Is there any other way of accomplishing what I'm trying to do here? Does 
everyone who generates dependencies in their artifacts just manually hack 
them every time they do a project release?




To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message