maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom H <>
Subject Re: newbie question about specifying testClassesDirectory
Date Thu, 02 Jul 2009 20:07:34 GMT

Thanks for the reply, I've some comments in-lined below;

On 02/07/09 20:09, Anders Hammar wrote:
> Hi,
> As a starter, you should probably upgrade Maven as version 2.0.4 is
> VERY old. You can tell from your attached output that there are newer
> surefire plugin versions that can't be used with Maven 2.0.4.

I am pretty much stuck with what's in the fedora11 repos, so I am hoping 
to fix the problem or send in a bug report...

> Regarding your problem: Try running with "-X" (debug) instead of "-e"
> and then check the output. Look for the test classpath and verify that
> ./target/test-classes/ is included in the path.

Just before the ClassNotFoundException it tries to run this;

Forking command line: /bin/sh -c "cd 
/home/tomhodder/eclipse/workspace/simple && 
/usr/lib/jvm/java-1.5.0-gcj- -jar 
/tmp/surefirebooter4m1yoz.jar /tmp/surefire4m1yoxtmp /tmp/surefire4m1yoytmp"
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to 
create test class 'com.mytutorial.AppTest';

the surefire booter jar only contains this;
[tomhodder@localhost simple]$ unzip -t /tmp/surefirebooter4m1yoz.jar
Archive:  /tmp/surefirebooter4m1yoz.jar
     testing: META-INF/MANIFEST.MF     OK
No errors detected in compressed data of /tmp/surefirebooter4m1yoz.jar.

And the MANIFEST file contains the correct test-classes path....

If I strace that fork command it does what looks like find the correct 
AppTest class, and then gives up;


{st_mode=S_IFREG|0664, st_size=1006, ...}) = 0

{st_mode=S_IFREG|0664, st_size=1006, ...}) = 0
ftruncate(9, 69632)                     = 0
mmap(NULL, 4096, PROT_READ|PROT_EXEC, MAP_SHARED, 9, 0x10000) = 
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0x10000) = 
write(2, "org.apache.maven.surefire.booter."..., 
500org.apache.maven.surefire.booter.SurefireExecutionException: Unable 
to create test class 'com.mytutorial.AppTest'; nested exception is 
java.lang.ClassNotFoundException: com.mytutorial.AppTest not found in 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}; 
nested exception is 
org.apache.maven.surefire.testset.TestSetFailedException: Unable to 
create test class 'com.mytutorial.AppTest'; nested exception i) = 500
write(2, "s java.lang.ClassNotFoundExceptio"..., 100s 
java.lang.ClassNotFoundException: com.mytutorial.AppTest not found in 
gnu.gcj.runtime.SystemClassL) = 100

any ideas on that?


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

View raw message