jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-122 clean up of exception handling, error...
  • MNG-345

bad plugin configuration errors out

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-alpha-1
  • Fix Version/s: 2.0-alpha-3
  • Component/s: Plugins and Lifecycle
  • Labels:
    None

Description

you get a trace from component composition if you mis type a configuration, instead of a helpful error.

eg, for jar Plugin:

<configuration>
<addClassPath>true<addClasspath>
</configuration>

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
John Casey added a comment - 05/May/05 1:23 PM

Added some formatting to the exception error message puked from the plexus container, and also in the project builder, where Xpp3 and IO exceptions are encountered...

Show
John Casey added a comment - 05/May/05 1:23 PM Added some formatting to the exception error message puked from the plexus container, and also in the project builder, where Xpp3 and IO exceptions are encountered...
Hide
Permalink
John Casey added a comment - 09/May/05 6:32 PM

this is another good candidate for ErrorDiagnoser. Such errors will come back as XPP3 errors, which means we can solve this problem by simply providing user-friendly feedback when the POM contains invalid XML.

Show
John Casey added a comment - 09/May/05 6:32 PM this is another good candidate for ErrorDiagnoser. Such errors will come back as XPP3 errors, which means we can solve this problem by simply providing user-friendly feedback when the POM contains invalid XML.
Hide
Permalink
Brett Porter added a comment - 09/May/05 6:38 PM

not what I meant actually - the XML above is valid, but addClasspath is not recognised as it is not a mojo parameter on the jar plugin.

Show
Brett Porter added a comment - 09/May/05 6:38 PM not what I meant actually - the XML above is valid, but addClasspath is not recognised as it is not a mojo parameter on the jar plugin.
Hide
Permalink
Brett Porter added a comment - 30/May/05 6:08 PM

ah, yes. Maybe ErrorDiagnoser. Here is what I get, but would prefer a BUILD FAILURE:

[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException: Error configuring plugin for execution of 'jar:jar'.
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:430)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(DefaultLifecycleExecutor.java:169)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:90)
at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:253)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:246)
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:303)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse the created DOM for plugin configuratio
n
at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:553)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:400)
... 13 more
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Class 'org.apache.maven.plugin.ja
r.JarMojo' does not contain a field named 'addClasspath'
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.getFieldByName(Obje
ctWithFieldsConverter.java:176)
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguratio
n(ObjectWithFieldsConverter.java:112)
at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfig
urator.java:54)
at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:548)
... 14 more

Show
Brett Porter added a comment - 30/May/05 6:08 PM ah, yes. Maybe ErrorDiagnoser. Here is what I get, but would prefer a BUILD FAILURE: [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- [ERROR] Cause: org.apache.maven.plugin.MojoExecutionException: Error configuring plugin for execution of 'jar:jar'. at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:430) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(DefaultLifecycleExecutor.java:169) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:90) at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:253) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167) at org.apache.maven.cli.MavenCli.main(MavenCli.java:246) 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:303) at org.codehaus.classworlds.Launcher.launch(Launcher.java:243) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416) at org.codehaus.classworlds.Launcher.main(Launcher.java:363) Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse the created DOM for plugin configuratio n at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:553) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:400) ... 13 more Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Class 'org.apache.maven.plugin.ja r.JarMojo' does not contain a field named 'addClasspath' at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.getFieldByName(Obje ctWithFieldsConverter.java:176) at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguratio n(ObjectWithFieldsConverter.java:112) at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfig urator.java:54) at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:548) ... 14 more
Hide
Permalink
Brett Porter added a comment - 08/Jun/05 1:45 AM

verified. This is ok, though I think we can still work on error reporting like this. There is still an open ticket for that.

Show
Brett Porter added a comment - 08/Jun/05 1:45 AM verified. This is ok, though I think we can still work on error reporting like this. There is still an open ticket for that.

People

  • Assignee:
    John Casey
    Reporter:
    Brett Porter
Vote (0)
Watch (0)

Dates

  • Created:
    22/Apr/05 6:30 PM
    Updated:
    01/Feb/06 2:43 PM
    Resolved:
    31/May/05 4:15 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.