You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/02/26 00:55:24 UTC

svn commit: r631043 - in /maven/plugins/trunk/maven-assembly-plugin/src: it/projects/basic-features/massembly-256-pomPropertiesInterp/ it/projects/basic-features/massembly-256-pomPropertiesInterp/src/ it/projects/basic-features/massembly-256-pomPropert...

Author: jdcasey
Date: Mon Feb 25 15:55:20 2008
New Revision: 631043

URL: http://svn.apache.org/viewvc?rev=631043&view=rev
Log:
[MASSEMBLY-256] Adding an integration test based on the attached test zip file.

Added:
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt   (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml   (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml   (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/files/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/files/some.file   (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/verify.bsh
Modified:
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/phase/FileSetAssemblyPhase.java

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt?rev=631043&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt Mon Feb 25 15:55:20 2008
@@ -0,0 +1,2 @@
+clean
+org.apache.maven.plugins:maven-assembly-plugin:testing:attached
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/goals.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml?rev=631043&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml Mon Feb 25 15:55:20 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.plugin.assembly.test</groupId>
+    <artifactId>it-project-parent</artifactId>
+    <version>1</version>
+  </parent>
+  
+  <artifactId>massembly-256-pomPropertiesInterp</artifactId>
+  <packaging>pom</packaging>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/main/assembly/myassembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <properties>
+    <fileLocation>file/path</fileLocation>
+    <fileLocation2>file2/path</fileLocation2>
+    <fileLocation3>file3/path</fileLocation3>
+  </properties>
+</project>

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml?rev=631043&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml Mon Feb 25 15:55:20 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<assembly>
+    <id>myassembly</id>
+    <formats>
+        <format>dir</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>src/main/files</directory>
+            <outputDirectory>${fileLocation}</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/files</directory>
+            <outputDirectory>${pom.properties.fileLocation2}</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/files</directory>
+            <outputDirectory>${project.properties.fileLocation3}</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/assembly/myassembly.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/files/some.file
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/files/some.file?rev=631043&view=auto
==============================================================================
    (empty)

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/src/main/files/some.file
------------------------------------------------------------------------------
    svn:executable = *

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/verify.bsh?rev=631043&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/verify.bsh (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/basic-features/massembly-256-pomPropertiesInterp/verify.bsh Mon Feb 25 15:55:20 2008
@@ -0,0 +1,25 @@
+import java.io.*;
+
+File f = new File( basedir, "target/massembly-256-pomPropertiesInterp-1-myassembly.dir/file/path/some.file" );
+File f2 = new File( basedir, "target/massembly-256-pomPropertiesInterp-1-myassembly.dir/file2/path/some.file" );
+File f3 = new File( basedir, "target/massembly-256-pomPropertiesInterp-1-myassembly.dir/file3/path/some.file" );
+
+boolean fOK = f.exists() && f.isFile();
+if ( !fOK )
+{
+	System.out.println( "File: " + f + " doesn't exist, or isn't a file." );
+}
+
+boolean f2OK = f2.exists() && f2.isFile();
+if ( !f2OK )
+{
+	System.out.println( "File: " + f2 + " doesn't exist, or isn't a file." );
+}
+
+boolean f3OK = f3.exists() && f3.isFile();
+if ( !f3OK )
+{
+	System.out.println( "File: " + f3 + " doesn't exist, or isn't a file." );
+}
+
+return fOK && f2OK;

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/phase/FileSetAssemblyPhase.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/phase/FileSetAssemblyPhase.java?rev=631043&r1=631042&r2=631043&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/phase/FileSetAssemblyPhase.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/archive/phase/FileSetAssemblyPhase.java Mon Feb 25 15:55:20 2008
@@ -44,13 +44,11 @@
     {
         List fileSets = assembly.getFileSets();
 
-        if ( fileSets != null && !fileSets.isEmpty() )
+        if ( ( fileSets != null ) && !fileSets.isEmpty() )
         {
             AddFileSetsTask task = new AddFileSetsTask( fileSets );
 
             task.setLogger( getLogger() );
-            task.setProject( configSource.getProject() );
-
             task.execute( archiver, configSource );
         }
     }