You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by aldana <al...@gmx.de> on 2009/10/17 01:47:54 UTC

'Invalid or missing parameters' problem when running plugin

hi,

i am using mojo-executor extension (http://code.google.com/p/mojo-executor/)
which i use for my custom plugin to call up jetty-maven-plugin.

problem is that somehow properties are getting overridden, when the jetty
plugin is called up:
 org.mortbay.jetty:maven-jetty-plugin. Reason: Invalid or missing
parameters: [Mojo parameter [name: 'project'; alias: 'null']] for mojo:
org.mortbay.jetty:maven-jetty-plugin:6.1.16:run

could it be that mojo-executor isn't passing through the ${project} variable
to jetty-plugin correctly? the error message tells me that it cannot find
the ${project} parameter doesn't it?

-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/%27Invalid-or-missing-parameters%27-problem-when-running-plugin-tp25933885p25933885.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: 'Invalid or missing parameters' problem when running plugin

Posted by aldana <al...@gmx.de>.
I found the reason, I had a look at the maven jetty plugin source code and it
says:

    /**
     * The maven project.
     *
     * @parameter expression="${executedProject}"
     * @required
     * @readonly
     */
    protected MavenProject project;


Unfortunately the stack trace doesn't say something about missing param
'${executedProject}', but  the fieldname. Still it is unclear to me what is
setting the parameter ${executedProject} before running the jetty:run goal.

First I thought it would be triggered by package-type war, but this isn't
the case. 

How can I find out where certain property settings is coming from or what
plugin was setting it (could not see anything through 'mvn -X -e')?

thanks.  



aldana wrote:
> 
> hi,
> 
> i am using mojo-executor extension
> (http://code.google.com/p/mojo-executor/) which i use for my custom plugin
> to call up jetty-maven-plugin.
> 
> problem is that somehow properties are getting overridden, when the jetty
> plugin is called up:
>  org.mortbay.jetty:maven-jetty-plugin. Reason: Invalid or missing
> parameters: [Mojo parameter [name: 'project'; alias: 'null']] for mojo:
> org.mortbay.jetty:maven-jetty-plugin:6.1.16:run
> 
> could it be that mojo-executor isn't passing through the ${project}
> variable to jetty-plugin correctly? the error message tells me that it
> cannot find the ${project} parameter doesn't it?
> 


-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/%27Invalid-or-missing-parameters%27-problem-when-running-plugin-tp25933885p25983426.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: 'Invalid or missing parameters' problem when running plugin

Posted by aldana <al...@gmx.de>.
ok, i got one step further.

${executedProject} is injected by plexus and related to the @execute mojo
tag. adding it made the ${executedProject} available.

see also
http://www.docjar.com/docs/api/org/apache/maven/plugin/AbstractMojo.html
under execute entry.


aldana wrote:
> 
> hi,
> 
> i am usingthe mojo-executor extension
> (http://code.google.com/p/mojo-executor/) which i use for my custom plugin
> to call up jetty-maven-plugin.
> 
> problem is that somehow properties are getting overridden, when the jetty
> plugin is called up:
>  org.mortbay.jetty:maven-jetty-plugin. Reason: Invalid or missing
> parameters: [Mojo parameter [name: 'project'; alias: 'null']] for mojo:
> org.mortbay.jetty:maven-jetty-plugin:6.1.16:run
> 
> could it be that mojo-executor isn't passing through the ${project}
> variable to jetty-plugin correctly? the error message tells me that it
> cannot find the ${project} parameter doesn't it?
> 


-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
-- 
View this message in context: http://www.nabble.com/%27Invalid-or-missing-parameters%27-problem-when-running-plugin-tp25933885p25983697.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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