You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@onami.apache.org by Eric Charles <er...@apache.org> on 2013/02/09 10:01:36 UTC

[discuss] Enable src/test jars for snapshots

Hi,

I have opened ONAMI-78  Enable the tests.jar sources.jar and 
test-sources.jar generation

1. Do you have interest/think it is logical to have this generation for 
snapshots?

2. Do you think the proposed solution is acceptable?

Thx, Eric

Re: [discuss] Enable src/test jars for snapshots

Posted by Eric Charles <er...@apache.org>.
On 09/02/2013 18:06, Mikhail Mazursky wrote:
> 2013/2/9 Eric Charles <er...@apache.org>
>
>> On 09/02/2013 16:27, Mikhail Mazursky wrote:
>>
>>>    2. Do you think the proposed solution is acceptable?
>>>>>
>>>>>>
>>>>>> If i understand correctly the issue, as an alternative solution it
>>>>>> should
>>>>>>
>>>>>>   be possible to just disable maven-jar-plugin execution for that
>>>>> particular
>>>>> project with pom packaging type.
>>>>>
>>>>>
>>>> Yes, disabling the maven-jar-plugin execution for pom packaging type
>>>> would
>>>> be better.
>>>>
>>>> Do you know how to achieve this?
>>>>
>>>
>>>
>>> It's easy - take a look at this example
>>> http://thomaswabner.wordpress.**com/2010/02/16/howto-disable-**
>>> inherited-maven-plugin/<http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/>
>>>
>>
>> Sure, but in that case, we would still need to explictely define the
>> maven-jar-plugin in the child modules.
>>
>> No need to do that - you can disable specific plugin execution by it's
> groupId, artifactId and execution_id (look at the mvn output to figure it
> out or set it explicitly in parent) by only adding that execution with
> phase=none to the specific maven module (pom.xml) where you want it to be
> disabled. Other modules keep inherited configuration intact.
>
>

OK, if 'executions' definitions only apply to the current pom, and are 
not inherited, then that's fine. I was thinking 'executions' are also 
inherited.

>> What we need is a way to say in the parent (and only in the parent):
>> 'apply the jar packagin only for non pom type module'
>>
>> There is a way to do that actually but it is very ugly - i don't think
> anyone wants to maintain that complexity.
>
>>
>>   I agree with Simone - is there a need for test and test-sources artifacts
>>> first of all?
>>>
>>>
>> Well, just a question of strategy.
>> If we are happpy to define it each time we need a test-jar, that's fine.
>> And btw, do we need test-jar for now?
>>
>> Haven't looked at all the code so i cannot say for all modules, but looks
> like lifecycle module have nothing interesting/reusable in it's tests.
>
>

Finally, I think there are not enough functional reasons and too many 
technical issues to generalize this.

I will update ONAMI-78 to reflect this.

Thx, Eric

>>
>>>
>>>>    To me it looks like the question is what
>>>>
>>>>> is easier to maintain - parent pom and exception in one project vs
>>>>> repeated
>>>>> (but trivial) configuration in multiple places. Implicit vs explicit.
>>>>> Conserning proposed solution - i think it is acceptable and better than
>>>>> alternative one. Also, it looks like a bug or at least as a thing to
>>>>> improve in maven-jar-plugin - and fixing it there whould have been the
>>>>> best
>>>>> option.
>>>>>
>>>>>
>>>> I will open a MAVEN JIRA for this.
>>>>
>>>>
>>> I guess you wanted to say maven-jar-plugin jira [1] because the issue is
>>> in
>>> this plugin IMO?
>>>
>>>
>> Yep
>>
>>   [1]: https://jira.codehaus.org/**browse/MJAR<https://jira.codehaus.org/browse/MJAR>
>>>
>>>
>

Re: [discuss] Enable src/test jars for snapshots

Posted by Mikhail Mazursky <mi...@gmail.com>.
2013/2/9 Eric Charles <er...@apache.org>

> On 09/02/2013 16:27, Mikhail Mazursky wrote:
>
>>   2. Do you think the proposed solution is acceptable?
>>>>
>>>>>
>>>>> If i understand correctly the issue, as an alternative solution it
>>>>> should
>>>>>
>>>>>  be possible to just disable maven-jar-plugin execution for that
>>>> particular
>>>> project with pom packaging type.
>>>>
>>>>
>>> Yes, disabling the maven-jar-plugin execution for pom packaging type
>>> would
>>> be better.
>>>
>>> Do you know how to achieve this?
>>>
>>
>>
>> It's easy - take a look at this example
>> http://thomaswabner.wordpress.**com/2010/02/16/howto-disable-**
>> inherited-maven-plugin/<http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/>
>>
>
> Sure, but in that case, we would still need to explictely define the
> maven-jar-plugin in the child modules.
>
> No need to do that - you can disable specific plugin execution by it's
groupId, artifactId and execution_id (look at the mvn output to figure it
out or set it explicitly in parent) by only adding that execution with
phase=none to the specific maven module (pom.xml) where you want it to be
disabled. Other modules keep inherited configuration intact.


