apache / apache/maven-archetype
[ARCHETYPE-559] Invalid package names are not rejected during archetype generation.
- Dominant language
- Java
- Stars
- 148
- Forks
- 181
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 8
Description
**[Cameron Hudson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cameronhudson8)** opened **[ARCHETYPE-559](https://issues.apache.org/jira/browse/ARCHETYPE-559?redirect=false)** and commented
Steps to replicate:
`$ mvn archetype:generate`
I then entered
* `1313` for the quickstart archetype.
* `8` for quickstart archetype version 1.4.
* `info.cameronhudson.18655` for the groupId
* `lab1` for the artifactId
* `1.0` for the snapshot version
* `public-recommendation-service` for the package name
* `Y` for confirmation
This successfully creates a project, even though the package name is invalid.
Attempting to run mvn clean install results in misleading compilation errors:
```
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/cameronhudson/Repositories/CMU/18-655_Lab_1_Public_Recommendation_Service/lab1/src/main/java/public-recommendation-service/App.java:[1,8] expected
[ERROR] /Users/cameronhudson/Repositories/CMU/18-655_Lab_1_Public_Recommendation_Service/lab1/src/main/java/public-recommendation-service/App.java:[1,15] class, interface, or enum expected
[INFO] 2 errors
```
Expected behavior:
Inform the user that the package name is invalid (ideally, explaining why it's invalid) and present the prompt again.
---
No further details from [ARCHETYPE-559](https://issues.apache.org/jira/browse/ARCHETYPE-559?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the prompt flow reached by `mvn archetype:generate`, focusing on how the package name is accepted and how invalid input is handled. Reproduce the case with `public-recommendation-service`, then run `mvn clean install` on the generated project; done means invalid package names are explained and the prompt is shown again.
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
- 45/100