Project build error: 'groupId' with value 'IOCProj1(Basic)' does not match a valid id pattern

后端 未结 3 1204
难免孤独
难免孤独 2020-12-11 19:17

I have an issue with my POM:



        
相关标签:
3条回答
  • 2020-12-11 19:50

    You cannot use parentheses inside a groupId or artifactId.

    These fields are validated by the following regular expression: [A-Za-z0-9_\\-.]+ in Maven. Hence, you cannot have parentheses; the only valid characters are alphanumeric, underscore, dash and dot. You could rename your project to:

    <groupId>IOCProj1_Basic</groupId>
    <artifactId>IOCProj1_Basic</artifactId>
    
    0 讨论(0)
  • 2020-12-11 19:56

    According DefaultModelValidator class 'artifactId' and 'groupId' have to match following regular expression

    ID_REGEX = "[A-Za-z0-9_\-.]+" If you are intrested in other validations of maven pom file, looking into this class source code will be helpful. http://svn.apache.org/repos/asf/maven/maven-2/branches/maven-2.2.x/maven-project/src/main/java/org/apache/maven/project/validation/DefaultModelValidator.java

    0 讨论(0)
  • 2020-12-11 19:58

    --- while creating application should not give space and moreover project name and artifact id should be same

    0 讨论(0)
提交回复
热议问题