I had eclipse/maven working great before I went to windows 7.  Now, I 
cannot get maven to package anything.  I get this error about surefire 
everytime I try to build with maven a war file with run as maven package.  The 
initial install of eclipse/maven did not install the junit-2.4.3.  It gave a 
message about connection refused at repo1 for this class.  It gave a suggestion 
to manually download and install with mvn command, which I did.  Now, I get 
these errors.  One question I had was whether you were required to have any 
tests.  Is this error happening due to some confusion because I have no test 
cases?  If that is the case, does anybody have a simple testcase (for junit?) I 
can use?  If that is not the case, does anybody know how I can fix this issue?

David



I am using maven2, eclipse 3.5.2, and java 1.6.0_18.  I recently moved to 
windows 7 and reinstalled these and pointed them at my workspace from before, 
but now maven packaging into a war does not work.  I have no tests for my 
project by the way.
> 
> [INFO] Copying 0 resource
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: U:\workspace\tower\target\surefire-reports
> org.apache.maven.surefire.booter.SurefireExecutionException: Unable to find 
> clas
> s to create suite 'org.apache.maven.surefire.junit.JUnitDirectoryTestSuite'; 
> nes
> ted exception is java.lang.ClassNotFoundException: 
> org.apache.maven.surefire.jun
> it.JUnitDirectoryTestSuite; nested exception is 
> org.apache.maven.surefire.testse
> t.TestSetFailedException: Unable to find class to create suite 
> 'org.apache.maven
> .surefire.junit.JUnitDirectoryTestSuite'; nested exception is 
> java.lang.ClassNot
> FoundException: org.apache.maven.surefire.junit.JUnitDirectoryTestSuite
> org.apache.maven.surefire.testset.TestSetFailedException: Unable to find 
> class t
> o create suite 'org.apache.maven.surefire.junit.JUnitDirectoryTestSuite'; 
> nested
> exception is java.lang.ClassNotFoundException: 
> org.apache.maven.surefire.junit.
> JUnitDirectoryTestSuite
> java.lang.ClassNotFoundException: 
> org.apache.maven.surefire.junit.JUnitDirectory
> TestSuite
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>        at 
> org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(Isolat
> edClassLoader.java:103)
>        at 
> org.apache.maven.surefire.Surefire.instantiateObject(Surefire.java:25
> 5)
>        at 
> org.apache.maven.surefire.Surefire.instantiateSuite(Surefire.java:305
> )
>        at 
> org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire
> .java:207)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
> refireBooter.java:345)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
> ava:1009)
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] There are test failures.
> 
> Please refer to U:\workspace\tower\target\surefire-reports for the individual 
> te
> st results.
> 

--
Brett Porter
[email protected]
http://brettporter.wordpress.com/






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

Reply via email to