[ 
http://jira.codehaus.org/browse/MNG-3712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158647#action_158647
 ] 

Yann Albou commented on MNG-3712:
---------------------------------

I just did the test with the last 3.0 SNAPSHOT and I still get the 
"java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory"

I did another test:
In the plugin that uses the AnnotationProcessorFactory class, instead of using 
the dependency:
{code}
    <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.5.12</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
{code}

I used the same dependency without the system scope :
{code}
    <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.5.12</version>
</dependency>
{code}
Of course, I deployed the artefact in my repository which is not a good 
practice for the tools.jar file...

Then this time it worked
So it seems the problem is linked to the system scope...

> [regression] java.lang.NoClassDefFoundError in maven-jaxb-schemagen-plugin
> --------------------------------------------------------------------------
>
>                 Key: MNG-3712
>                 URL: http://jira.codehaus.org/browse/MNG-3712
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 3.0-alpha-1
>            Reporter: Eugene Kuleshov
>            Priority: Blocker
>             Fix For: 3.0-alpha-3
>
>         Attachments: build.log, generate-schema.zip
>
>
> When running maven-jaxb-schemagen-plugin with Maven 2.1-SNAPSHOT and latest 
> 3.0-SNAPSHOT from trunk it fails with java.lang.NoClassDefFoundError. See 
> attached test project and debug log from the build.
> {noformat}
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> com/sun/mirror/apt/AnnotationProcessorFactory
>       at 
> com.sun.tools.jxc.maven2.SchemaGenMojo.execute(SchemaGenMojo.java:143)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:638)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:521)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:288)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:214)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:172)
>       at 
> org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
>       at 
> org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:303)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
>       at 
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
>       at 
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:303)
>       at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
>       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:597)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
>       at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to