Changing
<forkMode>pertest</forkMode>
with
<forkMode>always</forkMode>
did not help.

The test resource was copied to target\test-classes
so it seems that the classpath was wrong.

However:

Changing
<forkMode>pertest</forkMode>
with
<forkMode>never</forkMode>
did help: that Validitor test didn't fail even.
but I believe we need forkMode set to always.

Try it out yourself with a svn checkout:
https://svn.sourceforge.net/svnroot/spring-rich-c/trunk/spring-richclient/


With kind regards,
Geoffrey De Smet


Geoffrey De Smet wrote:
The surefire plugin might not be 100% backwards compatible.

Config:

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <testFailureIgnore>true</testFailureIgnore>
                        <forkMode>pertest</forkMode>
<!-- TODO Testcases should all end with Test, not Tests-->
                        <includes>
                            <include>**/*Test.java</include>
                            <include>**/*Tests.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/*AbstractTest.java</exclude>
                            <exclude>**/*AbstractTests.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>

Before 2.2 this didn't fail my build and I don't think that ValidationResultsTests failed (only HandlerTests).
Now that I did a -U I got this:

[INFO] ----------------------------------------------------------------------------
[INFO] Building Spring richclient support
[INFO]    task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
...
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 76 source files to d:\projects\sf\spring-richclient\support\target\test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: d:\projects\sf\spring-richclient\support\target\surefire-reports [INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------ [INFO] org.springframework.rules.ValidationResultsTests; nested exception is java.lang.ExceptionInInitializerError: null ; nested exception is org.apache.maven.surefire.testset.TestSetFailedException: org.springframework.rules.ValidationResu
ltsTests; nested exception is java.lang.ExceptionInInitializerError: null

class path resource [org/springframework/rules/rules-context.xml] cannot be opened because it does not exist




With kind regards,
Geoffrey De Smet


Brett Porter wrote:
The Maven team is pleased to announce the release of the Maven Surefire
Plugin, version 2.2.

http://maven.apache.org/plugins/maven-surefire-plugin/

You can run mvn -U to get the latest version of the plugin, or specify
the version in your project's plugin configuration:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-surefire-plugin</artifactId>
   <version>2.2</version>
</plugin>

Changes:
http://jira.codehaus.org/secure/ReleaseNote.jspa?version=12440&styleName=Text&projectId=10541&Create=Create http://jira.codehaus.org/secure/ReleaseNote.jspa?version=12207&styleName=Text&projectId=11148&Create=Create

* [SUREFIRE-25] - surefire property droppings in fork mode
* [SUREFIRE-30] - Wrong classpath separator
* [SUREFIRE-33] - java.lang.ExceptionInInitializerError in TestCase constructor kills surefire without letting any log * [SUREFIRE-37] - System properties not working during forking [surefire-testng branch, patch attached]
* [SUREFIRE-40] - memory leak in junit runner
* [SUREFIRE-35] - refine use of assertion enablement
* [MSUREFIRE-57] - Forking documentation improvement to help with class loader constrainst issues * [MSUREFIRE-59] - JUnitBattery dies when TestSuite has an anonymous inner class * [MSUREFIRE-62] - forkMode=pertest shows Results: line after every battery, not at the end. * [MSUREFIRE-63] - Surefire temporary files should be put in target rather than in the main project directory
* [MSUREFIRE-65] - Surefire causes OOM
* [MSUREFIRE-72] - [surefire-testng] SurefireReportMojo.executeReport() throws a java.lang.NumberFormatException
* [MSUREFIRE-73] - systemClassLoader.getResource returns null
* [MSUREFIRE-74] - IsolatedClassloader.getResources returns duplicated results
* [MSUREFIRE-80] - systemProperties and NPE
* [MSUREFIRE-86] - Surefire forking doesn't work on Java 1.3
* [MSUREFIRE-88] - Surefire fork fails under windows when command has several quotes * [MSUREFIRE-93] - maven-surefire-plugin:2.2-SNAPSHOT fails with invalid option -ea when forking to a JDK < 1.4
* [MSUREFIRE-94] - settting System property "basedir" is evil.
* [MSUREFIRE-95] - java.lang.NoClassDefFoundError: org/apache/maven/surefire/util/NestedCheckedException * [MSUREFIRE-96] - Sometimes xml report has no time atribute in testcase element * [MSUREFIRE-97] - TestNG tests are not executed if invoked by */*Test.java naming pattern
* [MSUREFIRE-99] - TestNG tests that cause commons-logging to load fail
* [MSUREFIRE-100] - IllegalAccessError with a dynamic proxy
* [MSUREFIRE-101] - Surefire is giving classloader preferences to main sources before test sources * [MSUREFIRE-102] - Prevent XML parser problems by changing default forkMode and childDelegation settings
* [MSUREFIRE-104] - classpath line is too long in fork mode
* [MSUREFIRE-56] - The "pertest" option for forking mode should be renamed more appropriately
* [MSUREFIRE-71] - System properties are not set
* [MSUREFIRE-87] - Improve error stack trace when the error comes from the user's test code
* [MSUREFIRE-106] - Disabling xml report generation
* [MSUREFIRE-23] - Support TestNG


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

Reply via email to