maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerome lacoste <jerome.laco...@gmail.com>
Subject plugin configuration && execution seem to have different parameter values
Date Thu, 20 Oct 2005 10:41:05 GMT
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
{

    /**
     * Project.
     *
     * @parameter expression="${project}"
     * @readonly
     */
    private MavenProject project;
[...]



Here's the execution


[DEBUG]   (s) project = org.apache.maven.project.MavenProject@f79ffcb3
[...]
[DEBUG] -- end configuration --
[INFO] [webstart:jnlp {execution: default}]
[DEBUG] project null
[INFO] ----------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] null
[INFO] ----------------------------------------------------------------------------
[DEBUG] Trace
java.lang.NullPointerException
        at org.codehaus.mojo.webstart.JnlpMojo.checkInput(JnlpMojo.java:763)
        at org.codehaus.mojo.webstart.JnlpMojo.execute(JnlpMojo.java:229)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 5 seconds

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


Mime
View raw message