You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Nesbitt <sn...@cobaltgroup.com> on 2004/11/16 23:37:37 UTC

Q: How To Override a Goal

All:

What is the canonical way to override a goal?

Here's my situation. The include EJB task is problematic for me - 
for example it does not iterate over the build/resources items to 
include these in the EJB jar.

So, what's the best way to acquire that behavior? I could, I 
suppose, add a post goal and inject the resources into the already 
formed jar.

But what if it turns out I really do need to replace the included 
EJB goal/plugin with my own custom thingy?

Thanks!

-steve
-- 

Stephen Nesbitt
Senior Configuration Management Engineer
The Cobalt Group
206.219.8271
snesbitt@cobaltgroup.com

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


Re: Q: How To Override a Goal

Posted by Brett Porter <br...@gmail.com>.
You're right, I think it should honour it.

I haven't used it though, so I don't know if it does or not. A JIRA
bug would be dealt with appropriately.

- Brett


On Wed, 17 Nov 2004 09:11:40 -0800, Stephen Nesbitt
<sn...@cobaltgroup.com> wrote:
> Brett:
> 
> Thanks.
> 
> Is there any reason why the EJB task should ignore the resources
> element?
> 
> If not I would be glad to submit an enhancement request and patch.
> 
> -steve
> 
> 
> 
> On Tuesday 16 November 2004 14:48, Brett Porter wrote:
> > > So, what's the best way to acquire that behavior? I could, I
> > > suppose, add a post goal and inject the resources into the
> > > already formed jar.
> >
> > This is the correct behaviour.
> >
> > > But what if it turns out I really do need to replace the
> > > included EJB goal/plugin with my own custom thingy?
> >
> > Then do that - you can override goals. However, I -strongly-
> > recommend calling it something else, otherwise builders of your
> > project might get a surprise when it does something different.
> >
> > eg <goal name="build-custome-ear"/>
> >
> > - Brett
> 
> --
> 
> Stephen Nesbitt
> Senior Configuration Management Engineer
> The Cobalt Group
> 206.219.8271
> snesbitt@cobaltgroup.com
>

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


Re: Q: How To Override a Goal

Posted by Brett Porter <br...@gmail.com>.
> So, what's the best way to acquire that behavior? I could, I
> suppose, add a post goal and inject the resources into the already
> formed jar.

This is the correct behaviour.

> But what if it turns out I really do need to replace the included
> EJB goal/plugin with my own custom thingy?

Then do that - you can override goals. However, I -strongly- recommend
calling it something else, otherwise builders of your project might
get a surprise when it does something different.

eg <goal name="build-custome-ear"/>

- Brett

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