Hi,
You can have a look at the site plugin 3.x branch [1] to understand
how to do it.
In the class DefaultMavenReportExecutor.java, you will see how to
"setup/prepare" a mojo.

[1] 
http://svn.apache.org/repos/asf/maven/plugins/branches/maven-site-plugin-3.x/

2010/9/17 Steffen <steffen.grunwald+so...@gmail.com>:
> Hello,
>
> I developed a mojo that can be used to execute executions by id with
> their individual configuration.
> This is needed to execute plugins seperately if they are configured
> twice (i.e. the sql execute plugin) in a project.
>
> With maven 3 this is now broken because of an
> UnsupportedOperationException of the deprecated PluginManager.
>
> Here's what I do:
> - I run maven in a project, passing the execution ids to my mojo
> - the mojo is checking the project's plugins for their configured executions
> - If the plugin has an execution configured I want to execute: I
> retrieve the plugin descriptor using the PluginManager
> (verifyPlugin()) and the Configuration from the Execution and create a
> MojoExecution
> - I execute the MojoExecution(s) with the PluginManager
> (executeMojo()). And BAAM! this is throwing the
> UnsupportedOperationException
>
> Is there a way introduced by Maven3 to execute executions by id (so I
> can get rid of my own plugin)?
> Is there an alternative way to execute the MojoExecution? I tried
> BuildPluginManager but this just won't do either.
>
> Thanks, Steffen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Olivier
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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

Reply via email to