You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kr...@apache.org on 2015/12/15 20:40:05 UTC
svn commit: r1720232 - in /maven/plugins/trunk/maven-assembly-plugin: ./
src/it/projects/bugs/massembly-731/
src/it/projects/bugs/massembly-731/symlinks/
src/it/projects/bugs/massembly-731/symlinks/dirOnTheOutside/
src/it/projects/bugs/massembly-731/sy...
Author: krosenvold
Date: Tue Dec 15 19:40:04 2015
New Revision: 1720232
URL: http://svn.apache.org/viewvc?rev=1720232&view=rev
Log:
Changed massembly-731 IT not to use file system symlinks
It simply does not work in a cross-platform compatible way
Added:
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/invoker.properties
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/setup.groovy
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/verify.bsh
- copied, changed from r1720006, maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/not-verify.bsh
Removed:
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/not-verify.bsh
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/dirOnTheOutside/FileInDirOnTheOutside.txt
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/onTheOutside.txt
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/regen.sh
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/aRegularDir/aRegularFile.txt
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/fileR.txt
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/fileW.txt
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/fileX.txt
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/symDir
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToDirOnTheOutside
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/symLinkToFileOnTheOutside
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/symR
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/symW
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/symX
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/symlinks/src/targetDir/targetFile.txt
Modified:
maven/plugins/trunk/maven-assembly-plugin/pom.xml
Modified: maven/plugins/trunk/maven-assembly-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/pom.xml?rev=1720232&r1=1720231&r2=1720232&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-assembly-plugin/pom.xml Tue Dec 15 19:40:04 2015
@@ -359,7 +359,7 @@ under the License.
</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 @@ under the License.
<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>
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/invoker.properties?rev=1720232&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/invoker.properties (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/invoker.properties Tue Dec 15 19:40:04 2015
@@ -0,0 +1 @@
+invoker.java.version = 1.7+
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/setup.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/setup.groovy?rev=1720232&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/setup.groovy (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/setup.groovy Tue Dec 15 19:40:04 2015
@@ -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;
Copied: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/verify.bsh (from r1720006, maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/not-verify.bsh)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/verify.bsh?p2=maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/verify.bsh&p1=maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/not-verify.bsh&r1=1720006&r2=1720232&rev=1720232&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/not-verify.bsh (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/bugs/massembly-731/verify.bsh Tue Dec 15 19:40:04 2015
@@ -38,7 +38,7 @@ try
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 @@ try
System.err.println( "symDir is not a symnlink." );
result = false;
}
+
+ zf.close();
}
catch( IOException e )
{