You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Scheffler <th...@uni-jena.de> on 2013/02/13 15:27:17 UTC
property expansion in pom.xml of archetype
Hi,
I created my first archetype. In archetype-metadata.xml I specified
<requiredProperties>
<requiredProperty key="mylib.version" />
</requiredProperties>
When creating a project I want ${mylib.version} in the prototype pom.xml
to be expanded to the specified value:
<parent>
<artifactId>mycore</artifactId>
<groupId>org.mycore</groupId>
<version>${mylib.version}</version>
</parent>
On the command line I see the correct value but it is not used for
pom.xml. Just ${artifactId}, ${groupId} and ${version} seem to get expanded.
How can I achieve this without releasing a new archetype with every
version of mylib?
regards,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[SOLVED] Re: property expansion in pom.xml of archetype
Posted by Thomas Scheffler <th...@uni-jena.de>.
Am 13.02.2013 15:27, schrieb Thomas Scheffler:
> Hi,
>
> I created my first archetype. In archetype-metadata.xml I specified
>
> <requiredProperties>
> <requiredProperty key="mylib.version" />
> </requiredProperties>
>
> When creating a project I want ${mylib.version} in the prototype pom.xml
> to be expanded to the specified value:
>
>
> <parent>
> <artifactId>mycore</artifactId>
> <groupId>org.mycore</groupId>
> <version>${mylib.version}</version>
> </parent>
>
>
> On the command line I see the correct value but it is not used for
> pom.xml. Just ${artifactId}, ${groupId} and ${version} seem to get expanded.
>
> How can I achieve this without releasing a new archetype with every
> version of mylib?
There is hint on
http://maven.apache.org/archetype/maven-archetype-plugin/create-from-project-mojo.html
"Custom property names may not contain the '.' character."
Changing mylib.version to mylib-version solved the problem.
regards,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org