maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Chang <>
Subject Re: Get "java.lang.NoClassDefFoundError" though the class is in the classpath
Date Thu, 08 Sep 2011 13:09:51 GMT

You are right. After I move the dependency into the plugin section, it works.

Many thanks!


--- Wayne Fay <> schrieb am Mi, 7.9.2011:

Von: Wayne Fay <>
Betreff: Re: Get "java.lang.NoClassDefFoundError" though the class is in the classpath
An: "Maven Users List" <>
Datum: Mittwoch, 7. September, 2011 16:18 Uhr

> I know the class "com.sun.mirror.apt.AnnotationProcessorFactory" is in the tools.jar
so I've add the dependency in the pom.xml as follow:
>             <systemPath>C:/Program Files/Java/jdk1.7.0/lib/tools.jar</systemPath>
> As I run mvn dependency:build-classpath to check the included jars I can see the tools.jar
in included.

You probably don't want this in your build classpath but perhaps added
to the classpath of the jaxws plugin, right? Move the dependency there
and try again with mvn -X to see the full classpath used for that
plugin execution.


To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message