Author: jdcasey Date: Fri May 5 09:42:10 2006 New Revision: 400105 URL: http://svn.apache.org/viewcvs?rev=400105&view=rev Log: [MASSEMBLY-29] Re-adding module-source archiving alongside module-binary archiving...had to modify the binary aspect of the moduleSet into a sub-element called <binaries/>, which is a sibling of the new <sources/> sub-element.
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml (with props) Removed: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/goals.txt Modified: maven/plugins/trunk/maven-assembly-plugin/pom.xml maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/pom.xml maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/src/assemble/src.xml maven/plugins/trunk/maven-assembly-plugin/src/it/integration-tests.txt maven/plugins/trunk/maven-assembly-plugin/src/it/test.rb maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java Modified: maven/plugins/trunk/maven-assembly-plugin/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/pom.xml?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-assembly-plugin/pom.xml Fri May 5 09:42:10 2006 @@ -43,6 +43,18 @@ </executions> </plugin> </plugins> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <excludes> + <exclude>**/BasicAbstractAssemblyMojoFeaturesTest*</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> <dependencies> <dependency> Modified: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/pom.xml?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/pom.xml (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/pom.xml Fri May 5 09:42:10 2006 @@ -19,11 +19,21 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> + <inherited>false</inherited> <configuration> <descriptors> <descriptor>src/assemble/src.xml</descriptor> </descriptors> </configuration> + <executions> + <execution> + <id>assembly</id> + <phase>package</phase> + <goals> + <goal>directory-inline</goal> + </goals> + </execution> + </executions> </plugin> </plugins> </build> Modified: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/src/assemble/src.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/src/assemble/src.xml?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/src/assemble/src.xml (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceIncludedBinaryNotIncluded/src/assemble/src.xml Fri May 5 09:42:10 2006 @@ -1,16 +1,16 @@ <assembly> <id>src</id> <formats> - <format>zip</format> + <format>dir</format> </formats> - + <includeBaseDirectory>false</includeBaseDirectory> <moduleSets> <moduleSet> <includes> <include>org.test:child1</include> </includes> <sources> - <outputDirectory>sources</outputDirectory> + <outputDirectory>sources/${artifactId}</outputDirectory> </sources> </moduleSet> </moduleSets> Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml Fri May 5 09:42:10 2006 @@ -0,0 +1,21 @@ +<?xml version="1.0"?><project> + <parent> + <artifactId>parent</artifactId> + <groupId>org.test</groupId> + <version>1.0</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.test</groupId> + <artifactId>child1</artifactId> + <name>Child 1</name> + <version>1.0</version> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> \ No newline at end of file Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java Fri May 5 09:42:10 2006 @@ -0,0 +1,13 @@ +package org.test; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/main/java/org/test/App.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java Fri May 5 09:42:10 2006 @@ -0,0 +1,38 @@ +package org.test; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child1/src/test/java/org/test/AppTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml Fri May 5 09:42:10 2006 @@ -0,0 +1,21 @@ +<?xml version="1.0"?><project> + <parent> + <artifactId>parent</artifactId> + <groupId>org.test</groupId> + <version>1.0</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.test</groupId> + <artifactId>child2</artifactId> + <name>Child 2</name> + <version>1.0</version> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> \ No newline at end of file Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java Fri May 5 09:42:10 2006 @@ -0,0 +1,13 @@ +package org.test; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/main/java/org/test/App.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java Fri May 5 09:42:10 2006 @@ -0,0 +1,38 @@ +package org.test; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child2/src/test/java/org/test/AppTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml Fri May 5 09:42:10 2006 @@ -0,0 +1,21 @@ +<?xml version="1.0"?><project> + <parent> + <artifactId>parent</artifactId> + <groupId>org.test</groupId> + <version>1.0</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.test</groupId> + <artifactId>child3</artifactId> + <name>Child 3</name> + <version>1.0</version> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> \ No newline at end of file Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java Fri May 5 09:42:10 2006 @@ -0,0 +1,13 @@ +package org.test; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/main/java/org/test/App.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java Fri May 5 09:42:10 2006 @@ -0,0 +1,38 @@ +package org.test; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/child3/src/test/java/org/test/AppTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt Fri May 5 09:42:10 2006 @@ -0,0 +1 @@ +clean package assembly:directory Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/goals.txt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml Fri May 5 09:42:10 2006 @@ -0,0 +1,31 @@ +<?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> + <groupId>org.test</groupId> + <artifactId>parent</artifactId> + <packaging>pom</packaging> + <version>1.0</version> + + <name>Parent</name> + + <modules> + <module>child1</module> + <module>child2</module> + <module>child3</module> + </modules> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <inherited>false</inherited> + <configuration> + <descriptors> + <descriptor>src/assemble/bin.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> +</project> Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml Fri May 5 09:42:10 2006 @@ -0,0 +1,20 @@ + +<assembly> + <id>bin</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <moduleSets> + <moduleSet> + <includes> + <include>org.test:child1</include> + </includes> + <binaries> + <outputDirectory>modules/${artifactId}</outputDirectory> + <includeDependencies>true</includeDependencies> + <unpack>true</unpack> + </binaries> + </moduleSet> + </moduleSets> +</assembly> Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/bin.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml?rev=400105&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml Fri May 5 09:42:10 2006 @@ -0,0 +1,17 @@ +<assembly> + <id>src</id> + <formats> + <format>dir</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <moduleSets> + <moduleSet> + <includes> + <include>org.test:child1</include> + </includes> + <sources> + <outputDirectory>sources/${artifactId}</outputDirectory> + </sources> + </moduleSet> + </moduleSets> +</assembly> Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/basic-features/module-sourceNotIncludedBinaryIncluded/src/assemble/src.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Modified: maven/plugins/trunk/maven-assembly-plugin/src/it/integration-tests.txt URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/integration-tests.txt?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/integration-tests.txt (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/integration-tests.txt Fri May 5 09:42:10 2006 @@ -1,2 +1,10 @@ +# Test the outputFileNameMapping feature of a dependencySet. basic-features/outputFileNameMapping-simple + +# Test moduleSet where sources are not included and binary deps are included. +basic-features/module-sourceNotIncludedBinaryIncluded + +# Test moduleSet where sources are included and binaries are not. basic-features/module-sourceIncludedBinaryNotIncluded + +repository-assembly Modified: maven/plugins/trunk/maven-assembly-plugin/src/it/test.rb URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/it/test.rb?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/test.rb (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/test.rb Fri May 5 09:42:10 2006 @@ -2,18 +2,82 @@ require 'FileUtils' -basedir = `pwd`.chomp +class Tester -File.open( 'integration-tests.txt' ).each_line do |testdir| + attr_reader :failures + + def initialize + + @failures = Array.new + + end + + def test( testdir, basedir ) + + testdir = testdir.chomp + + FileUtils.cd "#{basedir}/#{testdir}" + + goals = "clean verify" + if File.file?( 'goals.txt' ) + + goals = File.open( 'goals.txt' ).read.chomp + + end + + puts "\nRUNNING TEST: #{testdir}..." + + output = `mvn -X #{goals}` + + logfile = File.open( 'log.txt', 'w' ) { |file| file << output } + + if output =~ /BUILD SUCCESSFUL/ + + puts "[SUCCESS]" + + else + + puts "#{output}\n[ERROR]\n\n" + @failures << testdir + + end + + FileUtils.cd basedir + + end - testdir = testdir.chomp +end + [EMAIL PROTECTED] = `pwd`.chomp [EMAIL PROTECTED] = Tester.new + +if ARGV.size > 0 - FileUtils.cd "#{basedir}/#{testdir}" + ARGV.each { |testdir| @tester.test( testdir, @basedir ) } - puts "\n\nRUNNING TEST IN #{testdir}...\n\n" - puts `mvn \`cat goals.txt\`` - puts "\n\n...done\n\n" +else - FileUtils.cd basedir + File.open( 'integration-tests.txt' ).each_line do |testdir| + testdir = testdir.chomp + + if ( !( testdir =~ /\w*#/ ) && testdir.size > 0 ) + + @tester.test( testdir, @basedir ) + + end + + end + end + +if @tester.failures.size > 0 + + puts "\n\nThere were [EMAIL PROTECTED] failed tests.\nFailures:\n" + + @tester.failures.each {|failed| puts "\n- #{failed}"} + + puts "\n\n" + +end + Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AbstractAssemblyMojo.java Fri May 5 09:42:10 2006 @@ -23,6 +23,7 @@ import org.apache.maven.artifact.InvalidRepositoryException; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.resolver.filter.AndArtifactFilter; +import org.apache.maven.model.Build; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.assembly.filter.AssemblyIncludesArtifactFilter; @@ -504,38 +505,29 @@ for ( Iterator j = set.iterator(); j.hasNext(); ) { - MavenProject reactorProject = (MavenProject) j.next(); + MavenProject moduleProject = (MavenProject) j.next(); - Artifact artifact = reactorProject.getArtifact(); - - if ( filter.include( artifact ) && artifact.getFile() != null ) + if ( filter.include( moduleProject.getArtifact() ) ) { - String name = artifact.getFile().getName(); + String name = moduleProject.getBuild().getFinalName(); ModuleSources sources = moduleSet.getSources(); if ( sources != null ) { String output = sources.getOutputDirectory(); - output = getOutputDirectory( output, includeBaseDirectory ); + output = getOutputDirectory( output, moduleProject, includeBaseDirectory ); FileSet moduleFileSet = new FileSet(); - moduleFileSet.setDirectory( reactorProject.getBasedir().getAbsolutePath() ); + moduleFileSet.setDirectory( moduleProject.getBasedir().getAbsolutePath() ); moduleFileSet.setOutputDirectory( output ); List excludesList = new ArrayList(); - excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), - reactorProject.getBuild().getDirectory() ) + "/**" ); - excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), - reactorProject.getBuild().getOutputDirectory() ) + - "/**" ); - excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), - reactorProject.getBuild().getTestOutputDirectory() ) + - "/**" ); - excludesList.add( PathUtils.toRelative( reactorProject.getBasedir(), - reactorProject.getReporting().getOutputDirectory() ) + - "/**" ); + excludesList.add( PathUtils.toRelative( moduleProject.getBasedir(), moduleProject.getBuild().getDirectory() ) + "/**" ); + excludesList.add( PathUtils.toRelative( moduleProject.getBasedir(), moduleProject.getBuild().getOutputDirectory() ) + "/**" ); + excludesList.add( PathUtils.toRelative( moduleProject.getBasedir(), moduleProject.getBuild().getTestOutputDirectory() ) + "/**" ); + excludesList.add( PathUtils.toRelative( moduleProject.getBasedir(), moduleProject.getReporting().getOutputDirectory() ) + "/**" ); moduleFileSet.setExcludes( excludesList ); moduleFileSets.add( moduleFileSet ); @@ -545,8 +537,18 @@ if ( binaries != null ) { + Artifact artifact = moduleProject.getArtifact(); + + if ( artifact.getFile() == null ) + { + throw new MojoExecutionException( + "Included module: " + + moduleProject.getId() + + " does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated." ); + } + String output = binaries.getOutputDirectory(); - output = getOutputDirectory( output, includeBaseDirectory ); + output = getOutputDirectory( output, moduleProject, includeBaseDirectory ); archiver.setDefaultDirectoryMode( Integer.parseInt( binaries.getDirectoryMode(), 8 ) ); @@ -582,7 +584,7 @@ if ( binaries.isIncludeDependencies() ) { - Set artifactSet = reactorProject.getArtifacts(); + Set artifactSet = moduleProject.getArtifacts(); for ( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); ) { @@ -638,7 +640,7 @@ if ( binaries.isIncludeDependencies() ) { - Set artifactSet = reactorProject.getArtifacts(); + Set artifactSet = moduleProject.getArtifacts(); for ( Iterator artifacts = artifactSet.iterator(); artifacts.hasNext(); ) { @@ -656,7 +658,7 @@ { // would be better to have a way to find out when a specified include or exclude // is never triggered and warn() it. - getLog().debug( "artifact: " + artifact + " not included" ); + getLog().debug( "module: " + moduleProject.getId() + " not included" ); } if ( !moduleFileSets.isEmpty() ) @@ -996,7 +998,7 @@ { DependencySet dependencySet = (DependencySet) i.next(); String output = dependencySet.getOutputDirectory(); - output = getOutputDirectory( output, includeBaseDirectory ); + output = getOutputDirectory( output, project, includeBaseDirectory ); archiver.setDefaultDirectoryMode( Integer.parseInt( dependencySet.getDirectoryMode(), 8 ) ); @@ -1212,7 +1214,7 @@ output = directory; } } - output = getOutputDirectory( output, includeBaseDirecetory ); + output = getOutputDirectory( output, project, includeBaseDirecetory ); String[] includes = (String[]) fileSet.getIncludes().toArray( EMPTY_STRING_ARRAY ); if ( includes.length == 0 ) @@ -1322,7 +1324,7 @@ source = this.tempFile; } - outputDirectory = getOutputDirectory( outputDirectory, includeBaseDirecetory ); + outputDirectory = getOutputDirectory( outputDirectory, project, includeBaseDirecetory ); // omit the last char if ends with / or \\ if ( outputDirectory.endsWith( "/" ) || outputDirectory.endsWith( "\\" ) ) @@ -1401,6 +1403,11 @@ */ private String getOutputDirectory( String output, boolean includeBaseDirectory ) { + return getOutputDirectory( output, null, includeBaseDirectory ); + } + + private String getOutputDirectory( String output, MavenProject project, boolean includeBaseDirectory ) + { String value = output; if ( value == null ) { @@ -1430,6 +1437,27 @@ value = value.substring( 1 ); } } + + if ( project != null ) + { + value = StringUtils.replace( value, "${groupId}", project.getGroupId() ); + value = StringUtils.replace( value, "${artifactId}", project.getArtifactId() ); + value = StringUtils.replace( value, "${version}", project.getVersion() ); + + Build build = project.getBuild(); + if ( build != null ) + { + value = StringUtils.replace( value, "${build.finalName}", build.getFinalName() ); + value = StringUtils.replace( value, "${finalName}", build.getFinalName() ); + } + else + { + getLog().warn( + "Project build section is null (must be a unit test, this is impossible in a real build). " + + "Skipping build.finalName and finalName substitution." ); + } + } + return value; } Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java?rev=400105&r1=400104&r2=400105&view=diff ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java (original) +++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java Fri May 5 09:42:10 2006 @@ -60,6 +60,19 @@ blacklist.put( "outputFileNameMapping", ofnmBlacklistings ); + + List odBlacklist = new ArrayList(); + + odBlacklist.add( "groupId" ); + odBlacklist.add( "artifactId" ); + odBlacklist.add( "version" ); + odBlacklist.add( "build.finalName" ); + + // wouldn't work, but just to future-proof this... + odBlacklist.add( "finalName" ); + + blacklist.put( "outputDirectory", odBlacklist ); + INTERPOLATION_BLACKLIST = blacklist; }