Re: Sharing common groupId
Lukasz Lenart <[email protected]> Thu, 17 Nov 2016 23:38:54 +0100
| Newsgroups | gmane.comp.jakarta.repository |
|---|---|
| Message-ID | <CAMopvkOBBr2QOzQSX7eViZGqhYi1QmxmfiMoVAZi3jccNN_K3A@mail.gmail.com> |
2016-11-16 13:00 GMT+01:00 sebb <[email protected]>: > On 16 November 2016 at 10:10, Lukasz Lenart <[email protected]> wro= te: >> Hi, >> >> I would like to know if there is any problem if multiple different >> projects shares the same groupId? I meant, we would like to allow >> third parties to use common groupId as mentioned in the post below >> >> http://markmail.org/message/yruabvlfpfdfw6w5 >> >> Can this be a problem during publishing artifacts? > > Yes. It can cause severe problems. > > Maven uses the (groupId,artifactId) pair to determine which jars can > appear on the same classpath. > > Unless all the projects sharing the groupId ensure that they use > distinct artifact Ids this can result in jar hell. > > The simplest way to ensure distinct (groupId,artifactId) pairs is to > ensure each independent project uses different groupIds. > They can then maintain their own unique list of artifactIds. So this should work, it's just a manner of controlling who can use the shared groupId and artifactId. We (Struts PMC) can accept if a given external project can use the groupId or not and this will give us a way to control if (groupId,artifactId) is distinct. Does it make sense? Regards --=20 =C5=81ukasz + 48 606 323 122 http://www.lenart.org.pl/