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 2010/09/21 22:37:33 UTC
svn commit: r999616 - in /maven/plugins/trunk/maven-assembly-plugin/src:
it/projects/files/ it/projects/files/multimodule-relativePath/
it/projects/files/multimodule-relativePath/child/
it/projects/files/multimodule-relativePath/child/src/ it/projects/...
Author: jdcasey
Date: Tue Sep 21 20:37:32 2010
New Revision: 999616
URL: http://svn.apache.org/viewvc?rev=999616&view=rev
Log:
[MASSEMBLY-150] Make AssemblerConfigurationSource.getBasedir() return basedir OF THAT PROJECT, so relative paths of files and such are correct.
Added:
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/a.properties (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/pom.xml (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/bin.xml (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/file.txt (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/file.txt (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/pom.xml (with props)
maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/verify.bsh (with props)
Modified:
maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/a.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/a.properties?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/a.properties (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/a.properties Tue Sep 21 20:37:32 2010
@@ -0,0 +1 @@
+testProp=boo
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/a.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/pom.xml?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/pom.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/pom.xml Tue Sep 21 20:37:32 2010
@@ -0,0 +1,35 @@
+<?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>test</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ </parent>
+
+ <artifactId>child</artifactId>
+ <name>Child</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assemble/bin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/bin.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/bin.xml?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/bin.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/bin.xml Tue Sep 21 20:37:32 2010
@@ -0,0 +1,15 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bin</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <files>
+ <file>
+ <source>src/config/a/file.txt</source>
+ <outputDirectory>a</outputDirectory>
+ </file>
+ </files>
+</assembly>
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/assemble/bin.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/file.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/file.txt?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/file.txt (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/file.txt Tue Sep 21 20:37:32 2010
@@ -0,0 +1,2 @@
+file A
+${testProp}
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/a/file.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/file.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/file.txt?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/file.txt (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/file.txt Tue Sep 21 20:37:32 2010
@@ -0,0 +1,3 @@
+file B
+${testProp}
+
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/child/src/config/b/file.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/pom.xml?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/pom.xml (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/pom.xml Tue Sep 21 20:37:32 2010
@@ -0,0 +1,20 @@
+<?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>
+
+ <groupId>test</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+
+ <name>Parent</name>
+
+ <modules>
+ <module>child</module>
+ </modules>
+</project>
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/verify.bsh?rev=999616&view=auto
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/verify.bsh (added)
+++ maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/verify.bsh Tue Sep 21 20:37:32 2010
@@ -0,0 +1,11 @@
+import java.io.*;
+
+File a = new File( basedir, "child/target/child-1.0-bin/a/file.txt");
+
+if ( !a.exists() || !a.isFile() )
+{
+ System.out.println( "Missing test file: " + a );
+ return false;
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/projects/files/multimodule-relativePath/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java?rev=999616&r1=999615&r2=999616&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java Tue Sep 21 20:37:32 2010
@@ -198,7 +198,7 @@ public abstract class AbstractAssemblyMo
/**
* Base directory of the project.
*
- * @parameter default-value="${basedir}"
+ * @parameter default-value="${project.basedir}"
* @required
* @readonly
*/
@@ -329,7 +329,8 @@ public abstract class AbstractAssemblyMo
* @throws org.apache.maven.plugin.MojoExecutionException
*
*/
- public void execute() throws MojoExecutionException, MojoFailureException
+ public void execute()
+ throws MojoExecutionException, MojoFailureException
{
if ( skipAssembly )
{