Hi.

I'm struggling to make my plugin work.
It is a 1:1 copy of the http://maven-jaxb1-plugin.dev.java.net/ ported onto jaxb2. I'm getting 'Unable to find the mojo' error and the stack trace shows that I have a ClassNotFoundException.

I have hot no idea why.

The class is clearly in the jar and the jar is clearly in the realms...

Does anyone have any suggestions on how could I debug this stuff? What may be possibly wrong?

I'd be grateful for any help. Just can't resolve this myself.

Bye.
/lexi





+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from: 'C:\Dokumente und Einstellungen\valikov\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'C:\Maven\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[DEBUG] Searching for parent-POM: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests::0.1 of project: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-po:jar:null in relative path: ../pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../pom.xml' for project: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-po:jar:null [DEBUG] Searching for parent-POM: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-project::0.1 of project: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests:pom:null in relative path: ../pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../pom.xml' for project: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests:pom:null
[INFO] 
----------------------------------------------------------------------------
[INFO] Building JAXB-2.x Maven-2 Plugin Tests [po]
[INFO]    task-segment: [clean, install]
[INFO] 
----------------------------------------------------------------------------
[DEBUG] maven-clean-plugin: resolved to version 2.1 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0 for project: null:maven-clean-plugin:maven-plugin:2.1 from the repository.
[DEBUG] maven-jaxb2-plugin: resolved to version 0.1 from local repository
[DEBUG] Retrieving parent-POM: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-project::0.1 for project: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:maven-plugin:0.1 from the repository. [DEBUG] org.apache.maven.plugins:maven-clean-plugin:maven-plugin:2.1:runtime (selected for runtime) [DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project: org.apache.maven:maven-plugin-api:jar:2.0 from the repository.
[DEBUG]   org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for 
runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven.shared:shared-components-parent::1 for project: null:file-management:jar:1.0 from the repository. [DEBUG] org.apache.maven.shared:file-management:jar:1.0:runtime (selected for runtime) [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.1:clean' 
-->
[DEBUG]   (f) directory = 
C:\Projects\p2.external\maven-jaxb2-plugin\tests\po\target
[DEBUG] (f) outputDirectory = C:\Projects\p2.external\maven-jaxb2-plugin\tests\po\target\classes [DEBUG] (f) testOutputDirectory = C:\Projects\p2.external\maven-jaxb2-plugin\tests\po\target\test-classes
[DEBUG] -- end configuration --
[INFO] [clean:clean]
[INFO] Deleting directory 
C:\Projects\p2.external\maven-jaxb2-plugin\tests\po\target
[DEBUG] Found deletable paths: []
[INFO] Deleting directory C:\Projects\p2.external\maven-jaxb2-plugin\tests\po\target\classes
[DEBUG] Found deletable paths: []
[INFO] Deleting directory C:\Projects\p2.external\maven-jaxb2-plugin\tests\po\target\test-classes
[DEBUG] Found deletable paths: []
[DEBUG] maven-resources-plugin: resolved to version 2.2 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-resources-plugin:maven-plugin:2.2 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] maven-compiler-plugin: resolved to version 2.0.1 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-compiler-plugin:maven-plugin:2.0.1 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] maven-surefire-plugin: resolved to version 2.2 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for project: null:maven-surefire-plugin:maven-plugin:2.2 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project: org.apache.maven.plugins:maven-plugins:pom:1 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache::1 for project: org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] maven-jar-plugin: resolved to version 2.0 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0 for project: null:maven-jar-plugin:maven-plugin:2.0 from the repository.
[DEBUG] maven-install-plugin: resolved to version 2.1 from repository central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugin-parent::2.0 for project: null:maven-install-plugin:maven-plugin:2.1 from the repository. [DEBUG] org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-po:jar:0.1 (selected for null) [DEBUG] org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:0.1:compile (selected for compile)
[DEBUG]     com.sun.xml.bind:jaxb-impl:jar:2.0:compile (selected for compile)
[DEBUG]       javax.xml.bind:activation:jar:1.0.2:compile (selected for compile)
[DEBUG]       javax.xml.bind:jsr173_api:jar:1.0:compile (selected for compile)
[DEBUG]       javax.xml.bind:jaxb-api:jar:2.0:compile (selected for compile)
[DEBUG]         javax.activation:activation:jar:1.1:compile (selected for 
compile)
[DEBUG] javax.activation:activation:jar:1.1:compile (removed - causes a cycle in the graph)
[DEBUG]     javax.xml.bind:jsr173_api:jar:1.0:compile (selected for compile)
[DEBUG]     javax.activation:activation:jar:1.1:compile (selected for compile)
[DEBUG] javax.activation:activation:jar:1.1:compile (removed - causes a cycle in the graph)
[DEBUG]     com.sun.xml.bind:jaxb-xjc:jar:2.0:compile (selected for compile)
[DEBUG]     javax.xml.bind:jaxb-api:jar:2.0:compile (selected for compile)
[DEBUG] org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:maven-plugin:0.1:runtime (selected for runtime)
[DEBUG]   com.sun.xml.bind:jaxb-impl:jar:2.0:runtime (selected for runtime)
[DEBUG]     javax.xml.bind:activation:jar:1.0.2:runtime (selected for runtime)
[DEBUG]     javax.xml.bind:jsr173_api:jar:1.0:runtime (selected for runtime)
[DEBUG]     javax.xml.bind:jaxb-api:jar:2.0:runtime (selected for runtime)
[DEBUG]       javax.activation:activation:jar:1.1:runtime (selected for runtime)
[DEBUG] javax.activation:activation:jar:1.1:runtime (removed - causes a cycle in the graph)
[DEBUG]   javax.xml.bind:jsr173_api:jar:1.0:runtime (selected for runtime)
[DEBUG]   javax.xml.bind:jaxb-api:jar:2.0:runtime (selected for runtime)
[DEBUG]     javax.activation:activation:jar:1.1:runtime (selected for runtime)
[DEBUG] javax.activation:activation:jar:1.1:runtime (removed - causes a cycle in the graph)
[DEBUG]   javax.activation:activation:jar:1.1:runtime (selected for runtime)
[DEBUG] javax.activation:activation:jar:1.1:runtime (removed - causes a cycle in the graph)
[DEBUG]   com.sun.xml.bind:jaxb-xjc:jar:2.0:runtime (selected for runtime)
-----------------------------------------------------
this realm = app0.child-container[org.jvnet.jaxb2.maven2:maven-jaxb2-plugin]
urls[0] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin/0.1/maven-jaxb2-plugin-0.1.jar urls[1] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/com/sun/xml/bind/jaxb-impl/2.0/jaxb-impl-2.0.jar urls[2] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar urls[3] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/javax/xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar urls[4] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/javax/xml/bind/activation/1.0.2/activation-1.0.2.jar urls[5] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar urls[6] = file:/C:/Dokumente und Einstellungen/valikov/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.0/jaxb-xjc-2.0.jar
Number of imports: 0


