2013/2/9 Eric Charles <[email protected]> > 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> >> >>
