Author: jdcasey Date: Thu Aug 10 20:16:54 2006 New Revision: 430639 URL: http://svn.apache.org/viewvc?rev=430639&view=rev Log: [MASSEMBLY-104][MASSEMBLY-127] Added test verifying that file-mode changes work since the refactor.
Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/App.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/AppTest.java (with props) maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/verify.bsh Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt?rev=430639&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt Thu Aug 10 20:16:54 2006 @@ -0,0 +1 @@ +assembly:directory Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/goals.txt ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml?rev=430639&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml Thu Aug 10 20:16:54 2006 @@ -0,0 +1,31 @@ +<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>test</groupId> + <artifactId>file-mode-set</artifactId> + <packaging>jar</packaging> + <version>1.0-SNAPSHOT</version> + <name>Maven Quick Start Archetype</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptors> + <descriptor>src/assemble/src.xml</descriptor> + </descriptors> + </configuration> + </plugin> + </plugins> + </build> +</project> Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/pom.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml?rev=430639&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml Thu Aug 10 20:16:54 2006 @@ -0,0 +1,13 @@ +<assembly> + <id>src</id> + <formats> + <format>tar.gz</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <fileSets> + <fileSet> + <directory>src/main/java</directory> + <fileMode>0400</fileMode> + </fileSet> + </fileSets> +</assembly> Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/assemble/src.xml ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/App.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/App.java?rev=430639&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/App.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/App.java Thu Aug 10 20:16:54 2006 @@ -0,0 +1,13 @@ +package 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/file-modes/file-mode-set/src/main/java/test/App.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/main/java/test/App.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/AppTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/AppTest.java?rev=430639&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/AppTest.java (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/AppTest.java Thu Aug 10 20:16:54 2006 @@ -0,0 +1,38 @@ +package 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/file-modes/file-mode-set/src/test/java/test/AppTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/src/test/java/test/AppTest.java ------------------------------------------------------------------------------ svn:keywords = "Author Date Id Revision" Added: maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/verify.bsh URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/verify.bsh?rev=430639&view=auto ============================================================================== --- maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/verify.bsh (added) +++ maven/plugins/trunk/maven-assembly-plugin/src/it/file-modes/file-mode-set/verify.bsh Thu Aug 10 20:16:54 2006 @@ -0,0 +1,22 @@ +import java.io.*; + +boolean result = true; + +FileWriter writer = null; + +try +{ + File file = new File( basedir, "target/file-mode-set-1.0-SNAPSHOT-src.dir/src/main/java/test/App.java" ); + writer = new FileWriter( file ); + writer.write( "This is a test." ); + + System.out.println( "File: " + file + " should not be writable." ); + + result = false; +} +catch( IOException e ) +{ + result = true; +} + +return result;