]> source.dussan.org Git - archiva.git/commitdiff
remove conf and data file for Rest Test and jdk7
authorskygo <skygo@unknown>
Thu, 6 Sep 2012 22:31:46 +0000 (22:31 +0000)
committerskygo <skygo@unknown>
Thu, 6 Sep 2012 22:31:46 +0000 (22:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1381789 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java

index eac8994ac49e30c8c1abde79c8e92b280e6a5d59..3d1a91f8629e25b136fb2d10e13fa46f60fb277b 100644 (file)
@@ -87,16 +87,24 @@ public abstract class AbstractArchivaRestTest
     {        
         File appServerBase = new File( System.getProperty( "appserver.base" ) );
 
-        File jcrDirectory = new File( appServerBase, "jcr" );
+        removeAppsubFolder( appServerBase, "jcr" );
+        removeAppsubFolder( appServerBase, "conf" );
+        removeAppsubFolder( appServerBase, "data" );
         
-        if ( jcrDirectory.exists() )
+        
+        super.startServer();        
+    }
+    
+    private void removeAppsubFolder( File appServerBase, String folder )
+       throws Exception
+    {
+        File directory = new File( appServerBase, folder );        
+        if ( directory.exists() )
         {
-            FileUtils.deleteDirectory( jcrDirectory );
+            FileUtils.deleteDirectory( directory );
         }
-
-        super.startServer();        
     }
-
+    
     @Override
     protected String getSpringConfigLocation()
     {