The JDK's are both set 1.6. I'm using the default setting of Maven 2.0.9 ( at least nothing is defined concerning the tests ). Bellow I pasted the ant concerning the junit tests. Maybe that will give some insights
<target name="-init-macrodef-junit"> <macrodef name="junit" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2"> <attribute default="${includes}" name="includes"/> <attribute default="${excludes}" name="excludes"/> <attribute default="**" name="testincludes"/> <sequential> <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true"> <batchtest todir="${build.test.results.dir}"> <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> <filename name="@{testincludes}"/> </fileset> </batchtest> <classpath> <path path="${run.test.classpath}"/> <path path="${j2ee.platform.classpath}"/> <path path="${j2ee.platform.embeddableejb.classpath}"/> </classpath> <syspropertyset> <propertyref prefix="test-sys-prop."/> <mapper from="test-sys-prop.*" to="*" type="glob"/> </syspropertyset> <formatter type="brief" usefile="false"/> <formatter type="xml"/> <jvmarg line="${runmain.jvmargs}"/> </junit> </sequential> </macrodef> </target> 2009/10/21 Anders Hammar <and...@hammar.net>: > What JDK are you using? Is the executing environment the exact same for > Maven and Ant? > > /Anders > > On Tue, Oct 20, 2009 at 21:12, Roel Veldhuizen > <roelveldhui...@gmail.com>wrote: > >> I have a test that fails when I use Maven and works when I use ant. >> The test looks like this: (junit 4.7) >> >> �...@test >> public void Login() { >> SugarBean b = new SugarBean(); >> b.login("roelveldhuizen", "md5trallala"); >> } >> >> The bean is going to invoke a web service which is build using Axis >> 1.4. The test will generate the following Exception >> >> java.lang.ClassFormatError: Absent Code attribute in method that is >> not native or abstract in class file javax/xml/rpc/ServiceException >> at java.lang.ClassLoader.defineClass1(Native Method) >> at java.lang.ClassLoader.defineClass(ClassLoader.java:621) >> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) >> at java.net.URLClassLoader.access$000(URLClassLoader.java:56) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:195) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:307) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:252) >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) >> at com.paston.sugarcrm.beans.SugarBean.login(SugarBean.java:21) >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org