[ 
https://issues.apache.org/jira/browse/ARCHETYPE-490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christopher Rowland updated ARCHETYPE-490:
------------------------------------------
    Attachment: ARCHETYPE-490.patch

> Required property default value incorrect when using system property
> --------------------------------------------------------------------
>
>                 Key: ARCHETYPE-490
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-490
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator, Plugin
>    Affects Versions: 2.3, 2.4
>            Reporter: Christopher Rowland
>              Labels: easyfix, newbie, patch
>         Attachments: ARCHETYPE-490.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to