Changed massembly-731 IT not to use file system symlinks

It simply does not work in a cross-platform compatible way

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1720232 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 4aca682..56f692f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -359,7 +359,7 @@
       </pluginRepositories>
 
       <properties>
-        <invokerPluginVersion>3.0.0-SNAPSHOT</invokerPluginVersion>
+        <invokerPluginVersion>2.0.0</invokerPluginVersion>
         <test.remote.repo.url>file://${project.build.testOutputDirectory}/remote-repository</test.remote.repo.url>
         <it.streamLogs>false</it.streamLogs>
         <testVersion>${project.version}</testVersion>
@@ -408,6 +408,11 @@
                 <artifactId>commons-compress</artifactId>
                 <version>1.9</version>
               </dependency>
+              <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>2.4</version>
+              </dependency>
             </dependencies>
           </plugin>
         </plugins>
diff --git a/src/it/projects/bugs/massembly-731/invoker.properties b/src/it/projects/bugs/massembly-731/invoker.properties
new file mode 100644
index 0000000..2a764a6
--- /dev/null
+++ b/src/it/projects/bugs/massembly-731/invoker.properties
@@ -0,0 +1 @@
+invoker.java.version = 1.7+
diff --git a/src/it/projects/bugs/massembly-731/setup.groovy b/src/it/projects/bugs/massembly-731/setup.groovy
new file mode 100644
index 0000000..8eea942
--- /dev/null
+++ b/src/it/projects/bugs/massembly-731/setup.groovy
@@ -0,0 +1,57 @@
+/*
+ * 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.nio.file.Files
+
+import static org.apache.commons.io.FileUtils.write;
+
+File root = new File( "target/it/projects/bugs/massembly-731/symlinks" );
+//File root = new File( "symlinks" );
+root.mkdirs();
+
+File srcDir = new File(root, "/src");
+srcDir.mkdirs();
+File target = new File(srcDir, "targetDir");
+target.mkdirs();
+write(new File(target, "targetFile.txt"), "a regular File payload");
+File aRegularDir = new File(srcDir, "aRegularDir");
+aRegularDir.mkdirs();
+write(new File(aRegularDir, "aRegularFile.txt"), "a regular File payload");
+
+File dirOnTheOutside = new File(root, "dirOnTheOutside");
+dirOnTheOutside.mkdirs();
+write(new File(dirOnTheOutside, "FileInDirOnTheOutside.txt"), "a file in dir on the outside");
+write(new File(root, "onTheOutside.txt"), "A file on the outside");
+write(new File(srcDir, "fileR.txt"), "FileR payload");
+write(new File(srcDir, "fileW.txt"), "FileW payload");
+write(new File(srcDir, "fileX.txt"), "FileX payload");
+// todo: set file attributes (not used here)
+
+Files.createSymbolicLink(new File(srcDir, "symDir").toPath(), new File("targetDir").toPath());
+
+Files.createSymbolicLink(new File(srcDir, "symLinkToDirOnTheOutside").toPath(), new File("../dirOnTheOutside").toPath());
+
+Files.createSymbolicLink(new File(srcDir, "symLinkToFileOnTheOutside").toPath(), new File("../onTheOutside.txt").toPath());
+
+Files.createSymbolicLink(new File(srcDir, "symR").toPath(), new File("fileR.txt").toPath());
+
+Files.createSymbolicLink(new File(srcDir, "symW").toPath(), new File("fileW.txt").toPath());
+
+Files.createSymbolicLink(new File(srcDir, "symX").toPath(), new File("fileX.txt").toPath());
+return true;
diff --git a/src/it/projects/bugs/massembly-731/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt b/src/it/projects/bugs/massembly-731/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt
deleted file mode 100644
index df06763..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-I am on the outside...
diff --git a/src/it/projects/bugs/massembly-731/symlinks/onTheOutside.txt b/src/it/projects/bugs/massembly-731/symlinks/onTheOutside.txt
deleted file mode 100644
index 7632c2f..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/onTheOutside.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-I am on the outside of the src
diff --git a/src/it/projects/bugs/massembly-731/symlinks/regen.sh b/src/it/projects/bugs/massembly-731/symlinks/regen.sh
deleted file mode 100755
index d4e4d05..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/regen.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-
-rm symlinks.zip
-rm symlinks.tar
-cd src
-zip --symlinks ../symlinks.zip file* targetDir sym*
-tar -cvf ../symlinks.tar file* targetDir sym*
-
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/aRegularDir/aRegularFile.txt b/src/it/projects/bugs/massembly-731/symlinks/src/aRegularDir/aRegularFile.txt
deleted file mode 100644
index 9e429a8..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/aRegularDir/aRegularFile.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-I am just an ordinary file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/fileR.txt b/src/it/projects/bugs/massembly-731/symlinks/src/fileR.txt
deleted file mode 100644
index 3c43b41..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/fileR.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-This file is a source. r r r filemode
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/fileW.txt b/src/it/projects/bugs/massembly-731/symlinks/src/fileW.txt
deleted file mode 100644
index d4901ad..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/fileW.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-all w
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/fileX.txt b/src/it/projects/bugs/massembly-731/symlinks/src/fileX.txt
deleted file mode 100755
index 872a5cd..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/fileX.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-xxx
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/symDir b/src/it/projects/bugs/massembly-731/symlinks/src/symDir
deleted file mode 120000
index 29b5d5c..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/symDir
+++ /dev/null
@@ -1 +0,0 @@
-targetDir/
\ No newline at end of file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToDirOnTheOutside b/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToDirOnTheOutside
deleted file mode 120000
index eec25f5..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToDirOnTheOutside
+++ /dev/null
@@ -1 +0,0 @@
-../dirOnTheOutside/
\ No newline at end of file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToFileOnTheOutside b/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToFileOnTheOutside
deleted file mode 120000
index fd1227b..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToFileOnTheOutside
+++ /dev/null
@@ -1 +0,0 @@
-../onTheOutside.txt
\ No newline at end of file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/symR b/src/it/projects/bugs/massembly-731/symlinks/src/symR
deleted file mode 120000
index 114a517..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/symR
+++ /dev/null
@@ -1 +0,0 @@
-fileR.txt
\ No newline at end of file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/symW b/src/it/projects/bugs/massembly-731/symlinks/src/symW
deleted file mode 120000
index 19a642c..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/symW
+++ /dev/null
@@ -1 +0,0 @@
-fileW.txt
\ No newline at end of file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/symX b/src/it/projects/bugs/massembly-731/symlinks/src/symX
deleted file mode 120000
index 2d8a735..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/symX
+++ /dev/null
@@ -1 +0,0 @@
-fileX.txt
\ No newline at end of file
diff --git a/src/it/projects/bugs/massembly-731/symlinks/src/targetDir/targetFile.txt b/src/it/projects/bugs/massembly-731/symlinks/src/targetDir/targetFile.txt
deleted file mode 100644
index 4f8ba15..0000000
--- a/src/it/projects/bugs/massembly-731/symlinks/src/targetDir/targetFile.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-This is a target file
diff --git a/src/it/projects/bugs/massembly-731/not-verify.bsh b/src/it/projects/bugs/massembly-731/verify.bsh
similarity index 97%
rename from src/it/projects/bugs/massembly-731/not-verify.bsh
rename to src/it/projects/bugs/massembly-731/verify.bsh
index e3da221..1c40e59 100644
--- a/src/it/projects/bugs/massembly-731/not-verify.bsh
+++ b/src/it/projects/bugs/massembly-731/verify.bsh
@@ -38,7 +38,7 @@
     
     ZipFile zf = new ZipFile( zipFile );
 
-    ZipArchiveEntry ze = zf.getEntry( "project2-0.0.1-SNAPSHOT/symlinks/src/symDir/" );
+    ZipArchiveEntry ze = zf.getEntry( "project2-0.0.1-SNAPSHOT/symlinks/src/symDir" );
     if ( ze == null )
     {
         System.err.println( "symDir is missing." );
@@ -49,6 +49,8 @@
         System.err.println( "symDir is not a symnlink." );
         result = false;
     }
+
+    zf.close();
 }
 catch( IOException e )
 {