You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jsolderitsch <js...@gestalt-llc.com> on 2007/03/13 15:27:07 UTC

Re: [m2] JAX-WS plugin apt NoClassDefFound error

OK -- I have a workaround -- it has to do with an unfortunate tools.jar
dependency that used to be in the POM for the JAX-WS plugin, that Dan, the
plugin maintainer, recently removed to address a concern that us Mac OS X
users had regarding the complete absence of this jar in the Mac JDK.

I added the dependency:

    <dependency>
	<groupId>com.sun</groupId>
	<artifactId>tools</artifactId>
	<scope>system</scope>
	<version>1.5</version>
	<systemPath>${java.home}/../lib/tools.jar</systemPath>
    </dependency>

to the POM for the plugin and now the build completes.

But this entry is platform specific (will not work for OS X users). I do not
needed the dependency on the Mac platform and if it is there, Mac builds
will fail.

What to do?

Jim


jsolderitsch wrote:
> 
> I am trying to use the latest snapshot of the JAX-WS plugin.
> 
> I have it working on Mac OS X.
> 
> I have a fresh install of maven and my project on a Windows XP box.
> 
> When I kick off the install goal, it chugs along for awhile and then I
> see:
> 
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] com/sun/mirror/apt/AnnotationProcessorFactory
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NoClassDefFoundError:
> com/sun/mirror/apt/AnnotationProcessorFactory
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> 
> ETC.
> 
> I must be missing a dependency -- what is it?
> 
> Jim
> 

-- 
View this message in context: http://www.nabble.com/JAX-WS-plugin-apt-NoClassDefFound-error-tf3396095s177.html#a9455609
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] JAX-WS plugin apt NoClassDefFound error

Posted by jsolderitsch <js...@gestalt-llc.com>.
Thanks.

Turns out that in my project POM file, if I add a <dependencies><dependency>
section right below the <version> tag for the plugin and place the tools.jar
dependency there, I don't need to modify the POM for the plugin.

I had tried this before but placed the added dependencies section AFTER the
<executions> section and this didn't work for me. Adding the dependency
BEFORE the <executions> section however does work.

Jim


dan tran wrote:
> 
> use maven profile
> 
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
> -D
> 
> 

-- 
View this message in context: http://www.nabble.com/JAX-WS-plugin-apt-NoClassDefFound-error-tf3396095s177.html#a9459700
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] JAX-WS plugin apt NoClassDefFound error

Posted by Dan Tran <da...@gmail.com>.
use maven profile

http://maven.apache.org/guides/introduction/introduction-to-profiles.html
-D


On 3/13/07, jsolderitsch <js...@gestalt-llc.com> wrote:
>
>
> OK -- I have a workaround -- it has to do with an unfortunate tools.jar
> dependency that used to be in the POM for the JAX-WS plugin, that Dan, the
> plugin maintainer, recently removed to address a concern that us Mac OS X
> users had regarding the complete absence of this jar in the Mac JDK.
>
> I added the dependency:
>
>    <dependency>
>        <groupId>com.sun</groupId>
>        <artifactId>tools</artifactId>
>        <scope>system</scope>
>        <version>1.5</version>
>        <systemPath>${java.home}/../lib/tools.jar</systemPath>
>    </dependency>
>
> to the POM for the plugin and now the build completes.
>
> But this entry is platform specific (will not work for OS X users). I do
> not
> needed the dependency on the Mac platform and if it is there, Mac builds
> will fail.
>
> What to do?
>
> Jim
>
>
> jsolderitsch wrote:
> >
> > I am trying to use the latest snapshot of the JAX-WS plugin.
> >
> > I have it working on Mac OS X.
> >
> > I have a fresh install of maven and my project on a Windows XP box.
> >
> > When I kick off the install goal, it chugs along for awhile and then I
> > see:
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] FATAL ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] com/sun/mirror/apt/AnnotationProcessorFactory
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Trace
> > java.lang.NoClassDefFoundError:
> > com/sun/mirror/apt/AnnotationProcessorFactory
> >         at java.lang.ClassLoader.defineClass1(Native Method)
> >         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> >         at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> >
> > ETC.
> >
> > I must be missing a dependency -- what is it?
> >
> > Jim
> >
>
> --
> View this message in context:
> http://www.nabble.com/JAX-WS-plugin-apt-NoClassDefFound-error-tf3396095s177.html#a9455609
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>