Maven artifact and groupId naming

后端 未结 5 1784
野性不改
野性不改 2020-11-30 16:01

I\'m currently in the process of moving some project from Ant to Maven. Conformist as I am, I want to use well-established conventions for finding groupId and <

5条回答
  •  广开言路
    2020-11-30 16:32

    Your convention seems to be reasonable. If I were searching for your framework in the Maven repo, I would look for awesome-inhouse-framework-x.y.jar in com.mycompany.awesomeinhouseframework group directory. And I would find it there according to your convention.

    Two simple rules work for me:

    • reverse-domain-packages for groupId (since such are quite unique) with all the constrains regarding Java packages names
    • project name as artifactId (keeping in mind that it should be jar-name friendly i.e. not contain characters that maybe invalid for a file name or just look weird)

提交回复
热议问题