this realm = plexus.core.maven
urls[0] = file:/C:/Maven/lib/commons-cli-1.0.jar
urls[1] = file:/C:/Maven/lib/doxia-sink-api-1.0-alpha-7.jar
urls[2] = file:/C:/Maven/lib/jsch-0.1.24.jar
urls[3] = file:/C:/Maven/lib/maven-artifact-2.0.4.jar
urls[4] = file:/C:/Maven/lib/maven-artifact-manager-2.0.4.jar
urls[5] = file:/C:/Maven/lib/maven-core-2.0.4.jar
urls[6] = file:/C:/Maven/lib/maven-error-diagnostics-2.0.4.jar
urls[7] = file:/C:/Maven/lib/maven-model-2.0.4.jar
urls[8] = file:/C:/Maven/lib/maven-monitor-2.0.4.jar
urls[9] = file:/C:/Maven/lib/maven-plugin-api-2.0.4.jar
urls[10] = file:/C:/Maven/lib/maven-plugin-descriptor-2.0.4.jar
urls[11] = file:/C:/Maven/lib/maven-plugin-parameter-documenter-2.0.4.jar
urls[12] = file:/C:/Maven/lib/maven-plugin-registry-2.0.4.jar
urls[13] = file:/C:/Maven/lib/maven-profile-2.0.4.jar
urls[14] = file:/C:/Maven/lib/maven-project-2.0.4.jar
urls[15] = file:/C:/Maven/lib/maven-reporting-api-2.0.4.jar
urls[16] = file:/C:/Maven/lib/maven-repository-metadata-2.0.4.jar
urls[17] = file:/C:/Maven/lib/maven-settings-2.0.4.jar
urls[18] = file:/C:/Maven/lib/plexus-interactivity-api-1.0-alpha-4.jar
urls[19] = file:/C:/Maven/lib/wagon-file-1.0-alpha-7.jar
urls[20] = file:/C:/Maven/lib/wagon-http-lightweight-1.0-alpha-6.jar
urls[21] = file:/C:/Maven/lib/wagon-provider-api-1.0-alpha-6.jar
urls[22] = file:/C:/Maven/lib/wagon-ssh-1.0-alpha-7.jar
urls[23] = file:/C:/Maven/lib/wagon-ssh-external-1.0-alpha-6.jar
Number of imports: 0


this realm = plexus.core
urls[0] = file:/C:/Maven/core/plexus-container-default-1.0-alpha-9.jar
urls[1] = file:/C:/Maven/core/plexus-utils-1.1.jar
Number of imports: 0
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.1:generate': Unable to find the mojo 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.1:generate' in the plugin 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin'
org.jvnet.jaxb2.maven2.XJC2Mojo
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.1:generate': Unable to find the mojo 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.1:generate' in the plugin 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:538) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        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: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.PluginManagerException: Unable to find the mojo 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.1:generate' in the plugin 'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin' at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:533) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:390) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.1:generate', it could not be created at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440) at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:524)
        ... 18 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component: role: 'null', implementation: 'org.jvnet.jaxb2.maven2.XJC2Mojo' at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77) at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:54) at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464) at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93) at org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentManager.java:48) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
        ... 20 more
Caused by: java.lang.ClassNotFoundException: org.jvnet.jaxb2.maven2.XJC2Mojo
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
        at 
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
        at 
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
        at 
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:30)
        ... 24 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Sep 08 22:16:13 CEST 2006
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to