Hi,

Sorry for pasting in a large stack trace but I'm tearing my hair out with Maven at the moment.
I'm a newbie with this so please be patient.

I downloaded Maven version 2.0 and followed the instructions regarding set up. I unzipped to C:/maven and it set the path as specified, I also have JDK 1.5 set too.

I created the test project using:

mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

then compile in the my-app dir using:

mvn complie

finally, I run the test command:

mvn test

However I get the stack trace below. I've tried deleting the default repository .m2 and starting again, but to no avail. Any assistance/pointers would be greatly appreciated.

[INFO] Surefire report directory: C:\my-app\target\surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException: Unable to create test class 'com.mycompany.app.AppTest'; nested exception is java.lang.ClassNotFoundException: com.mycompany.app.AppTest; nested exception is org.apache.maven.s
is java.lang.ClassNotFoundException: com.mycompany.app.AppTest
org.apache.maven.surefire.testset.TestSetFailedException: Unable to create test class 'com.mycompany.app.AppTest'; nested exception is java.lang.ClassNotFoundException: com.mycompany.app.AppTest
java.lang.ClassNotFoundException: com.mycompany.app.AppTest
       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:100) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:84) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:147)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:108)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:225) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:747) [INFO] ----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ----------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: There are test failures.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:403) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
       ... 16 more
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Sep 05 18:44:49 BST 2006
[INFO] Final Memory: 3M/6M
[INFO] ----------------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to