<forkMode>once</forkMode> runs all tests in a single (forked) VM. If you
want to run each test in it's own VM (this is what Eclipse does), you need
to set forkMode to pertest.
HTH,
Ian
It's better to be hated for who you are
than loved for who you are not
Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078
"Jakub Pawlowicz"
<[EMAIL PROTECTED] To:
[email protected]
lowicz.com> cc:
Subject: mvn test causes my
Spring 2 AOP project to fail
04/14/2006 07:45
AM
Please respond to
"Maven Users
List"
Hi,
I'm working with a Spring 2 example taken from the Mark's Fisher blog:
http://blog.springframework.com/markf/archives/2006/03/22/pojo-aspects-in-spring-20-a-simple-example/
This example uses Spring new configuration (<aop:config> etc) to introduce
aspects to POJOs.
However, when I try to test the project with JUnit test (executed with 'mvn
test'), I'm getting the following error:
2006-04-14 13:07:12
org.springframework.core.LocalVariableTableParameterNameDiscover
getParameterNames
INFO: IOException whilst attempting to read .class file for class
[examples.spring2.MethodLogger] - unable to
determine parameter names for method logMethodExit
java.io.IOException: Class not found
at org.objectweb.asm.ClassReader.a(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)...
I've found on the Spring Forums
http://forum.springframework.org/showthread.php?p=55922 , that the process'
parent classloader may cause such a problems with XML parsers (and probably
with ASM as well).
After a bit of googling I've found the maven-surefire-plugin page, and
added
this to my pom.xml (to force forking the tests' process):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<childDelegation>false</childDelegation>
</configuration>
</plugin>
but now 'mvn test' gives me that:
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: There are some test
failure.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecut
or.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
What's more, my tests works perfectly well when executed from Eclipse 3.1.
I'm using Java 1.5.0_04 and Maven 2.0.3 on Windows XP SP2.
Does anybody know what causes my problems and how to solve them?
Regards,
Jakub Pawlowicz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]