Author: michaelo
Date: Fri Nov  4 23:43:28 2016
New Revision: 1768127

URL: http://svn.apache.org/viewvc?rev=1768127&view=rev
Log:
[MINVOKER-211] Some ITs can't be re-executed without clean

Submitted by: Alix Lourme <alix.lou...@gmail.com>

Added:
    
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-conditions/setup.groovy
    
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-scripts/setup.groovy
Modified:
    
maven/plugins/trunk/maven-invoker-plugin/src/it/special-characters-should-work/setup.groovy

Added: 
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-conditions/setup.groovy
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/selector-conditions/setup.groovy?rev=1768127&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-conditions/setup.groovy
 (added)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-conditions/setup.groovy
 Fri Nov  4 23:43:28 2016
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File
+import org.apache.commons.io.FileUtils
+
+// Previous potential target 'content' has impact on IT execution
+// (Some new file should be created by verify.sh) 
+FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports" ) );
+FileUtils.deleteQuietly( new File( basedir, "src/it/jre-version-match/target" 
) );
+FileUtils.deleteQuietly( new File( basedir, 
"src/it/maven-version-match/target" ) );
+FileUtils.deleteQuietly( new File( basedir, "src/it/os-family-match/target" ) 
);
+return true;

Added: 
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-scripts/setup.groovy
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/selector-scripts/setup.groovy?rev=1768127&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-scripts/setup.groovy 
(added)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/it/selector-scripts/setup.groovy 
Fri Nov  4 23:43:28 2016
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File
+import org.apache.commons.io.FileUtils
+
+// Previous potential target 'content' has impact on IT execution
+// (Some new file should be created by verify.sh) 
+FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports" ) );
+FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-quiet/target" ) 
);
+FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-true/target" ) 
);
+return true;

Modified: 
maven/plugins/trunk/maven-invoker-plugin/src/it/special-characters-should-work/setup.groovy
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/it/special-characters-should-work/setup.groovy?rev=1768127&r1=1768126&r2=1768127&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/it/special-characters-should-work/setup.groovy
 (original)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/it/special-characters-should-work/setup.groovy
 Fri Nov  4 23:43:28 2016
@@ -20,10 +20,12 @@
 import java.io.*
 import java.util.*
 import java.util.regex.*
+import org.apache.commons.io.FileUtils
 
 File srcIt = new File (basedir, "src/it");
 File originalFolder = new File (srcIt, "minvoker-test");
 File destinationFolder = new File(srcIt, "test-\u00c9\u00e9\u00ea- & 
-\u00c9\u00e9\u00ea-test");
+FileUtils.deleteQuietly(destinationFolder);
 // rename old one into new one with special characters.
 if (!originalFolder.renameTo(destinationFolder)) {
   throw new IOException("Rename didn't work.")


Reply via email to