> What we need is a way to say in the parent (and only in the parent):
> 'apply the jar packagin only for non pom type module'
>
> There is a way to do that actually but it is very ugly - i don't think
anyone wants to maintain that complexity.

>
>  I agree with Simone - is there a need for test and test-sources artifacts
>> first of all?
>>
>>
> Well, just a question of strategy.
> If we are happpy to define it each time we need a test-jar, that's fine.
> And btw, do we need test-jar for now?
>
> Haven't looked at all the code so i cannot say for all modules, but looks
like lifecycle module have nothing interesting/reusable in it's tests.


>
>>
>>>   To me it looks like the question is what
>>>
>>>> is easier to maintain - parent pom and exception in one project vs
>>>> repeated
>>>> (but trivial) configuration in multiple places. Implicit vs explicit.
>>>> Conserning proposed solution - i think it is acceptable and better than
>>>> alternative one. Also, it looks like a bug or at least as a thing to
>>>> improve in maven-jar-plugin - and fixing it there whould have been the
>>>> best
>>>> option.
>>>>
>>>>
>>> I will open a MAVEN JIRA for this.
>>>
>>>
>> I guess you wanted to say maven-jar-plugin jira [1] because the issue is
>> in
>> this plugin IMO?
>>
>>
> Yep
>
>  [1]: https://jira.codehaus.org/**browse/MJAR<https://jira.codehaus.org/browse/MJAR>
>>
>>

Re: [discuss] Enable src/test jars for snapshots

Posted by Eric Charles <er...@apache.org>.
On 09/02/2013 16:27, Mikhail Mazursky wrote:
>>>   2. Do you think the proposed solution is acceptable?
>>>>
>>>> If i understand correctly the issue, as an alternative solution it should
>>>>
>>> be possible to just disable maven-jar-plugin execution for that particular
>>> project with pom packaging type.
>>>
>>
>> Yes, disabling the maven-jar-plugin execution for pom packaging type would
>> be better.
>>
>> Do you know how to achieve this?
>
>
> It's easy - take a look at this example
> http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/

Sure, but in that case, we would still need to explictely define the 
maven-jar-plugin in the child modules.

What we need is a way to say in the parent (and only in the parent): 
'apply the jar packagin only for non pom type module'


> I agree with Simone - is there a need for test and test-sources artifacts
> first of all?
>

Well, just a question of strategy.
If we are happpy to define it each time we need a test-jar, that's fine. 
And btw, do we need test-jar for now?

>
>>
>>   To me it looks like the question is what
>>> is easier to maintain - parent pom and exception in one project vs
>>> repeated
>>> (but trivial) configuration in multiple places. Implicit vs explicit.
>>> Conserning proposed solution - i think it is acceptable and better than
>>> alternative one. Also, it looks like a bug or at least as a thing to
>>> improve in maven-jar-plugin - and fixing it there whould have been the
>>> best
>>> option.
>>>
>>
>> I will open a MAVEN JIRA for this.
>>
>
> I guess you wanted to say maven-jar-plugin jira [1] because the issue is in
> this plugin IMO?
>

Yep

> [1]: https://jira.codehaus.org/browse/MJAR
>

Re: [discuss] Enable src/test jars for snapshots

Posted by Mikhail Mazursky <mi...@gmail.com>.
2013/2/9 Eric Charles <er...@apache.org>

> On 09/02/2013 10:10, Mikhail Mazursky wrote:
>
>> Hi, Eric.
>>
>>
>> 2013/2/9 Eric Charles <er...@apache.org>
>>
>>  Hi,
>>>
>>> I have opened ONAMI-78  Enable the tests.jar sources.jar and
>>> test-sources.jar generation
>>>
>>> 1. Do you have interest/think it is logical to have this generation for
>>> snapshots?
>>>
>>>
>> I think it makes perfect sense.
>>
>>
>>  2. Do you think the proposed solution is acceptable?
>>>
>>> If i understand correctly the issue, as an alternative solution it should
>>>
>> be possible to just disable maven-jar-plugin execution for that particular
>> project with pom packaging type.
>>
>
> Yes, disabling the maven-jar-plugin execution for pom packaging type would
> be better.
>
> Do you know how to achieve this?


It's easy - take a look at this example
http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/
I agree with Simone - is there a need for test and test-sources artifacts
first of all?


>
>  To me it looks like the question is what
>> is easier to maintain - parent pom and exception in one project vs
>> repeated
>> (but trivial) configuration in multiple places. Implicit vs explicit.
>> Conserning proposed solution - i think it is acceptable and better than
>> alternative one. Also, it looks like a bug or at least as a thing to
>> improve in maven-jar-plugin - and fixing it there whould have been the
>> best
>> option.
>>
>
> I will open a MAVEN JIRA for this.
>

