How can I pass properties to an Archetype POM in archetype-resources?

1 message Options
Embed this post
Permalink
JavaGeek-3

How can I pass properties to an Archetype POM in archetype-resources?

Reply Threaded More More options
Print post
Permalink

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: [hidden email]
For additional commands, e-mail: [hidden email]