maven-archetype icon indicating copy to clipboard operation
maven-archetype copied to clipboard

[ARCHETYPE-559] Invalid package names are not rejected during archetype generation.

Open jira-importer opened this issue 6 years ago • 2 comments

Cameron Hudson opened ARCHETYPE-559 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] <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

jira-importer avatar Jan 24 '19 21:01 jira-importer

Michael Osipov commented

What do you expect to happen?

jira-importer avatar Jan 24 '19 21:01 jira-importer

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.

jira-importer avatar Jan 25 '19 18:01 jira-importer