[ALL] explicit Maven groupId in component POMs

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[ALL] explicit Maven groupId in component POMs

sebb-2-2
Commons components use two different styles of groupId:

commons-<component> - used by some original components (e.g. IO, NET)
org.apache.commons - newer style, used by most components

Since Commons Parent uses the latter, and the groupId is inherited, in
theory a component using the new groupId does not need to specify it.

However, I think that is unwise, as it's not clear whether the
omission is deliberate or accidental.
Also the parent could potentially be changed to one with a different groupId.

Far better to specify the groupId explicitly rather than relying on an
inherited default.

Agreed?

S.
P.S. Note that changing the groupId can only be done if the package
name is also changed, see
https://wiki.apache.org/commons/MavenAndClasspath

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [ALL] explicit Maven groupId in component POMs

Emmanuel Bourg-3
Le 21/04/2017 à 15:12, sebb a écrit :

> Agreed?

I don't mind, but IntelliJ will highlight the groupId and suggest to
remove it :)

Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [ALL] explicit Maven groupId in component POMs

Benedikt Ritter-4
In reply to this post by sebb-2-2

> Am 21.04.2017 um 15:12 schrieb sebb <[hidden email]>:
>
> Commons components use two different styles of groupId:
>
> commons-<component> - used by some original components (e.g. IO, NET)
> org.apache.commons - newer style, used by most components
>
> Since Commons Parent uses the latter, and the groupId is inherited, in
> theory a component using the new groupId does not need to specify it.
>
> However, I think that is unwise, as it's not clear whether the
> omission is deliberate or accidental.
> Also the parent could potentially be changed to one with a different groupId.
>
> Far better to specify the groupId explicitly rather than relying on an
> inherited default.
>
> Agreed?

-1: it’s redundant and unnecessary.

>
> S.
> P.S. Note that changing the groupId can only be done if the package
> name is also changed, see
> https://wiki.apache.org/commons/MavenAndClasspath
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [ALL] explicit Maven groupId in component POMs

sebb-2-2
On 21 April 2017 at 16:54, Benedikt Ritter <[hidden email]> wrote:

>
>> Am 21.04.2017 um 15:12 schrieb sebb <[hidden email]>:
>>
>> Commons components use two different styles of groupId:
>>
>> commons-<component> - used by some original components (e.g. IO, NET)
>> org.apache.commons - newer style, used by most components
>>
>> Since Commons Parent uses the latter, and the groupId is inherited, in
>> theory a component using the new groupId does not need to specify it.
>>
>> However, I think that is unwise, as it's not clear whether the
>> omission is deliberate or accidental.
>> Also the parent could potentially be changed to one with a different groupId.
>>
>> Far better to specify the groupId explicitly rather than relying on an
>> inherited default.
>>
>> Agreed?
>
> -1: it’s redundant and unnecessary.

Strictly speaking, yes.

But the problem is that it would be very easy to change the parent gid
and assume that everything is still OK.

Especially with Commons which has a mixture of groupIds, I think it's
important to explicitly state the intended groupId for each component.

>>
>> S.
>> P.S. Note that changing the groupId can only be done if the package
>> name is also changed, see
>> https://wiki.apache.org/commons/MavenAndClasspath
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [ALL] explicit Maven groupId in component POMs

Emmanuel Bourg-3
Le 21/04/2017 à 18:39, sebb a écrit :

> But the problem is that it would be very easy to change the parent gid
> and assume that everything is still OK.

But why would we change the parent groupId? It hasn't changed since its
first release 10 years ago and I don't see the need for a new name.

Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [ALL] explicit Maven groupId in component POMs

Pascal Schumacher
In reply to this post by Emmanuel Bourg-3
Am 21.04.2017 um 15:21 schrieb Emmanuel Bourg:
> I don't mind, but IntelliJ will highlight the groupId and suggest to
> remove it :)
Eclipse also warns that the groupId duplicates the parent groupId.

I prefer not to duplicate the parent groupId.

Cheers,
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [ALL] explicit Maven groupId in component POMs

garydgregory
In reply to this post by Emmanuel Bourg-3
K

On Apr 21, 2017 6:21 AM, "Emmanuel Bourg" <[hidden email]> wrote:

Le 21/04/2017 à 15:12, sebb a écrit :

> Agreed?

I don't mind, but IntelliJ will highlight the groupId and suggest to
remove it :)



Same in Eclipse. POMs are big enough as it is, I prefer to keep the config
by exception going, but that's just me.

Gary


Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]