Hi Thomas,

I've been following this thread across from the m2e users list.

As you appear to be using Java 7, you had a long list of dependencies in your 
pom that are not needed, as they are provided by the JDK (since about 1.6.03 or 
thereabouts). So, be sure to get rid of the all of the jax-ws and jaxb 
dependencies that you have there.

We're using the jax-ws plugin for wsimport like this:

           <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>jaxws-maven-plugin</artifactId>
                <version>1.12</version>
               <executions>
                   <execution>
                       <goals>
                           <goal>wsimport</goal>
                       </goals>
                       <configuration>
                           
<wsdlDirectory>${project.build.directory}/wsdl</wsdlDirectory>
                           
<wsdlLocation>META-INF/wsdl/InsurancePolicyService.wsdl</wsdlLocation>
                           <extension>true</extension>
                           <target>2.1</target>
                           <xadditionalHeaders>true</xadditionalHeaders>
                       </configuration>
                   </execution>
               </executions>
           </plugin>

and that's all we need in a JDK 6 environment. There are no other dependencies 
needed for the plugin or the application code. In particular, there is no 
"tools.jar" system dependency.

Cheers,

Steve C


On 09/09/2011, at 4:05 PM, Thomas Chang wrote:

> But using the option -X doesn't tell me to move the <dependency/> into the 
> <plugin/> section, right? :-/
> 
> 
> 
> --- Wayne Fay <[email protected]> schrieb am Do, 8.9.2011:
> 
> Von: Wayne Fay <[email protected]>
> Betreff: Re: Get "java.lang.NoClassDefFoundError" though the class is in the 
> classpath
> An: "Maven Users List" <[email protected]>
> Datum: Donnerstag, 8. September, 2011 22:49 Uhr
> 
>> You are right. After I move the dependency into the plugin section, it works.
> 
> For future use, the -X is a parameter that turns on debug mode. So
> instead of "mvn compile" you run "mvn -X compile". The error message
> you got said basically "you didn't tell me what to do with this
> project so I will quit now."
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to