r589 - in trunk: . src src/it src/it/collect-files src/it/collect-files/multi src/it/collect-files/multi/module1 src/it/collect-files/multi/module1/src src/it/collect-files/multi/module2 src/it/collect-files/multi/module2/src src/it/collect-files/multi/src src/it/collect-files/single src/it/collect-files/single/src src/it/send-email src/it/send-email/single
Author: tchemit Date: 2009-09-26 00:09:28 +0200 (Sat, 26 Sep 2009) New Revision: 589 Added: trunk/src/it/ trunk/src/it/collect-files/ trunk/src/it/collect-files/multi/ trunk/src/it/collect-files/multi/invoker.properties trunk/src/it/collect-files/multi/module1/ trunk/src/it/collect-files/multi/module1/pom.xml trunk/src/it/collect-files/multi/module1/src/ trunk/src/it/collect-files/multi/module1/src/module1-2.txt trunk/src/it/collect-files/multi/module1/src/module1.txt trunk/src/it/collect-files/multi/module2/ trunk/src/it/collect-files/multi/module2/pom.xml trunk/src/it/collect-files/multi/module2/src/ trunk/src/it/collect-files/multi/module2/src/module2-2.txt trunk/src/it/collect-files/multi/module2/src/module2.txt trunk/src/it/collect-files/multi/pom.xml trunk/src/it/collect-files/multi/src/ trunk/src/it/collect-files/multi/src/collect-files-2.txt trunk/src/it/collect-files/multi/src/collect-files.txt trunk/src/it/collect-files/multi/verify.groovy trunk/src/it/collect-files/single/ trunk/src/it/collect-files/single/invoker.properties trunk/src/it/collect-files/single/pom.xml trunk/src/it/collect-files/single/src/ trunk/src/it/collect-files/single/src/collect-files-2.txt trunk/src/it/collect-files/single/src/collect-files.txt trunk/src/it/collect-files/single/verify.groovy trunk/src/it/send-email/ trunk/src/it/send-email/single/ trunk/src/it/send-email/single/emailContent.txt trunk/src/it/send-email/single/invoker.properties trunk/src/it/send-email/single/pom.xml trunk/src/it/send-email/single/verify.groovy trunk/src/it/settings.xml Modified: trunk/pom.xml Log: [EVOLUTION #61] : ajouter des tests d'int?\195?\169gration Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-09-25 21:59:57 UTC (rev 588) +++ trunk/pom.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -995,7 +995,7 @@ </properties> </profile> - <!--profile> + <profile> <id>run-its</id> <build> <plugins> @@ -1025,7 +1025,7 @@ </plugin> </plugins> </build> - </profile--> + </profile> </profiles> Added: trunk/src/it/collect-files/multi/invoker.properties =================================================================== --- trunk/src/it/collect-files/multi/invoker.properties (rev 0) +++ trunk/src/it/collect-files/multi/invoker.properties 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,21 @@ +# A comma or space separated list of goals/phases to execute, may +# specify an empty list to execute the default goal of the IT project +invoker.goals=clean install + +# Optionally, a list of goals to run during further invocations of Maven +#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run + +# A comma or space separated list of profiles to activate +#invoker.profiles=run-all run-once + +# The value for the environment variable MAVEN_OPTS +#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m + +# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" +invoker.failureBehavior=fail-at-end + +# The expected result of the build, possible values are "success" (default) and "failure" +#invoker.buildResult=success + +# A boolean value controlling the -N flag, defaults to "false" +#invoker.nonRecursive=false Added: trunk/src/it/collect-files/multi/module1/pom.xml =================================================================== --- trunk/src/it/collect-files/multi/module1/pom.xml (rev 0) +++ trunk/src/it/collect-files/multi/module1/pom.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,72 @@ +<?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.nuiton.test</groupId> + <artifactId>collect-files-multi</artifactId> + <version>0</version> + </parent> + + <artifactId>module1</artifactId> + + <name>collect-files multi module1</name> + + <packaging>jar</packaging> + + <build> + + <plugins> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <id>collect-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <configuration> + <extraFiles>${basedir}/src/module1.txt</extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-2</id> + <configuration> + <extraFiles>${basedir}/src/module1-2.txt</extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-5</id> + <configuration> + <extraFiles>${basedir}/src/module1.txt, + ${basedir}/src/module1-2.txt</extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-6</id> + <configuration> + <extraFiles>${basedir}/src/module1.txt, + ${basedir}/src/module1-2.txt</extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-7</id> + <configuration> + <extraFiles>${basedir}/src/module1.txt, + ${basedir}/src/module1-2.txt</extraFiles> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> Added: trunk/src/it/collect-files/multi/module1/src/module1-2.txt =================================================================== --- trunk/src/it/collect-files/multi/module1/src/module1-2.txt (rev 0) +++ trunk/src/it/collect-files/multi/module1/src/module1-2.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +This is the file content to upload \ No newline at end of file Added: trunk/src/it/collect-files/multi/module1/src/module1.txt =================================================================== --- trunk/src/it/collect-files/multi/module1/src/module1.txt (rev 0) +++ trunk/src/it/collect-files/multi/module1/src/module1.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +This is the file content to upload \ No newline at end of file Added: trunk/src/it/collect-files/multi/module2/pom.xml =================================================================== --- trunk/src/it/collect-files/multi/module2/pom.xml (rev 0) +++ trunk/src/it/collect-files/multi/module2/pom.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,76 @@ +<?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.nuiton.test</groupId> + <artifactId>collect-files-multi</artifactId> + <version>0</version> + </parent> + + <artifactId>module2</artifactId> + + <name>collect-files multi module2</name> + + <packaging>jar</packaging> + + <build> + + <plugins> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + + <execution> + <id>collect-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <configuration> + <extraFiles>${basedir}/src/module2.txt</extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-2</id> + <configuration> + <extraFiles>${basedir}/src/module2-2.txt</extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-5</id> + <configuration> + <extraFiles>${basedir}/src/module2.txt, + ${basedir}/src/module2-2.txt + </extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-6</id> + <configuration> + <extraFiles>${basedir}/src/module2.txt, + ${basedir}/src/module2-2.txt + </extraFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-7</id> + <configuration> + <extraFiles>${basedir}/src/module2.txt, + ${basedir}/src/module2-2.txt + </extraFiles> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> Added: trunk/src/it/collect-files/multi/module2/src/module2-2.txt =================================================================== --- trunk/src/it/collect-files/multi/module2/src/module2-2.txt (rev 0) +++ trunk/src/it/collect-files/multi/module2/src/module2-2.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +This is the file content to upload \ No newline at end of file Added: trunk/src/it/collect-files/multi/module2/src/module2.txt =================================================================== --- trunk/src/it/collect-files/multi/module2/src/module2.txt (rev 0) +++ trunk/src/it/collect-files/multi/module2/src/module2.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +This is the file content to upload \ No newline at end of file Added: trunk/src/it/collect-files/multi/pom.xml =================================================================== --- trunk/src/it/collect-files/multi/pom.xml (rev 0) +++ trunk/src/it/collect-files/multi/pom.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,155 @@ +<?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.nuiton.test</groupId> + <artifactId>collect-files-multi</artifactId> + <version>0</version> + + <name>Collect-files single</name> + <packaging>pom</packaging> + <description>collect-files Test plugin for a single module.</description> + + <url>http://www.foo.com</url> + + <modules> + <module>module1</module> + <module>module2</module> + </modules> + + <properties> + + <pluginVersion>@pom.version@</pluginVersion> + + <!-- default encoding --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + + </properties> + + <build> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${pluginVersion}</version> + </plugin> + </plugins> + </pluginManagement> + + <plugins> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <id>collect-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <verbose>true</verbose> + <extraFiles>${basedir}/src/collect-files.txt</extraFiles> + <descriptionFile>target/collect.properties</descriptionFile> + <copyFiles>false</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-2</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <extraFiles>${basedir}/src/collect-files-2.txt</extraFiles> + <outputDirectory>target/collect2</outputDirectory> + <descriptionFile>target/collect2.properties</descriptionFile> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-3</id> + <inherited>false</inherited> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <outputDirectory>target/collect3</outputDirectory> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-4</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>compile</phase> + <configuration> + <outputDirectory>target/collect3</outputDirectory> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-5</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <includeAttached>false</includeAttached> + <outputDirectory>target/collect5</outputDirectory> + <extraFiles>${basedir}/src/collect-files.txt, + ${basedir}/src/collect-files-2.txt</extraFiles> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-6</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <dryRun>true</dryRun> + <outputDirectory>target/collect6</outputDirectory> + <extraFiles>${basedir}/src/collect-files.txt, + ${basedir}/src/collect-files-2.txt + </extraFiles> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-7</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <skip>true</skip> + <outputDirectory>target/collect7</outputDirectory> + <extraFiles>${basedir}/src/collect-files.txt, + ${basedir}/src/collect-files-2.txt + </extraFiles> + <copyFiles>true</copyFiles> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + + </build> + +</project> Added: trunk/src/it/collect-files/multi/src/collect-files-2.txt =================================================================== --- trunk/src/it/collect-files/multi/src/collect-files-2.txt (rev 0) +++ trunk/src/it/collect-files/multi/src/collect-files-2.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +collect-files-2 content \ No newline at end of file Added: trunk/src/it/collect-files/multi/src/collect-files.txt =================================================================== --- trunk/src/it/collect-files/multi/src/collect-files.txt (rev 0) +++ trunk/src/it/collect-files/multi/src/collect-files.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +collect-files content \ No newline at end of file Added: trunk/src/it/collect-files/multi/verify.groovy =================================================================== --- trunk/src/it/collect-files/multi/verify.groovy (rev 0) +++ trunk/src/it/collect-files/multi/verify.groovy 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,112 @@ + +// collect-files +assert new File(basedir, 'target/collect.properties').exists(); +assert !new File(basedir, 'target/collect').exists(); + +assert !new File(basedir, 'module1/target/collect.properties').exists(); +assert !new File(basedir, 'module1/target/collect').exists(); + +assert !new File(basedir, 'module2/target/collect.properties').exists(); +assert !new File(basedir, 'module2/target/collect').exists(); + +content = new File(basedir, 'target/collect.properties').text; +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/pom.xml' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/src/collect-files.txt' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/module1/target/module1-0.jar' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/module1/src/module1.txt' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/module2/target/module2-0.jar' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/module2/src/module2.txt' ); + +// collect-files-2 +assert new File(basedir, 'target/collect2.properties').exists(); +assert new File(basedir, 'target/collect2').exists(); + +assert !new File(basedir, 'module1/target/collect2.properties').exists(); +assert !new File(basedir, 'module1/target/collect2').exists(); + +assert !new File(basedir, 'module2/target/collect2').exists(); +assert !new File(basedir, 'module2/target/collect2.properties').exists(); + +assert new File(basedir, 'target/collect2/org.nuiton.test--collect-files-multi/pom.xml').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--collect-files-multi/collect-files-2.txt').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--module1/module1-0.jar').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--module1/module1-2.txt').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--module2/module2-0.jar').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--module2/module2-2.txt').exists(); + +content = new File(basedir, 'target/collect2.properties').text; +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/target/collect2/org.nuiton.test--collect-files-multi/pom.xml' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/target/collect2/org.nuiton.test--collect-files-multi/collect-files-2.txt' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/target/collect2/org.nuiton.test--module1/module1-0.jar' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/target/collect2/org.nuiton.test--module1/module1-2.txt' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/target/collect2/org.nuiton.test--module2/module2-0.jar' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/multi/target/collect2/org.nuiton.test--module2/module2-2.txt' ); + +// collect-files-3 +assert !new File(basedir, 'target/collect3.properties').exists(); +assert new File(basedir, 'target/collect3').exists(); + +assert !new File(basedir, 'module1/target/collect3.properties').exists(); +assert !new File(basedir, 'module1/target/collect3').exists(); + +assert !new File(basedir, 'module2/target/collect3.properties').exists(); +assert !new File(basedir, 'module2/target/collect3').exists(); + +assert new File(basedir, 'target/collect3/org.nuiton.test--collect-files-multi/pom.xml').exists(); +assert !new File(basedir, 'target/collect3/org.nuiton.test--module1/module1-0.jar').exists(); +assert !new File(basedir, 'target/collect3/org.nuiton.test--module1/module2-0.jar').exists(); + +// collect-files-4 +assert !new File(basedir, 'target/collect4.properties').exists(); +assert !new File(basedir, 'target/collect4').exists(); + +assert !new File(basedir, 'module1/target/collect4.properties').exists(); +assert !new File(basedir, 'module1/target/collect4').exists(); + +assert !new File(basedir, 'module2/target/collect4.properties').exists(); +assert !new File(basedir, 'module2/target/collect4').exists(); + +// collect-files-5 +assert new File(basedir, 'target/collect5').exists(); +assert !new File(basedir, 'target/collect5.properties').exists(); + +assert !new File(basedir, 'module1/target/collect5').exists(); +assert !new File(basedir, 'module1/target/collect5.properties').exists(); + +assert !new File(basedir, 'module2/target/collect5').exists(); +assert !new File(basedir, 'module2/target/collect5.properties').exists(); + +assert !new File(basedir, 'target/collect5/org.nuiton.test--collect-files-multi/pom.xml').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--collect-files-multi/collect-files.txt').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--collect-files-multi/collect-files-2.txt').exists(); + +assert !new File(basedir, 'target/collect3/org.nuiton.test--module1/module1-0.jar').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--module1/module1.txt').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--module1/module1-2.txt').exists(); + +assert !new File(basedir, 'target/collect3/org.nuiton.test--module1/module2-0.jar').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--module2/module2.txt').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--module2/module2-2.txt').exists(); + +// collect-files-6 +assert !new File(basedir, 'target/collect6.properties').exists(); +assert !new File(basedir, 'target/collect6').exists(); + +assert !new File(basedir, 'module1/target/collect6').exists(); +assert !new File(basedir, 'module1/target/collect6.properties').exists(); + +assert !new File(basedir, 'module2/target/collect6').exists(); +assert !new File(basedir, 'module2/target/collect6.properties').exists(); + +// collect-files-7 +assert !new File(basedir, 'target/collect7.properties').exists(); +assert !new File(basedir, 'target/collect7').exists(); + +assert !new File(basedir, 'module1/target/collect7').exists(); +assert !new File(basedir, 'module1/target/collect7.properties').exists(); + +assert !new File(basedir, 'module2/target/collect7').exists(); +assert !new File(basedir, 'module2/target/collect7.properties').exists(); + +return true; + Added: trunk/src/it/collect-files/single/invoker.properties =================================================================== --- trunk/src/it/collect-files/single/invoker.properties (rev 0) +++ trunk/src/it/collect-files/single/invoker.properties 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,21 @@ +# A comma or space separated list of goals/phases to execute, may +# specify an empty list to execute the default goal of the IT project +invoker.goals=clean verify + +# Optionally, a list of goals to run during further invocations of Maven +#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run + +# A comma or space separated list of profiles to activate +#invoker.profiles=its,jdk15 + +# The value for the environment variable MAVEN_OPTS +#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m + +# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" +invoker.failureBehavior=fail-at-end + +# The expected result of the build, possible values are "success" (default) and "failure" +#invoker.buildResult=success + +# A boolean value controlling the -N flag, defaults to "false" +#invoker.nonRecursive=false Added: trunk/src/it/collect-files/single/pom.xml =================================================================== --- trunk/src/it/collect-files/single/pom.xml (rev 0) +++ trunk/src/it/collect-files/single/pom.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,150 @@ +<?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.nuiton.test</groupId> + <artifactId>collect-files-single</artifactId> + <version>0</version> + + <name>Collect-files single</name> + <packaging>jar</packaging> + <description>collect-files Test plugin for a single module.</description> + + <url>http://www.foo.com</url> + + <properties> + + <pluginVersion>@pom.version@</pluginVersion> + + <!-- default encoding --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + + </properties> + + <build> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${pluginVersion}</version> + </plugin> + </plugins> + </pluginManagement> + + <plugins> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <id>collect-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <verbose>true</verbose> + <extraFiles>${basedir}/src/collect-files.txt</extraFiles> + <descriptionFile>target/collect.properties</descriptionFile> + <copyFiles>false</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-2</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <extraFiles>${basedir}/src/collect-files-2.txt</extraFiles> + <outputDirectory>target/collect2</outputDirectory> + <descriptionFile>target/collect2.properties</descriptionFile> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-3</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <outputDirectory>target/collect3</outputDirectory> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-4</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>compile</phase> + <configuration> + <outputDirectory>target/collect3</outputDirectory> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-5</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <includeAttached>false</includeAttached> + <outputDirectory>target/collect5</outputDirectory> + <extraFiles>${basedir}/src/collect-files.txt, + ${basedir}/src/collect-files-2.txt + </extraFiles> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-6</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <dryRun>true</dryRun> + <outputDirectory>target/collect6</outputDirectory> + <extraFiles>${basedir}/src/collect-files.txt, + ${basedir}/src/collect-files-2.txt + </extraFiles> + <copyFiles>true</copyFiles> + </configuration> + </execution> + + <execution> + <id>collect-files-7</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <skip>true</skip> + <outputDirectory>target/collect7</outputDirectory> + <extraFiles>${basedir}/src/collect-files.txt, + ${basedir}/src/collect-files-2.txt + </extraFiles> + <copyFiles>true</copyFiles> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + + </build> + +</project> Added: trunk/src/it/collect-files/single/src/collect-files-2.txt =================================================================== --- trunk/src/it/collect-files/single/src/collect-files-2.txt (rev 0) +++ trunk/src/it/collect-files/single/src/collect-files-2.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +collect-files-2 content \ No newline at end of file Added: trunk/src/it/collect-files/single/src/collect-files.txt =================================================================== --- trunk/src/it/collect-files/single/src/collect-files.txt (rev 0) +++ trunk/src/it/collect-files/single/src/collect-files.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +collect-files content \ No newline at end of file Added: trunk/src/it/collect-files/single/verify.groovy =================================================================== --- trunk/src/it/collect-files/single/verify.groovy (rev 0) +++ trunk/src/it/collect-files/single/verify.groovy 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,46 @@ + +// collect-files +assert new File(basedir, 'target/collect.properties').exists(); +assert !new File(basedir, 'target/collect').exists(); +content = new File(basedir, 'target/collect.properties').text; +assert content.contains( '/maven-helper-plugin/target/its/collect-files/single/target/collect-files-single-0.jar' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/single/src/collect-files.txt' ); + +// collect-files-2 +assert new File(basedir, 'target/collect2.properties').exists(); +assert new File(basedir, 'target/collect2').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--collect-files-single/collect-files-single-0.jar').exists(); +assert new File(basedir, 'target/collect2/org.nuiton.test--collect-files-single/collect-files-2.txt').exists(); + +content = new File(basedir, 'target/collect2.properties').text; +assert content.contains( '/maven-helper-plugin/target/its/collect-files/single/target/collect2/org.nuiton.test--collect-files-single/collect-files-single-0.jar' ); +assert content.contains( '/maven-helper-plugin/target/its/collect-files/single/target/collect2/org.nuiton.test--collect-files-single/collect-files-2.txt' ); + +// collect-files-3 +assert !new File(basedir, 'target/collect3.properties').exists(); +assert new File(basedir, 'target/collect3').exists(); +assert new File(basedir, 'target/collect3/org.nuiton.test--collect-files-single/collect-files-single-0.jar').exists(); + +// collect-files-4 +assert !new File(basedir, 'target/collect4.properties').exists(); +assert !new File(basedir, 'target/collect4').exists(); + + +// collect-files-5 +assert !new File(basedir, 'target/collect5.properties').exists(); +assert new File(basedir, 'target/collect5').exists(); + +assert !new File(basedir, 'target/collect5/org.nuiton.test--collect-files-single/collect-files-single-0.jar').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--collect-files-single/collect-files.txt').exists(); +assert new File(basedir, 'target/collect5/org.nuiton.test--collect-files-single/collect-files-2.txt').exists(); + +// collect-files-6 +assert !new File(basedir, 'target/collect6.properties').exists(); +assert !new File(basedir, 'target/collect6').exists(); + + +// collect-files-7 +assert !new File(basedir, 'target/collect7.properties').exists(); +assert !new File(basedir, 'target/collect7').exists(); + +return true; Added: trunk/src/it/send-email/single/emailContent.txt =================================================================== --- trunk/src/it/send-email/single/emailContent.txt (rev 0) +++ trunk/src/it/send-email/single/emailContent.txt 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1 @@ +This is the email Content ! \ No newline at end of file Added: trunk/src/it/send-email/single/invoker.properties =================================================================== --- trunk/src/it/send-email/single/invoker.properties (rev 0) +++ trunk/src/it/send-email/single/invoker.properties 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,21 @@ +# A comma or space separated list of goals/phases to execute, may +# specify an empty list to execute the default goal of the IT project +invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:send-email + +# Optionally, a list of goals to run during further invocations of Maven +#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:send-email + +# A comma or space separated list of profiles to activate +#invoker.profiles=its,jdk15 + +# The value for the environment variable MAVEN_OPTS +#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m + +# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" +invoker.failureBehavior=fail-at-end + +# The expected result of the build, possible values are "success" (default) and "failure" +#invoker.buildResult=success + +# A boolean value controlling the -N flag, defaults to "false" +#invoker.nonRecursive=false Added: trunk/src/it/send-email/single/pom.xml =================================================================== --- trunk/src/it/send-email/single/pom.xml (rev 0) +++ trunk/src/it/send-email/single/pom.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,88 @@ +<?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.nuiton.test</groupId> + <artifactId>single</artifactId> + <version>0</version> + + <name>Maven-helper-plugin single</name> + <packaging>jar</packaging> + <description>Maven helper plugin for a single module.</description> + + <url>http://www.foo.com</url> + + <properties> + + <pluginVersion>@pom.version@</pluginVersion> + + <!-- default encoding --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + + </properties> + + <build> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${pluginVersion}</version> + <configuration> + <!-- Send nothing ! --> + <dryRun>true</dryRun> + + <serverId>redmine-local</serverId> + + <emailTitle>[TEST] - ${project.name} ${project.version} send-email</emailTitle> + <emailContentFile>emailContent.txt</emailContentFile> + <mailSender> + <name>Nuiton Release Notification</name> + <email>noreply@noway.fr</email> + </mailSender> + <toAddresses> + <item>chemit@codelutin.com</item> + </toAddresses> + <smtpHost>smtp</smtpHost> + </configuration> + </plugin> + </plugins> + </pluginManagement> + + <!--<plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>send-email</goal> + </goals> + <phase>validate</phase> + </execution> + </executions> + <configuration> + Send nothing ! + <dryRun>true</dryRun> + + <serverId>redmine-local</serverId> + + <emailTitle>[TEST] - ${project.name} ${project.version} send-email</emailTitle> + <emailContentFile>emailContent.txt</emailContentFile> + <mailSender> + <name>Nuiton Release Notification</name> + <email>noreply@noway.fr</email> + </mailSender> + <toAddresses> + <item>chemit@codelutin.com</item> + </toAddresses> + <smtpHost>smtp</smtpHost> + </configuration> + </plugin> + </plugins>--> + </build> + +</project> Added: trunk/src/it/send-email/single/verify.groovy =================================================================== --- trunk/src/it/send-email/single/verify.groovy (rev 0) +++ trunk/src/it/send-email/single/verify.groovy 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,26 @@ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +assert new File(basedir, 'build.log').exists(); + +//content = new File(basedir, 'build.log').text; + +//assert content.contains( 'Test report.' ); + +return true; Added: trunk/src/it/settings.xml =================================================================== --- trunk/src/it/settings.xml (rev 0) +++ trunk/src/it/settings.xml 2009-09-25 22:09:28 UTC (rev 589) @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<settings> + + <servers> + <server> + <id>redmine-local</id> + <username>chemit</username> + <password>{i4S9W9sEp0gH4jrveLOLJlL0O0D5TpyIplB4Abql5o8=}</password> + </server> + </servers> + + <profiles> + <profile> + <id>it-repo</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <repositories> + <repository> + <id>local.central</id> + <url>file:///@localRepository@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>local.central</id> + <url>file:///@localRepository@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> +</settings>
participants (1)
-
tchemit@users.nuiton.org