[ 
https://issues.apache.org/jira/browse/MNG-6576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752518#comment-16752518
 ] 

Cameron Hudson commented on MNG-6576:
-------------------------------------

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.

> Invalid package names are not rejected during archetype generation.
> -------------------------------------------------------------------
>
>                 Key: MNG-6576
>                 URL: https://issues.apache.org/jira/browse/MNG-6576
>             Project: Maven
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 3.6.0
>         Environment: MacOS 10.14.2 (Mojave)
>            Reporter: Cameron Hudson
>            Priority: Minor
>              Labels: archehtype, generate, package
>
> 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 and present the prompt again.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to