apache / apache/maven-archetypes
[MARCHETYPES-74] m-a-archetype generates project with unresolved property in descriptor
- Dominant language
- Java
- Stars
- 37
- Forks
- 46
- Avg merge
- 5h 44m
- Merged PRs (30d)
- 1
Description
**[Piotr Zygielo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=pzygielo)** opened **[MARCHETYPES-74](https://issues.apache.org/jira/browse/MARCHETYPES-74?redirect=false)** and commented
New archetype generated with maven-archetype-archetype contains unresolved `artifactId` in archetype-descriptor in `name` attribute.
This `name` is then used still unresolved in few places, including debug logs.
```bash
#!/bin/bash
export MAVEN_OPTS=-Dmaven.repo.local=repository
MAAV=${1:-1.4}
echo Using o.a.m.a:m-a-a:${MAAV}
1. generate new archetype
\rm -rf bobin-archetype
mvn archetype:generate \
-B -q \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-archetype \
-DarchetypeVersion=${MAAV} \
-DgroupId=pzrep -DartifactId=bobin-archetype -Dversion=1.0-SNAPSHOT -Dpackage=pzrep
echo Inspect descriptor:
grep -B3 artifactId bobin-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
1. install new archetype in repository
mvn install -q -f bobin-archetype
1. use new archetype to generate another project
\rm -rf drake
mvn archetype:generate \
-B -q \
-DarchetypeGroupId=pzrep \
-DarchetypeArtifactId=bobin-archetype \
-DarchetypeVersion=1.0-SNAPSHOT \
-DgroupId=pzrep -DartifactId=drake -Dversion=1.0-SNAPSHOT -Dpackage=pzrep \
-X | grep '\[DEBUG\] Processing complete'
```
results in
```none
Using o.a.m.a:m-a-a:1.5-SNAPSHOT
Inspect descriptor:
[DEBUG] Processing complete archetype ${artifactId}
```
(where 1.5-SNAPSHOT=19b32d3).
---
**Affects:** 1.4
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the provided Maven commands, then inspect bobin-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml and the generated debug output. Trace how the archetype descriptor's name is populated. Done means a generated archetype contains a resolved name and processing logs no longer show ${artifactId}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100