Hey fellas,
I have a strange problem with Maven and deleting files in a test case.
For a better understanding I reduced my code to the problem parts and
made a small project (maven-file-test, attached to the mail). In this
project there is the class FileUtils with the method "writeFile(File,
String)" which just create a file with a content and a method
"delete(File)" that deletes a file recursively in case of a directory. I
test this class with FileUtilsTest the first test (testWriteFile)
creates the file src/test/resources/file_utils_test/test01 and the
second test (testDeletDir) delete src/test/resources/file_utils_test and
its content . The pom is just a tiny one with no awesome stuff in it.
With JUnit everthing is perfekt on Linux and Windows. With Maven it
works perfekt under Linux, but fails sometimes under Windows 7 64.
I am using Java jdk1.7.0_03 and test it with Maven 2.2.1, 3.0.3, 3.0.4
by calling "mvn clean install" with no success.
I know there is an issue with file handling on Windows that does not
exists on Linux, but wondering that JUnit do the trick and Maven don't
do it (sometimes).
Does anyone knows a solution, if it is a Maven problem?
Thanks,
Björn

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

Reply via email to