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:
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
Proposed additional patch is attached.