Details
Description
When performing a generation while passing in artifactId, groupId, or version as a system property, required property default values using velocity expressions are evaluated incorrectly.
As an example, I have an archetype with groupId com.apache and artifactId automation-archetype. If I attempt to generate using the following command:
mvn archetype:generate -DarchetypeGroupId=com.apache -DarchetypeArtifactId=automation-archetype -DartifactId=hello-world-automation
And I have a required property defined as:
<requiredProperty key="artifactPackage"> <defaultValue>${artifactId.replace("-", "_")}</defaultValue> </requiredProperty>
Then the resulting property is evaluated to automation_archetype instead of hello_world_automation.
This changed from version 2.2 to 2.3 by a patch introduced in ARCHETYPE-397.
Proposed additional patch is attached.
Attachments
Attachments
Issue Links
- is related to
-
ARCHETYPE-397 Required property default value is not displayed correctly if a Velocity expression
- Closed
-
ARCHETYPE-556 Property in default-value is not replaced when using automated mode
- Closed