On 10/20/05, jerome lacoste <[EMAIL PROTECTED]> wrote:
> When I mark the following plugin in phase package, it works OK.
> When I mark it in a phase before 'package' (e.g. compile), project
> parameter is null while the debug log shows that the configuration was
> done properly.
>
> If I add a @required, same thing.
>
> Here's the mojo:
>
> * @phase package
> * @requiresProject
> */
> public class JnlpMojo
> extends AbstractWarMojo
> {
>
I've found a work-around. Althought the abstract base class defines a
project parameter, it isn't visible in my plugin. I thus create a new
parameter, project2 which is now visible.
The following code:
getLog().debug( "project " + this.getProject() ); // from base class
getLog().debug( "project2 " + this.project2 );
will display:
[DEBUG] project null
[DEBUG] project2 [EMAIL PROTECTED]
This loooks like an m2 bug.
I don't understand why, because the WarMojo does exactly the same thing.
Maybe because I have a different package name than the base class?
Why does it work with the package phase?
Cheers,
jerome
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]