Can you take a look at MET-INF/maven/plugin.xml (in the plugin, or
generated in target/classes). You should have both:
<parameter>
<name>project</name>
<type>org.apache.maven.project.MavenProject</type>
<required>true</required>
<editable>false</editable>
<description></description>
</parameter>
and
<project
implementation="org.apache.maven.project.MavenProject">${project}</project>
If these are correct my best guess is classloader issues, though I
don't know how that would come about.
What version of Maven are you using?
- Brett
On 10/2/05, dohadwala, moiz <[EMAIL PROTECTED]> wrote:
> Here's what I have for the plugin's configuration.
>
> <configuration>
> <filter>test</filter>
> <scope>all</scope>
> </configuration>
>
> -Moiz
>
> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 30, 2005 7:08 PM
> To: Maven Users List
> Subject: Re: [m2] exception with report plugin
>
> It seems you might have something like this in the pom:
>
> <configuration>
> <project> ... </project>
>
> which is not valid because the variable is readonly?
>
> - Brett
>
> On 10/1/05, dohadwala, moiz <[EMAIL PROTECTED]> wrote:
> > It's a field in my report class:
> >
> >
> > /**
> > * @parameter expression="${project}"
> > * @required
> > * @readonly
> > */
> > private MavenProject project;
> >
> > -Moiz
> >
> > -----Original Message-----
> > From: Allan Ramirez [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 29, 2005 4:50 PM
> > To: Maven Users List
> > Subject: Re: [m2] exception with report plugin
> >
> > Hi there,
> >
> > I am just curious on how did you get your MavenProject object, can you
> > post it?
> >
> > Regards,
> > -allan
> >
> > dohadwala, moiz wrote:
> >
> > >I have a plugin which I has been running without errors.
> > >
> > >I decided to convert it to a report plugin. I derived the Mojo from
> > >AbstractMavenReport and implemented the executeReport method and
> > >required other methods such as getName() etc.
> > >
> > >I included the plugin in the reporting section of the pom.
> > >
> > >I now get this error:
> > >[INFO] Diagnosis: Error configuring plugin for execution of
> > >'translator:depreport'.
> > >[INFO]
> > >---------------------------------------------------------------------
> > >--
> > >-----
> > >[ERROR] Cause:
> > >org.apache.maven.plugin.MojoExecutionException: Error configuring
> > >plugin for execution of 'translator:depreport'.
> > > at
> > >org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> > >nM
> > >anage
> > >r.java:353)
> > > at
> > >org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> > >ul
> > >tLife
> > >cycleExecutor.java:502)
> > > at
> > >org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
> > >Go
> > >al(De
> > >faultLifecycleExecutor.java:465)
> > > at
> > >org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> > >lt
> > >Lifec
> > >ycleExecutor.java:447)
> > > at
> > >org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> > >ts
> > >(Defa
> > >ultLifecycleExecutor.java:278)
> > > at
> > >org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> > >fe
> > >cycle
> > >Executor.java:136)
> > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
> > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:302)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > >ja
> > >va:39
> > >)
> > > at
> > >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > >so
> > >rImpl
> > >.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)
> > >Caused by: org.apache.maven.plugin.PluginConfigurationException:
> > >Unable to parse the created DOM for plugin configuration
> > > at
> > >org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(Def
> > >au
> > >ltPlu
> > >ginManager.java:1033)
> > > at
> > >org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
> > >tP
> > >lugin
> > >Manager.java:529)
> > > at
> > >org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> > >nM
> > >anage
> > >r.java:348)
> > > ... 15 more
> > >Caused by:
> >
> >org.codehaus.plexus.component.configurator.ComponentConfigurationException:
> > >Class 'org.apache.maven.project.MavenProject' cannot be instantiated
> > > at
> > >org.codehaus.plexus.component.configurator.converters.AbstractConfigu
> > >ra
> > >tionC
> > >onverter.instantiateObject(AbstractConfigurationConverter.java:121)
> > > at
> > >org.codehaus.plexus.component.configurator.converters.composite.Objec
> > >tW
> > >ithFi
> > >eldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:85)
> > > at
> > >org.codehaus.plexus.component.configurator.converters.ComponentValueS
> > >et
> > >ter.c
> > >onfigure(ComponentValueSetter.java:252)
> > > at
> > >org.codehaus.plexus.component.configurator.converters.composite.Objec
> > >tW
> > >ithFi
> > >eldsConverter.processConfiguration(ObjectWithFieldsConverter.java:116)
> > > at
> > >org.codehaus.plexus.component.configurator.BasicComponentConfigurator
> > >.c
> > >onfig
> > >ureComponent(BasicComponentConfigurator.java:55)
> > > at
> > >org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(Def
> > >au
> > >ltPlu
> > >ginManager.java:1028)
> > > ... 17 more
> > >Caused by: java.lang.InstantiationException:
> > >org.apache.maven.project.MavenProject
> > > at java.lang.Class.newInstance0(Class.java:335)
> > > at java.lang.Class.newInstance(Class.java:303)
> > > at
> > >org.codehaus.plexus.component.configurator.converters.AbstractConfigu
> > >ra
> > >tionC
> > >onverter.instantiateObject(AbstractConfigurationConverter.java:111)
> > > ... 22 more
> > >
> > >
> > >
> > >Is there something special that needs to be done for a report plugin?
> > >
> > >-Moiz
> > >
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >--
> > >-
> > >
> > >No virus found in this incoming message.
> > >Checked by AVG Anti-Virus.
> > >Version: 7.0.344 / Virus Database: 267.11.8/114 - Release Date:
> > >9/28/2005
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]