Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
-
None
-
None
-
None
Description
In archetype-metadata.xml I have:
<requiredProperty key="package"> <defaultValue>${groupId}.${artifactId}</defaultValue> </requiredProperty>
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:
mvn -B archetype:generate -DarchetypeGroupId=io.github.oliviercailloux -DarchetypeArtifactId=java-se-1.8-archetype -DgroupId=mygroupid -DartifactId=myartifactid
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.
Possibly related: 490, comment of 397.
Attachments
Issue Links
- relates to
-
ARCHETYPE-490 Required property default value incorrect when using system property
- Open
-
ARCHETYPE-397 Required property default value is not displayed correctly if a Velocity expression
- Closed