Dynamic runtime property values for resource filtering
------------------------------------------------------
Key: ARCHETYPE-374
URL: https://jira.codehaus.org/browse/ARCHETYPE-374
Project: Maven Archetype
Issue Type: New Feature
Components: Generator
Affects Versions: 2.1
Reporter: Marc Szewczyk
When generating a new project from an archetype, it does not seem to be
possible to populate the properties used by the Velocity engine with dynamic
runtime values, other than the ones that are automatically provided by Java
system properties.
What would be ideal is to have some hook in -- some events or something -- that
would allow us to run arbitrary Java code packaged with the archetype JAR. But
some mechanism is desired to be able to assign a dynamic value to the
properties so that, for example, a timestamp or a dynamically-generated ID
could be inserted into a filtered archetype-resource file when the project is
generated from the archetype.
Supporting Java expressions in the requiredProperties in the
archetype-descriptor might be one way to do it. So, for example:
<requiredProperties>
<requiredProperty key="current-date">
<dynamicInit>new Date()</dynamicInit>
</requiredProperty>
</requiredProperties>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira