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(DefaultPluginM
>anage
>r.java:353)
> at
>org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defaul
>tLife
>cycleExecutor.java:502)
> at
>org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGo
>al(De
>faultLifecycleExecutor.java:465)
> at
>org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Default
>Lifec
>ycleExecutor.java:447)
> at
>org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
>(Defa
>ultLifecycleExecutor.java:278)
> at
>org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLife
>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(DelegatingMethodAccesso
>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(Defau
>ltPlu
>ginManager.java:1033)
> at
>org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultP
>lugin
>Manager.java:529)
> at
>org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginM
>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.AbstractConfigura
>tionC
>onverter.instantiateObject(AbstractConfigurationConverter.java:121)
> at
>org.codehaus.plexus.component.configurator.converters.composite.ObjectW
>ithFi
>eldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:85)
> at
>org.codehaus.plexus.component.configurator.converters.ComponentValueSet
>ter.c
>onfigure(ComponentValueSetter.java:252)
> at
>org.codehaus.plexus.component.configurator.converters.composite.ObjectW
>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(Defau
>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.AbstractConfigura
>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]