You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Laird Nelson <lj...@gmail.com> on 2011/05/03 19:01:15 UTC

Preventing an inherited plugin from running?

I have a parent pom that has a plugin specified in its build section.  The
plugin is bound to the package phase.

In my child POM, I would like to somehow configure the child project so that
this plugin does NOT run.

It smells to me like this is (oddly) impossible.  Is there a way to unbind a
plugin from a phase?

Thanks,
Laird

Re: Preventing an inherited plugin from running?

Posted by Anders Hammar <an...@hammar.net>.
Seems to be working with Maven 3 as well, which kind of surprises me. I was
expecting at least a warning that the phase doesn't exist...

However, I'd say that if the plugin has a skip param it is better to use
that because it is easier to understand. Specifying an incorrect phase is
not obvious to a new user, which the comment to the blog post exemplifies.

/Anders

On Wed, May 4, 2011 at 01:56, Srinath C <sr...@gmail.com> wrote:

> Hi Laird,
>
> I guess this is what you are looking for -
>
> http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/
>
> <
> http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/
> >
> Regards,
> Srinath.
>
> On Tue, May 3, 2011 at 10:54 PM, Laird Nelson <lj...@gmail.com> wrote:
>
> > Rats; thanks.  I have to inherit from this parent, but the parent was
> badly
> > designed (and is out of my control).  It wants to run the
> > maven-antrun-plugin, but I don't need a build.xml file.  I suppose I'll
> > just
> > eliminate the build.xml file and let it fly and see if it handles such a
> > case gracefully.
> >
> > Best,
> > Laird
> >
> > On Tue, May 3, 2011 at 1:03 PM, Wendy Smoak <ws...@gmail.com> wrote:
> >
> > > On Tue, May 3, 2011 at 1:01 PM, Laird Nelson <lj...@gmail.com>
> wrote:
> > > > I have a parent pom that has a plugin specified in its build section.
> > >  The
> > > > plugin is bound to the package phase.
> > > >
> > > > In my child POM, I would like to somehow configure the child project
> so
> > > that
> > > > this plugin does NOT run.
> > >
> > > It would help to know which plugin.  Check to see if it has a "skip"
> > > parameter that you can configure in the child.
> > >
> > > Otherwise, you can't really "un-inherit" things.
> > >
> > > --
> > > Wendy
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: Preventing an inherited plugin from running?

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, May 3, 2011 at 7:56 PM, Srinath C <sr...@gmail.com> wrote:

> Hi Laird,
>
> I guess this is what you are looking for -
>
> http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/
>
> <
> http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/
> >
> Regards,
> Srinath.
>

Thank you!  Unconstrained magic text values FTW!

Best,
Laird

Re: Preventing an inherited plugin from running?

Posted by Srinath C <sr...@gmail.com>.
Hi Laird,

I guess this is what you are looking for -
http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/

<http://thomaswabner.wordpress.com/2010/02/16/howto-disable-inherited-maven-plugin/>
Regards,
Srinath.

On Tue, May 3, 2011 at 10:54 PM, Laird Nelson <lj...@gmail.com> wrote:

> Rats; thanks.  I have to inherit from this parent, but the parent was badly
> designed (and is out of my control).  It wants to run the
> maven-antrun-plugin, but I don't need a build.xml file.  I suppose I'll
> just
> eliminate the build.xml file and let it fly and see if it handles such a
> case gracefully.
>
> Best,
> Laird
>
> On Tue, May 3, 2011 at 1:03 PM, Wendy Smoak <ws...@gmail.com> wrote:
>
> > On Tue, May 3, 2011 at 1:01 PM, Laird Nelson <lj...@gmail.com> wrote:
> > > I have a parent pom that has a plugin specified in its build section.
> >  The
> > > plugin is bound to the package phase.
> > >
> > > In my child POM, I would like to somehow configure the child project so
> > that
> > > this plugin does NOT run.
> >
> > It would help to know which plugin.  Check to see if it has a "skip"
> > parameter that you can configure in the child.
> >
> > Otherwise, you can't really "un-inherit" things.
> >
> > --
> > Wendy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Preventing an inherited plugin from running?

Posted by Laird Nelson <lj...@gmail.com>.
Rats; thanks.  I have to inherit from this parent, but the parent was badly
designed (and is out of my control).  It wants to run the
maven-antrun-plugin, but I don't need a build.xml file.  I suppose I'll just
eliminate the build.xml file and let it fly and see if it handles such a
case gracefully.

Best,
Laird

On Tue, May 3, 2011 at 1:03 PM, Wendy Smoak <ws...@gmail.com> wrote:

> On Tue, May 3, 2011 at 1:01 PM, Laird Nelson <lj...@gmail.com> wrote:
> > I have a parent pom that has a plugin specified in its build section.
>  The
> > plugin is bound to the package phase.
> >
> > In my child POM, I would like to somehow configure the child project so
> that
> > this plugin does NOT run.
>
> It would help to know which plugin.  Check to see if it has a "skip"
> parameter that you can configure in the child.
>
> Otherwise, you can't really "un-inherit" things.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Preventing an inherited plugin from running?

Posted by Wendy Smoak <ws...@gmail.com>.
On Tue, May 3, 2011 at 1:01 PM, Laird Nelson <lj...@gmail.com> wrote:
> I have a parent pom that has a plugin specified in its build section.  The
> plugin is bound to the package phase.
>
> In my child POM, I would like to somehow configure the child project so that
> this plugin does NOT run.

It would help to know which plugin.  Check to see if it has a "skip"
parameter that you can configure in the child.

Otherwise, you can't really "un-inherit" things.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org