I guess you wanted to say maven-jar-plugin jira [1] because the issue is in
this plugin IMO?

[1]: https://jira.codehaus.org/browse/MJAR

Re: [discuss] Enable src/test jars for snapshots

Posted by Eric Charles <er...@apache.org>.
On 09/02/2013 10:10, Mikhail Mazursky wrote:
> Hi, Eric.
>
>
> 2013/2/9 Eric Charles <er...@apache.org>
>
>> Hi,
>>
>> I have opened ONAMI-78  Enable the tests.jar sources.jar and
>> test-sources.jar generation
>>
>> 1. Do you have interest/think it is logical to have this generation for
>> snapshots?
>>
>
> I think it makes perfect sense.
>
>
>> 2. Do you think the proposed solution is acceptable?
>>
>> If i understand correctly the issue, as an alternative solution it should
> be possible to just disable maven-jar-plugin execution for that particular
> project with pom packaging type.

Yes, disabling the maven-jar-plugin execution for pom packaging type 
would be better.

Do you know how to achieve this?

> To me it looks like the question is what
> is easier to maintain - parent pom and exception in one project vs repeated
> (but trivial) configuration in multiple places. Implicit vs explicit.
> Conserning proposed solution - i think it is acceptable and better than
> alternative one. Also, it looks like a bug or at least as a thing to
> improve in maven-jar-plugin - and fixing it there whould have been the best
> option.

I will open a MAVEN JIRA for this.

>
> Mikhail
>

Re: [discuss] Enable src/test jars for snapshots

Posted by Mikhail Mazursky <mi...@gmail.com>.
Hi, Eric.


2013/2/9 Eric Charles <er...@apache.org>

> Hi,
>
> I have opened ONAMI-78  Enable the tests.jar sources.jar and
> test-sources.jar generation
>
> 1. Do you have interest/think it is logical to have this generation for
> snapshots?
>

I think it makes perfect sense.


> 2. Do you think the proposed solution is acceptable?
>
> If i understand correctly the issue, as an alternative solution it should
be possible to just disable maven-jar-plugin execution for that particular
project with pom packaging type. To me it looks like the question is what
is easier to maintain - parent pom and exception in one project vs repeated
(but trivial) configuration in multiple places. Implicit vs explicit.
Conserning proposed solution - i think it is acceptable and better than
alternative one. Also, it looks like a bug or at least as a thing to
improve in maven-jar-plugin - and fixing it there whould have been the best
option.

Mikhail

Re: [discuss] Enable src/test jars for snapshots

Posted by Eric Charles <er...@apache.org>.
On 09/02/2013 13:01, Simone Tripodi wrote:
> Salut mon ami,
>
>> I have opened ONAMI-78  Enable the tests.jar sources.jar and
>> test-sources.jar generation
>>
>> 1. Do you have interest/think it is logical to have this generation for
>> snapshots?
>>
>
> while I am +1 for -sources and -javadoc - there are jobs on Jenkins
> that would upload them as well - I don' understand which is the
> benefit of distributing the -test* artifacts for Onami modules. Can
> you tell more, please?
> ATM I am -0 for -tests*
>

Just like anything else, I am just lazy and like to know that a test-jar 
is there is case I would need it. Andy maybe someone else will need it 
(for mocking by example...).

The other approach would be to explicitely generate that test-jar if a 
module needs it (I didn't look if this is already the case in trunk code).

But I even know people who don't like using test-jar from one module in 
another. Don't know what you think about it.

>> 2. Do you think the proposed solution is acceptable?
>
> Unneeded keeping the -test* artifacts out, it should be enough
> promoting the -sources and -javadoc plugins from release profile in
> the regular one.
>

If we don't generate test-jar, we would avoid the maven-jar-plugin issue.

However, I am -0 to enroll javadoc in the snapshot. The javadoc 
generation takes time, and I wouldn't want each time I 'mvn install' to 
wait long times for the javadoc to be generated.

> Waiting for your feedback, TIA and have a nice WE!
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>

Re: [discuss] Enable src/test jars for snapshots

Posted by Simone Tripodi <si...@apache.org>.
Salut mon ami,

> I have opened ONAMI-78  Enable the tests.jar sources.jar and
> test-sources.jar generation
>
> 1. Do you have interest/think it is logical to have this generation for
> snapshots?
>

while I am +1 for -sources and -javadoc - there are jobs on Jenkins
that would upload them as well - I don' understand which is the
benefit of distributing the -test* artifacts for Onami modules. Can
you tell more, please?
ATM I am -0 for -tests*

> 2. Do you think the proposed solution is acceptable?

Unneeded keeping the -test* artifacts out, it should be enough
promoting the -sources and -javadoc plugins from release profile in
the regular one.

Waiting for your feedback, TIA and have a nice WE!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/