title: Maven jaxws plugin fails with java.lang.UnsupportedClassVersionError: Bad version number in .class file
body: <p>I am trying to compile an old project that uses JDK 1.5.0_13 with Maven 2.2.1. </p>
  
  <p>The 'jaxws-maven-plugin' fails with this message:</p>
  
  <pre><code>[INFO] Processing: com.xyzzy.sydemas.facade.SydemasFacadeImpl
  [INFO] jaxws:wsgen args: [-keep, -s, C:\Development\www\workspace\sydemas_ws_sei\target\generated-sources\wsgen, -d, C:\Development\www\workspace\sydemas_ws_sei\target\classes, -verbose, -encoding, UTF-8, -extension, -wsdl, -r, C:\Development\www\workspace\sydemas_ws_sei\target\generated-sources\wsdl, com.xyzzy.sydemas.facade.SydemasFacadeImpl]
  Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
          ...few more lines here...
  </code></pre>
  
  <p>All the code is built with JDK 1.5, <code>JAVA_HOME</code> is set to the JDK 1.5.
  When I use 'javap' on the listed class file to see the version, it shows 49 which is the JDK 1.5 number.</p>
  
  <p>The original POM used the old jaxws (version 1.10 from org.codehaus.mojo). I also tried the new one (2.3 from org.jvnet.jax-ws-commons) and it also fails.</p>
  
  <p>I have searched all over and could not find a solution.</p>
  
  <p>Thanks, Amir</p>