Nicolas Dupont created ARCHETYPE-397:
----------------------------------------
Summary: Required property default value is not displayed
correctly if a Velocity expression
Key: ARCHETYPE-397
URL: https://jira.codehaus.org/browse/ARCHETYPE-397
Project: Maven Archetype
Issue Type: Bug
Components: Generator
Affects Versions: 2.2
Reporter: Nicolas Dupont
If you use a Velocity expression to define a default value in your archetype
descriptor, it is not displayed correctly when you generate a project.
Let's say we have, in our descriptor :
<requiredProperty key="package">${groupId}.${artifactId}</requiredProperty>
When you generate a project from the archetype, you type com.company as a
groupId and my-project as an artifactId. Then you'll be prompted for the
package and default value will be displayed as "com.company.my-project".
Now, if we have in our descriptor :
{{<requiredProperty
key="package">${groupId}.${artifactId.replace('-','')}</requiredProperty>}}
When you generate a project in the same way, the default value for package will
be displayed as ${groupId}.${artifactId.replace('-','')} instead of
com.company.myproject.
Note that if you leave the value as it is, the generation will do resolve the
expression (package property will be resolve correctly). It's just confusing
when the default value is showed at the prompt step.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira