maven-archetype
maven-archetype copied to clipboard
[ARCHETYPE-559] Invalid package names are not rejected during archetype generation.
Cameron Hudson opened ARCHETYPE-559 and commented
Steps to replicate:
$ mvn archetype:generate
I then entered
-
1313for the quickstart archetype. -
8for quickstart archetype version 1.4. -
info.cameronhudson.18655for the groupId -
lab1for the artifactId -
1.0for the snapshot version -
public-recommendation-servicefor the package name -
Yfor 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] <identifier> 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
Cameron Hudson commented
I expected it to inform the user that the package name was invalid (ideally, explaining why it's invalid), and to present the prompt again. I've added this to my original report.