fixing problem with resources contained in jars - was causing mvn 3 to fail on jenkins #2
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Tue, 3 Jul 2012 10:15:03 +0000 (10:15 +0000)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Tue, 3 Jul 2012 10:15:03 +0000 (10:15 +0000)
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/test/unitils/CleanSweepInsertLoadStrategy.java

index 2fc35a31e34bfa38ccadad375a3767236fe3148f..240fa06e0dbbac7b13612a1dde4eb650d47c38c8 100644 (file)
@@ -59,11 +59,10 @@ public class CleanSweepInsertLoadStrategy extends CleanInsertLoadStrategy {
                 throw new IOException("the Resource " + clearDataResource + " could not be found");
             }
             File file;
-            if(fileUrl.getProtocol().equals("jar:file:")){
+            if(fileUrl.toString().startsWith("jar:file:")){
                 // extract file from jar into tmp folder
                 String millisecTimeStamp = String.valueOf(System.currentTimeMillis());
                 file = copyClassPathResource(clearDataResource, System.getProperty("java.user.home") + File.separator + millisecTimeStamp);
-
             } else {
                 file = new File(fileUrl.toURI());
             }