Maven-helper-plugin-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 427 discussions
Author: tchemit
Date: 2009-09-26 00:15:34 +0200 (Sat, 26 Sep 2009)
New Revision: 590
Modified:
trunk/src/it/send-email/single/pom.xml
Log:
at the moment do not test send-email with serverId (should hudson maven be in 2.1.0 at least but is in 2.0.10)
Modified: trunk/src/it/send-email/single/pom.xml
===================================================================
--- trunk/src/it/send-email/single/pom.xml 2009-09-25 22:09:28 UTC (rev 589)
+++ trunk/src/it/send-email/single/pom.xml 2009-09-25 22:15:34 UTC (rev 590)
@@ -35,7 +35,7 @@
<!-- Send nothing ! -->
<dryRun>true</dryRun>
- <serverId>redmine-local</serverId>
+ <!--<serverId>redmine-local</serverId>-->
<emailTitle>[TEST] - ${project.name} ${project.version} send-email</emailTitle>
<emailContentFile>emailContent.txt</emailContentFile>
1
0
25 Sep '09
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(a)noway.fr</email>
+ </mailSender>
+ <toAddresses>
+ <item>chemit(a)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(a)noway.fr</email>
+ </mailSender>
+ <toAddresses>
+ <item>chemit(a)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>
1
0
r588 - in trunk: . src/main/java/org/nuiton src/main/java/org/nuiton/components src/main/java/org/nuiton/components/cipher src/main/java/org/nuiton/components/sec src/main/java/org/nuiton/components/sec/dispatcher src/main/java/org/nuiton/mail/plugin src/main/resources/META-INF/plexus
by tchemit@users.nuiton.org 25 Sep '09
by tchemit@users.nuiton.org 25 Sep '09
25 Sep '09
Author: tchemit
Date: 2009-09-25 23:59:57 +0200 (Fri, 25 Sep 2009)
New Revision: 588
Added:
trunk/src/main/java/org/nuiton/components/
trunk/src/main/java/org/nuiton/components/cipher/
trunk/src/main/java/org/nuiton/components/cipher/DefaultPlexusCipher.java
trunk/src/main/java/org/nuiton/components/sec/
trunk/src/main/java/org/nuiton/components/sec/dispatcher/
trunk/src/main/java/org/nuiton/components/sec/dispatcher/DefaultSecDispatcher.java
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java
trunk/src/main/resources/META-INF/plexus/components.xml
Log:
[ANOMALIE #60] : rendre le plugin compatible 2.2.x
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-09-25 21:40:16 UTC (rev 587)
+++ trunk/pom.xml 2009-09-25 21:59:57 UTC (rev 588)
@@ -56,24 +56,27 @@
</dependency>
<dependency>
- <optional>true</optional>
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-sec-dispatcher</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
- <optional>true</optional>
+ <groupId>org.sonatype.plexus</groupId>
+ <artifactId>plexus-cipher</artifactId>
+ <version>1.5</version>
+ </dependency>
+
+ <dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9-stable-1</version>
</dependency>
<dependency>
- <optional>true</optional>
<groupId>plexus</groupId>
<artifactId>plexus-mail-sender-api</artifactId>
- <version>1.0-alpha-2</version>
+ <version>${plexusMailSender.version}</version>
<exclusions>
<exclusion>
<groupId>plexus</groupId>
@@ -83,10 +86,9 @@
</dependency>
<dependency>
- <optional>true</optional>
<groupId>plexus</groupId>
<artifactId>plexus-mail-sender-javamail</artifactId>
- <version>1.0-alpha-2</version>
+ <version>${plexusMailSender.version}</version>
<exclusions>
<exclusion>
<groupId>plexus</groupId>
@@ -96,10 +98,9 @@
</dependency>
<dependency>
- <optional>true</optional>
<groupId>plexus</groupId>
<artifactId>plexus-mail-sender-simple</artifactId>
- <version>1.0-alpha-2</version>
+ <version>${plexusMailSender.version}</version>
<exclusions>
<exclusion>
<groupId>plexus</groupId>
@@ -118,12 +119,19 @@
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
+ <artifactId>maven-model</artifactId>
<version>${maven.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${maven.version}</version>
<scope>provided</scope>
@@ -184,7 +192,7 @@
<name>Maven helper plugin</name>
<description>Plugin d'aide pour les projets nuiton</description>
<inceptionYear>2009</inceptionYear>
- <url>http://maven-site.nuiton.org/${project.artifactId}</url>
+ <url>http://maven-site.nuiton.org/maven-helper-plugin</url>
<organization>
<name>CodeLutin</name>
@@ -234,7 +242,9 @@
<listId>${project.artifactId}</listId>
- <maven.version>2.1.0</maven.version>
+ <maven.version>2.2.1</maven.version>
+ <plexusMailSender.version>1.0-alpha-2</plexusMailSender.version>
+ <javadoc.version>2.4</javadoc.version>
<maven.src.dir>${basedir}/src</maven.src.dir>
<maven.compile.source>1.6</maven.compile.source>
@@ -250,8 +260,6 @@
<!-- to activate generation of reports and javadoc when doing a site -->
<maven.reports.generate>true</maven.reports.generate>
- <javadoc.version>2.4</javadoc.version>
-
<license.licenseName>lgpl_v3</license.licenseName>
<repository.home.url>http://maven.nuiton.org/release</repository.home.url>
@@ -583,6 +591,11 @@
<version>2.5</version>
</plugin>
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.3</version>
+ </plugin>
+
</plugins>
</pluginManagement>
</build>
@@ -981,6 +994,39 @@
<maven.reports.dependencyLocationsEnabled>false</maven.reports.dependencyLocationsEnabled>
</properties>
</profile>
+
+ <!--profile>
+ <id>run-its</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <pomIncludes>
+ <pomInclude>collect-files/single/pom.xml</pomInclude>
+ <pomInclude>collect-files/multi/pom.xml</pomInclude>
+ <pomInclude>send-email/single/pom.xml</pomInclude>
+ </pomIncludes>
+ <postBuildHookScript>verify</postBuildHookScript>
+ <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>install</goal>
+ <goal>run</goal>
+ </goals>
+ <phase>integration-test</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile-->
+
</profiles>
</project>
Added: trunk/src/main/java/org/nuiton/components/cipher/DefaultPlexusCipher.java
===================================================================
--- trunk/src/main/java/org/nuiton/components/cipher/DefaultPlexusCipher.java (rev 0)
+++ trunk/src/main/java/org/nuiton/components/cipher/DefaultPlexusCipher.java 2009-09-25 21:59:57 UTC (rev 588)
@@ -0,0 +1,220 @@
+package org.nuiton.components.cipher;
+
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.security.Provider;
+import java.security.Security;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.sonatype.plexus.components.cipher.PBECipher;
+import org.sonatype.plexus.components.cipher.PlexusCipher;
+import org.sonatype.plexus.components.cipher.PlexusCipherException;
+
+/**
+ * This class was forked from plexus-cipher:1.4.
+ *
+ * Since maven 2.2.x can not use this plexus component in a mojo
+ * from the original artifact.
+ *
+ * @plexus.component role="org.sonatype.plexus.components.cipher.PlexusCipher" role-hint="maven-helper-plugin"
+ * @author Oleg Gusakov</a>
+ */
+public class DefaultPlexusCipher
+extends AbstractLogEnabled
+implements PlexusCipher
+{
+
+ private static final Pattern ENCRYPTED_STRING_PATTERN = Pattern.compile( ".*?[^\\\\]?\\{(.*?[^\\\\])\\}.*" );
+
+ private final PBECipher _cipher;
+
+ // ---------------------------------------------------------------
+ public DefaultPlexusCipher()
+ throws PlexusCipherException
+ {
+ _cipher = new PBECipher();
+ }
+ // ---------------------------------------------------------------
+ public String encrypt( final String str, final String passPhrase )
+ throws PlexusCipherException
+ {
+ if ( str == null || str.length() < 1 )
+ {
+ return str;
+ }
+
+ return _cipher.encrypt64( str, passPhrase );
+ }
+
+ // ---------------------------------------------------------------
+ public String encryptAndDecorate( final String str, final String passPhrase )
+ throws PlexusCipherException
+ {
+ return decorate( encrypt( str, passPhrase ) );
+ }
+
+ // ---------------------------------------------------------------
+ public String decrypt( final String str, final String passPhrase )
+ throws PlexusCipherException
+ {
+ if ( str == null || str.length() < 1 )
+ {
+ return str;
+ }
+
+ return _cipher.decrypt64( str, passPhrase );
+ }
+
+ // ---------------------------------------------------------------
+ public String decryptDecorated( final String str, final String passPhrase )
+ throws PlexusCipherException
+ {
+ if ( str == null || str.length() < 1 )
+ {
+ return str;
+ }
+
+ if ( isEncryptedString( str ) )
+ {
+ return decrypt( unDecorate( str ), passPhrase );
+ }
+
+ return decrypt( str, passPhrase );
+ }
+
+ // ----------------------------------------------------------------------------
+ public boolean isEncryptedString( final String str )
+ {
+ if ( str == null || str.length() < 1 )
+ {
+ return false;
+ }
+
+ Matcher matcher = ENCRYPTED_STRING_PATTERN.matcher( str );
+
+ return matcher.matches() || matcher.find();
+ }
+
+ // ----------------------------------------------------------------------------
+ // -------------------
+ public String unDecorate( final String str )
+ throws PlexusCipherException
+ {
+ Matcher matcher = ENCRYPTED_STRING_PATTERN.matcher( str );
+
+ if ( matcher.matches() || matcher.find() )
+ {
+ return matcher.group( 1 );
+ }
+ else
+ {
+ throw new PlexusCipherException( "default.plexus.cipher.badEncryptedPassword" );
+ }
+ }
+
+ // ----------------------------------------------------------------------------
+ // -------------------
+ public String decorate( final String str )
+ {
+ return ENCRYPTED_STRING_DECORATION_START + ( str == null ? "" : str ) + ENCRYPTED_STRING_DECORATION_STOP;
+ }
+
+ // ---------------------------------------------------------------
+ // ---------------------------------------------------------------
+ // ***************************************************************
+ /**
+ * Exploratory part. This method returns all available services types
+ */
+ public static String[] getServiceTypes()
+ {
+ Set result = new HashSet();
+
+ // All all providers
+ Provider[] providers = Security.getProviders();
+ for ( int i = 0; i < providers.length; i++ )
+ {
+ // Get services provided by each provider
+ Set keys = providers[i].keySet();
+ for ( Iterator it = keys.iterator(); it.hasNext(); )
+ {
+ String key = (String) it.next();
+ key = key.split( " " )[0];
+
+ if ( key.startsWith( "Alg.Alias." ) )
+ {
+ // Strip the alias
+ key = key.substring( 10 );
+ }
+ int ix = key.indexOf( '.' );
+ result.add( key.substring( 0, ix ) );
+ }
+ }
+ return (String[]) result.toArray( new String[result.size()] );
+ }
+
+ /**
+ * This method returns the available implementations for a service type
+ */
+ public static String[] getCryptoImpls( final String serviceType )
+ {
+ Set result = new HashSet();
+
+ // All all providers
+ Provider[] providers = Security.getProviders();
+ for ( int i = 0; i < providers.length; i++ )
+ {
+ // Get services provided by each provider
+ Set keys = providers[i].keySet();
+ for ( Iterator it = keys.iterator(); it.hasNext(); )
+ {
+ String key = (String) it.next();
+ key = key.split( " " )[0];
+
+ if ( key.startsWith( serviceType + "." ) )
+ {
+ result.add( key.substring( serviceType.length() + 1 ) );
+ }
+ else if ( key.startsWith( "Alg.Alias." + serviceType + "." ) )
+ {
+ // This is an alias
+ result.add( key.substring( serviceType.length() + 11 ) );
+ }
+ }
+ }
+ return (String[]) result.toArray( new String[result.size()] );
+ }
+
+ // ---------------------------------------------------------------
+ public static void main( final String[] args )
+ {
+// Security.addProvider( new BouncyCastleProvider() );
+
+ String[] serviceTypes = getServiceTypes();
+ if ( serviceTypes != null )
+ {
+ for ( int i = 0; i < serviceTypes.length; i++ )
+ {
+ String serviceType = serviceTypes[i];
+ String[] serviceProviders = getCryptoImpls( serviceType );
+ if ( serviceProviders != null )
+ {
+ System.out.println( serviceType + ": provider list" );
+ for ( int j = 0; j < serviceProviders.length; j++ )
+ {
+ String provider = serviceProviders[j];
+ System.out.println( " " + provider );
+ }
+ }
+ else
+ {
+ System.out.println( serviceType + ": does not have any providers in this environment" );
+ }
+ }
+ }
+ }
+ //---------------------------------------------------------------
+ //---------------------------------------------------------------
+}
Property changes on: trunk/src/main/java/org/nuiton/components/cipher/DefaultPlexusCipher.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: trunk/src/main/java/org/nuiton/components/sec/dispatcher/DefaultSecDispatcher.java
===================================================================
--- trunk/src/main/java/org/nuiton/components/sec/dispatcher/DefaultSecDispatcher.java (rev 0)
+++ trunk/src/main/java/org/nuiton/components/sec/dispatcher/DefaultSecDispatcher.java 2009-09-25 21:59:57 UTC (rev 588)
@@ -0,0 +1,321 @@
+package org.nuiton.components.sec.dispatcher;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
+import org.sonatype.plexus.components.cipher.PlexusCipher;
+import org.sonatype.plexus.components.cipher.PlexusCipherException;
+import org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor;
+import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
+import org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException;
+import org.sonatype.plexus.components.sec.dispatcher.SecUtil;
+import org.sonatype.plexus.components.sec.dispatcher.model.SettingsSecurity;
+
+/**
+ * This class was forked from plexus-sec-dispatcher:1.3.1.
+ *
+ * Since maven 2.2.x can not use this plexus component in a mojo
+ * from the original artifact.
+ *
+ * @plexus.component role-hint="maven-helper-plugin"
+ * @author Oleg Gusakov</a>
+ */
+public class DefaultSecDispatcher
+extends AbstractLogEnabled
+implements SecDispatcher
+{
+ public static final String SYSTEM_PROPERTY_SEC_LOCATION = "settings.security";
+
+ public static final String TYPE_ATTR = "type";
+
+ public static final char ATTR_START = '[';
+
+ public static final char ATTR_STOP = ']';
+
+ /**
+ * DefaultHandler
+ *
+ * @plexus.requirement role-hint="maven-helper-plugin"
+ */
+ protected PlexusCipher _cipher;
+
+ /**
+ * All available dispatchers
+ *
+ * @plexus.requirement role="org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor"
+ */
+ protected Map _decryptors;
+
+ /**
+ *
+ * @plexus.configuration default-value="~/.settings-security.xml"
+ */
+ protected String _configurationFile = "~/.settings-security.xml";
+
+ // ---------------------------------------------------------------
+ public String decrypt( String str )
+ throws SecDispatcherException
+ {
+ if( ! isEncryptedString( str ) )
+ return str;
+
+ String bare = null;
+
+ try
+ {
+ bare = _cipher.unDecorate( str );
+ }
+ catch ( PlexusCipherException e1 )
+ {
+ throw new SecDispatcherException( e1 );
+ }
+
+ try
+ {
+ Map attr = stripAttributes( bare );
+
+ String res = null;
+
+ SettingsSecurity sec = getSec();
+
+ if( attr == null || attr.get( "type" ) == null )
+ {
+ String master = getMaster( sec );
+
+ res = _cipher.decrypt( bare, master );
+ }
+ else
+ {
+ String type = (String) attr.get( TYPE_ATTR );
+
+ if( _decryptors == null )
+ throw new SecDispatcherException( "plexus container did not supply any required dispatchers - cannot lookup "+type );
+
+ Map conf = SecUtil.getConfig( sec, type );
+
+ PasswordDecryptor dispatcher = (PasswordDecryptor) _decryptors.get( type );
+
+ if( dispatcher == null )
+ throw new SecDispatcherException( "no dispatcher for hint "+type );
+
+ String pass = attr == null ? bare : strip( bare );
+
+ return dispatcher.decrypt( pass, attr, conf );
+ }
+
+ return res;
+ }
+ catch ( Exception e )
+ {
+ throw new SecDispatcherException(e);
+ }
+ }
+
+ private String strip( String str )
+ {
+ int pos = str.indexOf( ATTR_STOP );
+
+ if( pos == str.length() )
+ return null;
+
+ if( pos != -1 )
+ return str.substring( pos+1 );
+
+ return str;
+ }
+
+ private Map stripAttributes( String str )
+ {
+ int start = str.indexOf( ATTR_START );
+ int stop = str.indexOf( ATTR_STOP );
+ if ( start != -1 && stop != -1 && stop > start )
+ {
+ if( stop == start+1 )
+ return null;
+
+ String attrs = str.substring( start+1, stop ).trim();
+
+ if( attrs == null || attrs.length() < 1 )
+ return null;
+
+ Map res = null;
+
+ StringTokenizer st = new StringTokenizer( attrs, ", " );
+
+ while( st.hasMoreTokens() )
+ {
+ if( res == null )
+ res = new HashMap( st.countTokens() );
+
+ String pair = st.nextToken();
+
+ int pos = pair.indexOf( '=' );
+
+ if( pos == -1 )
+ continue;
+
+ String key = pair.substring( 0, pos ).trim();
+
+ if( pos == pair.length() )
+ {
+ res.put( key, null );
+ continue;
+ }
+
+ String val = pair.substring( pos+1 );
+
+ res.put( key, val.trim() );
+ }
+
+ return res;
+ }
+
+ return null;
+ }
+ //----------------------------------------------------------------------------
+ private boolean isEncryptedString( String str )
+ {
+ if( str == null )
+ return false;
+
+ return _cipher.isEncryptedString( str );
+ }
+ //----------------------------------------------------------------------------
+ private SettingsSecurity getSec()
+ throws SecDispatcherException
+ {
+ String location = System.getProperty( SYSTEM_PROPERTY_SEC_LOCATION
+ , getConfigurationFile()
+ );
+ String realLocation = location.charAt( 0 ) == '~'
+ ? System.getProperty( "user.home" ) + location.substring( 1 )
+ : location
+ ;
+
+ SettingsSecurity sec = SecUtil.read( realLocation, true );
+
+ if( sec == null )
+ throw new SecDispatcherException( "cannot retrieve master password. Please check that "+realLocation+" exists and has data" );
+
+ return sec;
+ }
+ //----------------------------------------------------------------------------
+ private String getMaster( SettingsSecurity sec )
+ throws SecDispatcherException
+ {
+ String master = sec.getMaster();
+
+ if( master == null )
+ throw new SecDispatcherException( "master password is not set" );
+
+ try
+ {
+ return _cipher.decryptDecorated( master, SYSTEM_PROPERTY_SEC_LOCATION );
+ }
+ catch ( PlexusCipherException e )
+ {
+ throw new SecDispatcherException(e);
+ }
+ }
+ //---------------------------------------------------------------
+ public String getConfigurationFile()
+ {
+ return _configurationFile;
+ }
+
+ public void setConfigurationFile( String file )
+ {
+ _configurationFile = file;
+ }
+ //----------------------------------------------------------------------------
+ // ***************************************************************
+ /**
+ * Encrytion helper
+ * @throws IOException
+ */
+
+ //---------------------------------------------------------------
+ private static boolean propertyExists( String [] values, String [] av )
+ {
+ if( values != null )
+ {
+ for( int i=0; i< values.length; i++ )
+ {
+ String p = System.getProperty( values[i] );
+
+ if( p != null )
+ return true;
+ }
+
+ if( av != null )
+ for( int i=0; i< values.length; i++ )
+ for( int j=0; j< av.length; j++ )
+ {
+ if( ("--"+values[i]).equals( av[j] ) )
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static final void usage()
+ {
+ System.out.println("usage: java -jar ...jar [-m|-p]\n-m: encrypt master password\n-p: encrypt password");
+ }
+ //---------------------------------------------------------------
+ public static void main( String[] args )
+ throws Exception
+ {
+ if( args == null || args.length < 1 )
+ {
+ usage();
+ return;
+ }
+
+ if( "-m".equals( args[0] ) || propertyExists( SYSTEM_PROPERTY_MASTER_PASSWORD, args ) )
+ show( true );
+ else if( "-p".equals( args[0] ) || propertyExists( SYSTEM_PROPERTY_SERVER_PASSWORD, args ) )
+ show( false );
+ else
+ usage();
+ }
+ //---------------------------------------------------------------
+ private static void show( boolean showMaster )
+ throws Exception
+ {
+ if( showMaster )
+ System.out.print("\nsettings master password\n");
+ else
+ System.out.print("\nsettings server password\n");
+
+ System.out.print("enter password: ");
+
+ BufferedReader r = new BufferedReader( new InputStreamReader( System.in ) );
+
+ String pass = r.readLine();
+
+ System.out.println("\n");
+
+ DefaultPlexusCipher dc = new DefaultPlexusCipher();
+ DefaultSecDispatcher dd = new DefaultSecDispatcher();
+ dd._cipher = dc;
+
+ if( showMaster )
+ System.out.println( dc.encryptAndDecorate( pass, DefaultSecDispatcher.SYSTEM_PROPERTY_SEC_LOCATION ) );
+ else
+ {
+ SettingsSecurity sec = dd.getSec();
+ System.out.println( dc.encryptAndDecorate( pass, dd.getMaster(sec) ) );
+ }
+ }
+ //---------------------------------------------------------------
+ //---------------------------------------------------------------
+}
Property changes on: trunk/src/main/java/org/nuiton/components/sec/dispatcher/DefaultSecDispatcher.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Modified: trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java 2009-09-25 21:40:16 UTC (rev 587)
+++ trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java 2009-09-25 21:59:57 UTC (rev 588)
@@ -27,7 +27,6 @@
import java.io.File;
import java.util.List;
-import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Developer;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
@@ -52,18 +51,12 @@
public class SendEmailMojo extends AbstractPlugin {
/**
- * @parameter expression="${session}"
- * @required
- * @readonly
- */
- protected MavenSession mavenSession;
- /**
* Dependance du projet.
*
* @parameter default-value="${project}"
* @required
* @readonly
- * @since 1.0.0
+ * @since 1.0.3
*/
protected MavenProject project;
/**
@@ -72,14 +65,14 @@
* @parameter default-value="${settings}"
* @required
* @readonly
- * @since 1.0.0
+ * @since 1.0.3
*/
protected Settings settings;
/**
* Un flag pour activer le mode verbeux.
*
* @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
- * @since 1.0.0
+ * @since 1.0.3
*/
protected boolean verbose;
/**
@@ -87,7 +80,7 @@
*
* @parameter expression="${helper.emailContentFile}"
* @required
- * @since 1.0.0
+ * @since 1.0.3
*/
private File emailContentFile;
/**
@@ -95,7 +88,7 @@
*
* @parameter expression="${helper.emailTitle}"
* @required
- * @since 1.0.0
+ * @since 1.0.3
*/
private String emailTitle;
/**
@@ -103,6 +96,7 @@
*
* @parameter expression="${helper.smtpHost}"
* @required
+ * @since 1.0.3
*/
private String smtpHost;
/**
@@ -110,18 +104,21 @@
*
* @parameter default-value="25" expression="${helper.smtpPort}"
* @required
+ * @since 1.0.3
*/
private int smtpPort;
/**
* The username used to send the email.
*
* @parameter expression="${helper.username}"
+ * @since 1.0.3
*/
private String username;
/**
* The password used to send the email.
*
* @parameter expression="${helper.password}"
+ * @since 1.0.3
*/
private String password;
/**
@@ -130,13 +127,14 @@
* <p/>
*
* @parameter expression="${helper.serverId}"
- * @since 1.0.0
+ * @since 1.0.3
*/
protected String serverId;
/**
* If the email should be sent in SSL mode.
*
* @parameter default-value="false" expression="${helper.sslMode}"
+ * @since 1.0.3
*/
private boolean sslMode;
/**
@@ -146,6 +144,7 @@
* used.
*
* @parameter expression="${helper.fromDeveloperId}"
+ * @since 1.0.3
*/
private String fromDeveloperId;
/**
@@ -153,6 +152,7 @@
* if the sender is not a member of the development team.
*
* @parameter expression="${helper.mailSender}"
+ * @since 1.0.3
*/
private MailSender mailSender;
/**
@@ -160,6 +160,7 @@
*
* @parameter
* @required
+ * @since 1.0.3
*/
private List<String> toAddresses;
/**
@@ -168,48 +169,49 @@
* @parameter expression="${project.developers}"
* @required
* @readonly
+ * @since 1.0.3
*/
private List<Developer> from;
/**
* Mail content type to use.
* @parameter default-value="text/plain"
* @required
- * @since 2.1
+ * @since 1.0.3
*/
private String mailContentType;
/**
* The encoding used to read and write files.
*
* @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
- * @since 1.0.0
+ * @since 1.0.3
*/
protected String encoding;
/**
* A flag to skip the goal.
*
* @parameter expression="${helper.skipSendEmail}" default-value="false"
- * @since 1.0.0
+ * @since 1.0.3
*/
private boolean skipSendEmail;
/**
* A flag to test plugin but send nothing to redmine.
*
* @parameter expression="${dryRun}" default-value="false"
- * @since 1.0.0
+ * @since 1.0.3
*/
protected boolean dryRun;
/**
* A flag to restirct only one run in a build (for multi-module context).
*
* @parameter expression="${redmine.runOnce}" default-value="true"
- * @since 1.0.0
+ * @since 1.0.3
*/
private boolean runOnce;
/**
* password decypher
*
* @component roleHint="maven-helper-plugin"
- * @since 1.0.0
+ * @since 1.0.3
*/
protected SecDispatcher sec;
private boolean runOnceDone;
@@ -454,24 +456,6 @@
}
protected boolean isExecutionRoot() {
- return project == getExecutionRootProject();
+ return project.isExecutionRoot();
}
-
- protected MavenProject getExecutionRootProject() {
- MavenProject root = project;
- String executionRootDirectory = mavenSession.getExecutionRootDirectory();
- while (root != null) {
- File dir = root.getBasedir();
- getLog().debug("Current Folder:" + dir);
- boolean result = executionRootDirectory.equalsIgnoreCase(dir.toString());
- if (result) {
- break;
- }
- root = root.getParent();
- }
- if (verbose) {
- getLog().info("root project " + root);
- }
- return root;
- }
}
Modified: trunk/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- trunk/src/main/resources/META-INF/plexus/components.xml 2009-09-25 21:40:16 UTC (rev 587)
+++ trunk/src/main/resources/META-INF/plexus/components.xml 2009-09-25 21:59:57 UTC (rev 588)
@@ -20,9 +20,14 @@
<component-set>
<components>
<component>
+ <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>
+ <role-hint>maven-helper-plugin</role-hint>
+ <implementation>org.nuiton.components.cipher.DefaultPlexusCipher</implementation>
+ </component>
+ <component>
<role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>
<role-hint>maven-helper-plugin</role-hint>
- <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>
+ <implementation>org.nuiton.components.sec.dispatcher.DefaultSecDispatcher</implementation>
<requirements>
<requirement>
<role>org.sonatype.plexus.components.cipher.PlexusCipher</role>
1
0
Author: tchemit
Date: 2009-09-25 23:40:16 +0200 (Fri, 25 Sep 2009)
New Revision: 587
Modified:
trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
Log:
finalize mojo, ready for release
Modified: trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-21 10:52:14 UTC (rev 586)
+++ trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-25 21:40:16 UTC (rev 587)
@@ -20,16 +20,17 @@
*/
package org.nuiton.plugin;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
+import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
-import java.util.Properties;
import java.util.regex.Pattern;
import org.apache.maven.artifact.Artifact;
-import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
@@ -48,12 +49,6 @@
public class CollectFilesMojo extends AbstractMojo {
/**
- * @parameter expression="${session}"
- * @required
- * @readonly
- */
- private MavenSession mavenSession;
- /**
* Dependance du projet.
*
* @parameter default-value="${project}"
@@ -110,7 +105,7 @@
*/
protected String outputDirectory;
/**
- * Properties file will all files collected indexed by their path.
+ * File with all files collected (one file by line in absolute path).
* <p/>
* <b>Note :</b> If not Set, will not generate the description file.
*
@@ -159,11 +154,12 @@
if (skip) {
getLog().info("Skip flag in on, goal will not be executed");
+ return;
}
List<File> files = getFiles();
if (files.isEmpty()) {
- getLog().warn("No files to collect.");
+ getLog().warn("No file to collect.");
return;
}
@@ -182,15 +178,17 @@
getLog().info("\n dryRun flag is on, no file will be copied!\n");
} else {
- if (!output.exists()) {
+ if (copyFiles && !output.exists()) {
output.mkdirs();
}
}
File description = null;
- Properties p = new Properties();
+ List<File> incomingFiles = null;
+
boolean withDescriptionFile = false;
+
if (descriptionFile != null && !descriptionFile.trim().isEmpty()) {
description = new File(rootProject.getBasedir(), descriptionFile);
@@ -200,11 +198,13 @@
if (description.exists()) {
// reload existing
try {
- p.load(new FileInputStream(description));
- getLog().info("Load " + description);
+ incomingFiles = getFiles(description);
+ getLog().info("Loaded " + description);
} catch (IOException ex) {
throw new MojoExecutionException("could not load file " + description, ex);
}
+ } else {
+ incomingFiles = new ArrayList<File>();
}
}
@@ -218,11 +218,15 @@
String absolutePath = f.getAbsolutePath();
String path = absolutePath.substring(basedirLength + 1);
File dst = new File(output, f.getName());
- if (withDescriptionFile && copyFiles) {
- p.put(path, dst.getAbsolutePath());
- } else {
- p.put(path, f.getAbsolutePath());
+
+ if (withDescriptionFile) {
+ if (copyFiles) {
+ incomingFiles.add(dst);
+ } else {
+ incomingFiles.add(f);
+ }
}
+
getLog().info("collected file " + path);
if (!dryRun && copyFiles) {
try {
@@ -234,16 +238,54 @@
}
}
- if (description != null) {
+ if (!dryRun && withDescriptionFile) {
try {
- p.store(new FileOutputStream(description), "Generated by " + this.getClass());
- getLog().info("Save " + description);
+ setFiles(description, incomingFiles);
+ getLog().info("Saved " + description);
} catch (IOException ex) {
throw new MojoExecutionException("could not save file " + description, ex);
}
}
}
+ /**
+ * Read a file containing on each line the path of a file.
+ *
+ * @param input the file containing the list of files
+ * @return the list of files read from the given file
+ * @throws IOException if any pb while reading file
+ */
+ public static List<File> getFiles(File input) throws IOException {
+ List<File> result = new ArrayList<File>();
+ BufferedReader stream = new BufferedReader(new InputStreamReader(new FileInputStream(input)));
+ while (stream.ready()) {
+ String line = stream.readLine().trim();
+ if (!line.isEmpty()) {
+ File f = new File(line);
+ result.add(f);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Save the list of files in the given output file.
+ * <p/>
+ * Each line is the absolute path of each files of the list
+ *
+ * @param output the file when to write
+ * @param files the files to store
+ * @throws IOException if any pb when writing file
+ */
+ public static void setFiles(File output, List<File> files) throws IOException {
+ BufferedWriter writer = new BufferedWriter(new FileWriter(output));
+ for (File f : files) {
+ writer.write(f.getAbsolutePath());
+ writer.newLine();
+ }
+ writer.close();
+ }
+
protected List<File> getFiles() {
Pattern includePattern = includes == null || includes.trim().isEmpty() ? null : Pattern.compile(includes.trim());
@@ -272,6 +314,7 @@
File basedir = project.getBasedir();
for (String path : extraFiles.split(",")) {
+ path = path.trim();
if (path.startsWith(basedir.getAbsolutePath())) {
file = new File(path.trim());
} else {
@@ -299,14 +342,7 @@
protected MavenProject getExecutionRootProject() {
MavenProject root = project;
- String executionRootDirectory = mavenSession.getExecutionRootDirectory();
- while (root != null) {
- File basedir = root.getBasedir();
- getLog().debug("Current Folder:" + basedir);
- boolean result = executionRootDirectory.equalsIgnoreCase(basedir.toString());
- if (result) {
- break;
- }
+ while (!root.isExecutionRoot()) {
root = root.getParent();
}
if (verbose) {
@@ -320,7 +356,7 @@
return;
}
if (!f.exists()) {
- getLog().warn("skip unexisting file " + f);
+ getLog().warn("skip unexisting file " + f + " (" + msg + ")");
return;
}
if (excludePattern != null) {
1
0
Author: tchemit
Date: 2009-09-21 12:52:14 +0200 (Mon, 21 Sep 2009)
New Revision: 586
Modified:
trunk/pom.xml
Log:
improve test dependencies
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-09-21 10:19:01 UTC (rev 585)
+++ trunk/pom.xml 2009-09-21 10:52:14 UTC (rev 586)
@@ -159,6 +159,14 @@
<artifactId>maven-plugin-testing-harness</artifactId>
<version>1.2</version>
<scope>test</scope>
+ <exclusions>
+
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ </exclusion>
+
+ </exclusions>
</dependency>
<dependency>
1
0
r585 - in trunk/src: main/java/org/nuiton/io/rest main/java/org/nuiton/io/xpp3 main/java/org/nuiton/mail main/java/org/nuiton/mail/plugin main/java/org/nuiton/plugin test/java/org/nuiton/mail/plugin test/java/org/nuiton/plugin
by tchemit@users.nuiton.org 21 Sep '09
by tchemit@users.nuiton.org 21 Sep '09
21 Sep '09
Author: tchemit
Date: 2009-09-21 12:19:01 +0200 (Mon, 21 Sep 2009)
New Revision: 585
Modified:
trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java
trunk/src/main/java/org/nuiton/io/rest/RestClient.java
trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java
trunk/src/main/java/org/nuiton/io/rest/RestDataNotFoundException.java
trunk/src/main/java/org/nuiton/io/rest/RestException.java
trunk/src/main/java/org/nuiton/io/rest/RestRequest.java
trunk/src/main/java/org/nuiton/io/rest/RestRequestBuilder.java
trunk/src/main/java/org/nuiton/io/rest/RestSession.java
trunk/src/main/java/org/nuiton/io/xpp3/AbstractXpp3Reader.java
trunk/src/main/java/org/nuiton/io/xpp3/DataConverter.java
trunk/src/main/java/org/nuiton/io/xpp3/PropertyMapper.java
trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java
trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Reader.java
trunk/src/main/java/org/nuiton/mail/MailSender.java
trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java
trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java
trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
trunk/src/main/java/org/nuiton/plugin/Plugin.java
trunk/src/test/java/org/nuiton/mail/plugin/SendEmailMojoTest.java
trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java
trunk/src/test/java/org/nuiton/plugin/TestHelper.java
Log:
mise a jour des licenses dans les sources
Modified: trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
import java.net.URL;
Modified: trunk/src/main/java/org/nuiton/io/rest/RestClient.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestClient.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestClient.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
import java.io.IOException;
Modified: trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
import java.net.URL;
Modified: trunk/src/main/java/org/nuiton/io/rest/RestDataNotFoundException.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestDataNotFoundException.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestDataNotFoundException.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
/**
Modified: trunk/src/main/java/org/nuiton/io/rest/RestException.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestException.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestException.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
/**
Modified: trunk/src/main/java/org/nuiton/io/rest/RestRequest.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestRequest.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestRequest.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
import java.io.File;
Modified: trunk/src/main/java/org/nuiton/io/rest/RestRequestBuilder.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestRequestBuilder.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestRequestBuilder.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
/**
Modified: trunk/src/main/java/org/nuiton/io/rest/RestSession.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestSession.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/rest/RestSession.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.rest;
import java.io.File;
Modified: trunk/src/main/java/org/nuiton/io/xpp3/AbstractXpp3Reader.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/xpp3/AbstractXpp3Reader.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/xpp3/AbstractXpp3Reader.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.xpp3;
import java.beans.IntrospectionException;
Modified: trunk/src/main/java/org/nuiton/io/xpp3/DataConverter.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/xpp3/DataConverter.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/xpp3/DataConverter.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.xpp3;
/**
Modified: trunk/src/main/java/org/nuiton/io/xpp3/PropertyMapper.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/xpp3/PropertyMapper.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/xpp3/PropertyMapper.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.xpp3;
import java.beans.PropertyDescriptor;
Modified: trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.xpp3;
import java.beans.BeanInfo;
Modified: trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Reader.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Reader.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Reader.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.io.xpp3;
import java.io.IOException;
Modified: trunk/src/main/java/org/nuiton/mail/MailSender.java
===================================================================
--- trunk/src/main/java/org/nuiton/mail/MailSender.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/mail/MailSender.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.mail;
/**
Modified: trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java
===================================================================
--- trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.mail;
import java.security.Security;
Modified: trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.mail.plugin;
import org.nuiton.mail.*;
Modified: trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.plugin;
import java.io.File;
Modified: trunk/src/main/java/org/nuiton/plugin/Plugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/Plugin.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/main/java/org/nuiton/plugin/Plugin.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.plugin;
import org.apache.maven.plugin.Mojo;
Modified: trunk/src/test/java/org/nuiton/mail/plugin/SendEmailMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/mail/plugin/SendEmailMojoTest.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/test/java/org/nuiton/mail/plugin/SendEmailMojoTest.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.mail.plugin;
import org.nuiton.mail.MailSender;
Modified: trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/test/java/org/nuiton/plugin/AbstractMojoTest.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.plugin;
import java.io.File;
Modified: trunk/src/test/java/org/nuiton/plugin/TestHelper.java
===================================================================
--- trunk/src/test/java/org/nuiton/plugin/TestHelper.java 2009-09-21 10:06:23 UTC (rev 584)
+++ trunk/src/test/java/org/nuiton/plugin/TestHelper.java 2009-09-21 10:19:01 UTC (rev 585)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * ##%*
+ */
package org.nuiton.plugin;
import org.apache.maven.plugin.Mojo;
1
0
Author: tchemit
Date: 2009-09-21 12:06:23 +0200 (Mon, 21 Sep 2009)
New Revision: 584
Modified:
trunk/pom.xml
Log:
ajout dep sur commons-collections car c'est une dep pas bien resolu de velocity
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-09-21 09:58:37 UTC (rev 583)
+++ trunk/pom.xml 2009-09-21 10:06:23 UTC (rev 584)
@@ -34,6 +34,12 @@
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2.1</version>
+ </dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
1
0
Author: tchemit
Date: 2009-09-21 11:58:37 +0200 (Mon, 21 Sep 2009)
New Revision: 583
Modified:
trunk/src/main/resources/META-INF/plexus/components.xml
Log:
remove comented code in compoentns configuration
Modified: trunk/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- trunk/src/main/resources/META-INF/plexus/components.xml 2009-09-21 08:45:27 UTC (rev 582)
+++ trunk/src/main/resources/META-INF/plexus/components.xml 2009-09-21 09:58:37 UTC (rev 583)
@@ -37,26 +37,5 @@
<_configurationFile>~/.m2/settings-security.xml</_configurationFile>
</configuration>
</component>
- <!--component>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- <role-hint>maven-changes-plugin</role-hint>
- <implementation>org.codehaus.plexus.velocity.DefaultVelocityComponent</implementation>
- <configuration>
- <properties>
- <property>
- <name>resource.loader</name>
- <value>file,class</value>
- </property>
- <property>
- <name>class.resource.loader.class</name>
- <value>org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader</value>
- </property>
- <property>
- <name>file.resource.loader.class</name>
- <value>org.apache.maven.plugin.resource.loader.ProjectResourceLoader</value>
- </property>
- </properties>
- </configuration>
- </component-->
</components>
</component-set>
\ No newline at end of file
1
0
Author: tchemit
Date: 2009-09-21 10:45:27 +0200 (Mon, 21 Sep 2009)
New Revision: 582
Modified:
trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
Log:
fix bug when file to collect is not a absolute path for a multi-module
Modified: trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-21 08:15:18 UTC (rev 581)
+++ trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-21 08:45:27 UTC (rev 582)
@@ -250,9 +250,14 @@
if (extraFiles != null && !extraFiles.trim().isEmpty()) {
+ File basedir = project.getBasedir();
for (String path : extraFiles.split(",")) {
+ if (path.startsWith(basedir.getAbsolutePath())) {
+ file = new File(path.trim());
+ } else {
+ file = new File(basedir, path.trim());
+ }
- file = new File(path.trim());
addFile(file, "adding user file : ", result, includePattern, excludePattern);
}
1
0
Author: tchemit
Date: 2009-09-21 10:15:18 +0200 (Mon, 21 Sep 2009)
New Revision: 581
Modified:
trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
Log:
trim file paths in CollectFilesMojo
Modified: trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-20 17:39:47 UTC (rev 580)
+++ trunk/src/main/java/org/nuiton/plugin/CollectFilesMojo.java 2009-09-21 08:15:18 UTC (rev 581)
@@ -252,7 +252,7 @@
for (String path : extraFiles.split(",")) {
- file = new File(path);
+ file = new File(path.trim());
addFile(file, "adding user file : ", result, includePattern, excludePattern);
}
1
0