maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JavaGeek <nos...@boscarine.com>
Subject How can I pass properties to an Archetype POM in archetype-resources?
Date Sat, 07 Nov 2009 03:08:02 GMT

Hello,
I volunteered to help the Weld team create some JSR 299 archetypes.  There
are going to be 4 or more archetypes that will have the same dependency
versions, sometimes at different scopes.  I'd like to define properties in
the archetype's parent POM and pass them to the poms in the
archetype-resources folder.  

For example, I'd like to be able to define the property below in the parent
pom.
<properties>
	<jsf.version>2.0.0-RC</jsf.version>
</properties>

and in src/main/resources/archetype-resources/pom.xml define:

<dependency>
	<groupId>javax.faces</groupId>
	<artifactId>jsf-api</artifactId>
	<version>${jsf.version}</version>
</dependency>

However, ${jsf.version} doesn't resolve, I get:
[WARNING] org.apache.velocity.runtime.exception.ReferenceException:
reference : template = archetype-resources/pom.xml [line 57,column 34] :
${jsf.version} is not a valid reference.

...and the generated project doesn't build for obvious reasons.

How can I pass a property to the
src/main/resources/archetype-resources/pom.xml ?

Thanks in Advance,
Steven
-- 
View this message in context: http://old.nabble.com/How-can-I-pass-properties-to-an-Archetype-POM-in-archetype-resources--tp26235463p26235463.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Mime
View raw message