Dawn:

That made just as much sense as it did before.
 
<inherited>false</inherited> in a <build><plugins /></build> at the ParentPom 
level would cause the plugin to only get run when I install ParentPom, and 
never when I install a ProjectPom.
 
I want it run when I install a ProjectPom, and no other times, but I want to 
specify it only *once*.
 
The projectPom still has
   <build>
      <plugins>
              <plugin>
                    <groupId>myPluginGroup</groupId>
                    <artifactId>myArtifactId</artifactId>
              </plugin>
       </plugins>
     </build>
as is required for execution, but i want it to get <inherited>false</inherited> 
from the configuration in ParentPom and not pass the plugin to it's children. 
Setting standard configuration options which are shared but only come into 
effect when a plugin is explicitly executed is what pluginManagement is for, 
isn't it?
 
If it just plain doesn't do that, that's fine. :)
 
Barrett
 
Barrett Nuzum
Consultant, Skill Development
[EMAIL PROTECTED]
T:  +1 (918) 640 4414
F:  +1 (972) 789 1340


Valtech
5080 Spectrum Drive Suite 700 West 
Addison, Texas 75001
USA
T: +1 (972) 789 1200

________________________________

From: dawn.angelito [mailto:[EMAIL PROTECTED]
Sent: Sat 11/11/2006 12:19 AM
To: users@maven.apache.org
Subject: RE: Plugin Annotation to control Inheritance




Hi Barrett,

Yes, that is correct. You should edit the parent POM. I can see that you've
specified the <inherited>false</inherited> in
<build><pluginManagement/></build>. Try adding this in the
<build><plugins/><build> instead.

The inherited tags are used to merge the parent pom and the child pom
(though no actual pom file is created, the pom object is created). The
resulting pom is the one that gets executed. So, if you don't inherit the
pluginManagement but inherit the plugin, it will still get executed. But if
you don't inherit the plugin, even if you inherit the pluginManagement, it
will not get executed.

Hope this makes more sense this time.

Dawn



Barrett.Nuzum wrote:
>
> Hi Dawn (and all).
> 
> We have 20-30 projects that share one, single parent POM.
> Each project has usually 7 modules in it.
> 
> To clarify:
>  ParentPom (1)
>      \-- ProjectPom (1..30)
>               \-- ModulePom (1..7, each)
>
> I did specify <inherited>false</inherited> in pluginManagement in the
> Parent POM, but it did not seem to work.
> 
> Only hardcoding inherited in each project POM seemed to have any effect
> whatsoever.
> 
> That doesn't answer the second part of my question, though -- why can't I
> configure the plugin the way the plugin API seems to be designed to
> intend?
> 
> Barrett
> 
> Barrett Nuzum
> Consultant, Skill Development
> [EMAIL PROTECTED]
> T:  +1 (918) 640 4414
> F:  +1 (972) 789 1340
>
>
> Valtech
> 5080 Spectrum Drive Suite 700 West
> Addison, Texas 75001
> USA
> T: +1 (972) 789 1200
>
> ________________________________
>
> From: dawn.angelito [mailto:[EMAIL PROTECTED]
> Sent: Fri 11/10/2006 1:15 AM
> To: users@maven.apache.org
> Subject: Re: Plugin Annotation to control Inheritance
>
>
>
>
> Hi Barrett,
>
> I'd like to clarify if you're referring to 20-30 submodules or 20-30
> projects that each has a parent POM? For the former, just specify
> <inherited>false</inherited> to the parent POM. But if you have 20-30
> different projects, I suggest that you create another project and include
> all these as subprojects. Afterwards, do the same thing, specify
> <inherited>false</inherited> to the parent POM.
>
> Hope this helps.
>
> Dawn
>
>
> Barrett.Nuzum wrote:
>>
>> Hi Maven mavens.
>>
>> OK -- my turn for a query.
>> I've written a plugin.   I do *not* want that plugin to be inherited by
>> children poms.
>>
>> Our design is like this:
>> ParentPom
>>     \-- ProjectPom
>>              \-- ModulePom (1..n)
>>
>> I want my plugin to be executed by the ProjectPom but not seen by the
>> ModulePoms.
>>
>> I can do this in XML in the POM by specifying
>> <inherited>false</inherited>
>> in ProjectPom.
>> The problem is that we have 20-30 ProjectPoms for different projects and
>> do not want to violate the DRY principle.
>> I *cannot* seem to do so by specifying that in the pluginManagement
>> section in ParentPom.
>> That would be sufficient.
>>
>> Even more frustrating, it seems plugin.xml has an <inheritedByDefault>
>> item --
>> I can't seem to put an annotation on the Mojo which is read by Maven
>> which
>> causes this to flip from true to false. @inheritedByDefault false should
>> be enough, I would think! Why every plugin.xml entity doesn't have an
>> associated annotation is beyond me.
>> (I also tried making my own plugin.xml and flip it manually, but that
>> didn't seem to work either - packaging maven-plugin overwrites it.)
>>
>> Can anyone provide any insight?
>>
>> Thanks in advance,
>>
>> Barrett
>>
>> Barrett Nuzum
>> Consultant, Skill Development
>> [EMAIL PROTECTED]
>> T:  +1 (918) 640 4414
>> F:  +1 (972) 789 1340
>>
>>
>> Valtech
>> 5080 Spectrum Drive Suite 700 West
>> Addison, Texas 75001
>> USA
>> T: +1 (972) 789 1200
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Plugin-Annotation-to-control-Inheritance-tf2604887s177.html#a7272346
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--
View this message in context: 
http://www.nabble.com/Plugin-Annotation-to-control-Inheritance-tf2604887s177.html#a7289932
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to