accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [16/50] git commit: ACCUMULO-1030 clean up the directories left from any previous runs
Date Tue, 23 Jul 2013 16:54:41 GMT
ACCUMULO-1030 clean up the directories left from any previous runs


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/88c11e63
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/88c11e63
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/88c11e63

Branch: refs/heads/ACCUMULO-1000
Commit: 88c11e63c1c83b2d75e7a1da4b5fa90d97a38243
Parents: 8b0f573
Author: Eric Newton <eric.newton@gmail.com>
Authored: Wed Jul 17 13:12:03 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Wed Jul 17 13:12:03 2013 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/88c11e63/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
----------------------------------------------------------------------
diff --git a/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java b/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
index 075ba8e..b3efd81 100644
--- a/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
+++ b/maven-plugin/src/main/java/org/apache/accumulo/maven/plugin/StartMojo.java
@@ -28,6 +28,7 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.codehaus.plexus.util.FileUtils;
 
 /**
  * Goal which starts an instance of {@link MiniAccumuloCluster}.
@@ -54,6 +55,8 @@ public class StartMojo extends AbstractAccumuloMojo {
     
     try {
       subdir = subdir.getCanonicalFile();
+      if (subdir.exists())
+        FileUtils.forceDelete(subdir);
       subdir.mkdirs();
       configureMiniClasspath(miniClasspath);
       MiniAccumuloConfig cfg = new MiniAccumuloConfig(subdir, rootPassword);


Mime
View raw message