Olivier Cailloux created ARCHETYPE-556:
------------------------------------------

             Summary: Property in default-value is not replaced when using 
automated mode
                 Key: ARCHETYPE-556
                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-556
             Project: Maven Archetype
          Issue Type: Bug
            Reporter: Olivier Cailloux


In {{archetype-metadata.xml}} I have:
{code:xml}
<requiredProperty key="package">
        <defaultValue>${groupId}.${artifactId}</defaultValue>
</requiredProperty>
{code}
This default value is used correctly when using mvn archetype in interactive 
mode, but it is used incorrectly when using mvn archetype -B. In that case, the 
value of package is literally ${groupId}.${artifactId} with no replacement.

To reproduce, type:
{code}
mvn -B archetype:generate -DarchetypeGroupId=io.github.oliviercailloux 
-DarchetypeArtifactId=java-se-1.8-archetype -DgroupId=mygroupid 
-DartifactId=myartifactid
{code}
then {{ls a/src/main/java/}}. Observe that the directory is literally 
{{$\{groupId}}} instead of the expected {{mygroupid}}.

The artifact is published to Maven Central and its source code is 
[here|https://github.com/oliviercailloux/java-se-1.8-archetype].

Possibly related: 490, comment of 397.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to