Hi everyone, The default test behaviour of maven is to fail the build, Since I don't want that in some cases, since I am failing tests intentionally (why?? : I am writing testcases for something I don't know the intended behaviour of and the current behaviour strikes me as odd or buggy, I will write the test as I see fit, and ask someone who knows to get it the it's supposed to be -; hope you still with me..)
For this to work I have attached a patch, which allows a property to be set in your favorit properties file. Default behaviour is still to fail the test though.. Have fun.. Mvgr, Martin
Index: src/templates/build/plugins/test/build.xml =================================================================== RCS file: /home/cvspublic/jakarta-turbine-maven/src/templates/build/plugins/test/build.xml,v retrieving revision 1.1 diff -u -r1.1 build.xml --- src/templates/build/plugins/test/build.xml 15 May 2002 19:17:45 -0000 1.1 +++ src/templates/build/plugins/test/build.xml 29 May 2002 14:59:14 -0000 @@ -83,7 +83,7 @@ <target name="do-test" depends="run-tests" - if="maven.test.failure"> + if="maven.test.failure" unless="maven.test.dontfailontests"> <fail message="There were unit test failures."/> Index: xdocs/ref/properties.xml =================================================================== RCS file: /home/cvspublic/jakarta-turbine-maven/xdocs/ref/properties.xml,v retrieving revision 1.20 diff -u -r1.20 properties.xml --- xdocs/ref/properties.xml 27 May 2002 21:25:27 -0000 1.20 +++ xdocs/ref/properties.xml 29 May 2002 14:59:16 -0000 @@ -548,6 +548,16 @@ unit testing. The default value is <code>8192</code>. </td> </tr> + <tr> + <td>maven.test.dontfailontests</td> + <td>Yes</td> + <td> + Specifies wheather you want to fail the build if a test + fails. The default is to fail the build. This property + is not used for integration unit tests. + tests. + </td> + </tr> </table> </section> <section name="Checkstyle Settings">
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>