[
https://issues.apache.org/jira/browse/ARCHETYPE-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17254144#comment-17254144
]
Tushar commented on ARCHETYPE-556:
----------------------------------
I am able to repro this in batch mode on my maven installation version 3.6.3
(maven-archetype-plugin version 3.2.0)
> 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
> Assignee: Robert Scholte
> Priority: Major
>
> 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:java}
> 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}}.
> This archetype 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
(v8.3.4#803005)