Description
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.
Attachments
Attachments
Issue Links
- is related to
-
ARCHETYPE-556 Property in default-value is not replaced when using automated mode
- Closed
- relates to
-
ARCHETYPE-490 Required property default value incorrect when using system property
- Open