Re: Maven-sar plugin changes

Mauro Talevi <[email protected]>
Newsgroups gmane.comp.java.jcontainer.interest
Message-ID <[email protected]>
Peter Donald wrote:

> 
> Unless I am mistaken it will only occur if they have explicitly set the 
> maven.sar.metagenerate yo true and have added a dependency on the plugin.
> 
> I can't see a reason why they would add a dependency on plugin without 
> generating metadata.
>

Yes, but once the plugin has been installed, it applies the postGoal
to *all* java:compile, regardless of the fact that it is invoked in a
project that has the sar plugin as a dependency.
So it ends up being used in other projects that have no need for it.
And I think this is counterintuitive - and could also be annoying.

> You could add the postGoal to every ptoject that requires metadata generation. 
> I can definetly do that if you want.

how about we try to keep it automatised but turn the thing on its head.
ie have a dependency structure like:

    <goal name="sar:metagenerate" prereqs="java:compile"/>
    <goal name="sar:sar" prereqs="sar:metagenerate, jar:jar"/>

in this way, someone wanting to compile and generate descriptors would
call the sar:metagenerate goal in place of java:compile.

Also, I've removed sar:init - all the variables required by plugin are 
set globally and the tasks are defined on demand in goals.

Cheers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.