On Tue, Sep 9, 2008 at 9:22 AM, Barrie Treloar <[EMAIL PROTECTED]> wrote:

> the second time I get this error.
> Does anyone else get this problem?
>
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> D:\ide\maven\maven-eclipse-plugin\target\surefire-reports
> org.apache.maven.surefire.booter.SurefireExecutionException:
> projects/j2ee-simple/primary-source/target/classes/TestServ
> let (wrong name: TestServlet); nested exception is
> java.lang.NoClassDefFoundError: projects/j2ee-simple/primary-source/t
> arget/classes/TestServlet (wrong name: TestServlet)
> java.lang.NoClassDefFoundError:
> projects/j2ee-simple/primary-source/target/classes/TestServlet (wrong
> name: TestServlet)
>
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$100(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:306)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:87)
>
>        at 
> org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
>        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(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:585)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
>
>
> On Tue, Sep 9, 2008 at 12:50 AM, Brian E. Fox <[EMAIL PROTECTED]> wrote:
>> The IT harness is launching a new maven invocation to run the plugin. It
>> doesn't pay attention to your settings, so it will only work if you can
>> get to the repos without a proxy iirc.
>>
>> -----Original Message-----
>> From: Barrie Treloar [mailto:[EMAIL PROTECTED]
>> Sent: Monday, September 08, 2008 12:25 AM
>> To: Maven Developers List
>> Subject: Re: m-eclipse-p: ITs failing
>>
>> On Thu, Sep 4, 2008 at 4:40 PM, Arnaud HERITIER <[EMAIL PROTECTED]>
>> wrote:
>>> With a similar config it worked for me some days ago.
>>
>> If you run
>>    mvn -Prun-its install
>> twice without running clean, do you get the error:
>>        org.apache.maven.surefire.booter.SurefireExecutionException:
>>
>> projects/j2ee-simple/primary-source/target/classes/TestServlet
>> (wrong name: TestServlet);
>>
>

I know why this is failing now.
And I expect that it affects everyone's environment.

the projects/j2ee-simple/primary-source/target/classes/TestServlet.java
file is copied into target\test-classes because the file is located in
src\test\resources and hence is included as part of the test, but
since it is not in the correct directory structure compared to its
package it fails.

I've had to fix the plugin configuration for both the test and
integration test as per
http://www.nabble.com/Plugins%3A-execution-configuration-does-not-add-to-configuration-to19425025.html
so that it includes/excludes the right files.

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

Reply via email to