maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r570161 - in /maven/plugins/trunk/maven-assembly-plugin/src: it/projects/dependency-sets/massembly-232/ it/projects/dependency-sets/massembly-232/src/ it/projects/dependency-sets/massembly-232/src/main/ it/projects/dependency-sets/massembly...
Date Mon, 27 Aug 2007 15:47:43 GMT
Author: jdcasey
Date: Mon Aug 27 08:47:39 2007
New Revision: 570161

URL: http://svn.apache.org/viewvc?rev=570161&view=rev
Log:
[MASSEMBLY-232][MASSEMBLY-235] Hook up verify scripts for the tests cases included in these
issues, and fix the problems with MASSEMBLY-232.

Added:
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml
  (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt
  (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml
  (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt
  (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/verify.bsh
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt
  (with props)
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/verify.bsh
Modified:
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/pom.xml
    maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/src/main/assembly/release.xml
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java
    maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/PrefixedObjectBasedValueSource.java
    maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml
Mon Aug 27 08:47:39 2007
@@ -0,0 +1,13 @@
+<assembly>
+  <id>dist</id>
+  <formats>
+    <format>dir</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>src/main/etc</directory>
+      <outputDirectory>massembly-232-${version}/etc</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/assembly.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt
Mon Aug 27 08:47:39 2007
@@ -0,0 +1 @@
+package
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/goals.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml
Mon Aug 27 08:47:39 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <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-232</artifactId>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>assembly.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals><goal>single</goal></goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt
Mon Aug 27 08:47:39 2007
@@ -0,0 +1 @@
+hi

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/src/main/etc/hello.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/verify.bsh?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/verify.bsh
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-232/verify.bsh
Mon Aug 27 08:47:39 2007
@@ -0,0 +1,7 @@
+import java.io.*;
+
+File file = new File( basedir, "target/massembly-232-1-dist.dir/massembly-232-1/etc/hello.txt"
);
+
+System.out.println( "Test file exists? " + file.exists() );
+
+return file.exists();

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt
Mon Aug 27 08:47:39 2007
@@ -0,0 +1 @@
+package
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/goals.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/pom.xml?rev=570161&r1=570160&r2=570161&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/pom.xml
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/pom.xml
Mon Aug 27 08:47:39 2007
@@ -10,9 +10,8 @@
   
 	<name>Test for Assembly Bug</name>
 	<groupId>test</groupId>
-	<artifactId>assembly-test</artifactId>
+	<artifactId>massembly235-test</artifactId>
 	<packaging>jar</packaging>
-	<version>1.0-SNAPSHOT</version>
 
 	<dependencies>
 		<dependency>
@@ -48,6 +47,15 @@
 						<descriptor>src/main/assembly/release.xml</descriptor>
 					</descriptors>
 				</configuration>
+				<executions>
+				  <execution>
+				    <id>assembly</id>
+				    <phase>package</phase>
+				    <goals>
+				      <goal>single</goal>
+				    </goals>
+				  </execution>
+				</executions>
 			</plugin>
 		</plugins>
 	</build>

Modified: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/src/main/assembly/release.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/src/main/assembly/release.xml?rev=570161&r1=570160&r2=570161&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/src/main/assembly/release.xml
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/src/main/assembly/release.xml
Mon Aug 27 08:47:39 2007
@@ -1,8 +1,9 @@
 <assembly>
 	<id>release</id>
 	<formats>
-		<format>zip</format>
+		<format>dir</format>
 	</formats>
+	<includeBaseDirectory>false</includeBaseDirectory>
 	<fileSets>
 		<fileSet>
 			<directory>target</directory>
@@ -15,10 +16,6 @@
 	<dependencySets>
 		<dependencySet>
 			<outputDirectory>/</outputDirectory>
-			<unpack>true</unpack>
-			<excludes>
-				<exclude>xmlenc:xmlenc</exclude>
-			</excludes>
 		</dependencySet>
 	</dependencySets>
 </assembly>

Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/verify.bsh?rev=570161&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/verify.bsh
(added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/dependency-sets/massembly-235/verify.bsh
Mon Aug 27 08:47:39 2007
@@ -0,0 +1,11 @@
+import java.io.*;
+
+File dir = new File( basedir, "target/massembly235-test-1-release.dir" );
+
+File goodJar = new File( dir, "xmlenc-0.52.jar" );
+File badJar = new File( dir, "xmlenc-0.39.jar" );
+
+System.out.println( "Good version of xmlenc exists? " + goodJar.exists() );
+System.out.println( "Bad version of xmlenc doesn't exist? " + (!badJar.exists()) );
+
+return goodJar.exists() && !badJar.exists();

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java?rev=570161&r1=570160&r2=570161&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java
Mon Aug 27 08:47:39 2007
@@ -74,6 +74,16 @@
                                              String finalName, String artifactProjectRefName
)
         throws AssemblyFormattingException
     {
+        if ( artifactProjectRefName == null )
+        {
+            artifactProjectRefName = "artifact.";
+        }
+
+        if ( !artifactProjectRefName.endsWith( "." ) )
+        {
+            artifactProjectRefName += ".";
+        }
+
         String value = output;
         if ( value == null )
         {
@@ -182,7 +192,12 @@
 
         String value = expression;
 
-        if ( ( artifactProjectRefName != null ) && !artifactProjectRefName.endsWith(
"." ) )
+        if ( artifactProjectRefName == null )
+        {
+            artifactProjectRefName = "artifact.";
+        }
+
+        if ( !artifactProjectRefName.endsWith( "." ) )
         {
             artifactProjectRefName += ".";
         }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/PrefixedObjectBasedValueSource.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/PrefixedObjectBasedValueSource.java?rev=570161&r1=570160&r2=570161&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/PrefixedObjectBasedValueSource.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/PrefixedObjectBasedValueSource.java
Mon Aug 27 08:47:39 2007
@@ -28,7 +28,7 @@
 
     public Object getValue( String expression )
     {
-        if ( !expression.startsWith( prefix ) )
+        if ( ( expression == null ) || !expression.startsWith( prefix ) )
         {
             return null;
         }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java?rev=570161&r1=570160&r2=570161&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java
(original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtilsTest.java
Mon Aug 27 08:47:39 2007
@@ -137,6 +137,12 @@
         verifyOutputDir( "${version}", "finalName", null, null, "version", "version/" );
     }
 
+    public void testGetOutputDir_ShouldResolveVersionInLargerOutDirExpr()
+    throws AssemblyFormattingException
+    {
+        verifyOutputDir( "my-special-${version}", "finalName", null, null, "99", "my-special-99/"
);
+    }
+
     public void testGetOutputDir_ShouldResolveFinalNameInOutDir()
     throws AssemblyFormattingException
     {



Mime
View raw message