apache / apache/maven-archetype
[ARCHETYPE-564] Archetype version range support
- Dominant language
- Java
- Stars
- 148
- Forks
- 181
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 8
Description
**[Alejandro Torras](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=atec)** opened **[ARCHETYPE-564](https://issues.apache.org/jira/browse/ARCHETYPE-564?redirect=false)** and commented
Hi,
Currently I'm only able to fetch a versioned archetype with the following situations:
1. Not specifying an archetypeVersion at all.
2. Specifying a fixed version (i.e. 1.7.3).
3. Specifying the _LATEST_ version.
I don't know if there are more choices about it, but IMHO I think it could be great to define a version range for archetypes (as it's currently done with dependencies). An example could be:
```
mvn -B archetype:generate -DarchetypeGroupId=com.acme.archetype -DarchetypeArtifactId=plugin-archetype-rest -DartifactId=AppRest -DgroupId=com.acme.app -Dversion=1.0 '-DarchetypeVersion=(,1.8.0)'
```
Thank you!
---
**Affects:** 3.0.1
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the archetype:generate command and the archetypeVersion parameter described in the issue, then compare its current fixed, omitted, and LATEST handling with Maven dependency version-range behavior. Done means a range such as '(,1.8.0)' is accepted and resolves the appropriate archetype version, with coverage for the documented cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100