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: 2010-01-06 21:03:34 +0100 (Wed, 06 Jan 2010)
New Revision: 650
Added:
tags/maven-helper-plugin-1.2.0/
Log:
[maven-scm] copy for tag maven-helper-plugin-1.2.0
Property changes on: tags/maven-helper-plugin-1.2.0
___________________________________________________________________
Added: svn:ignore
+ target
*.iml
*.ipr
*.iws
Added: svn:mergeinfo
+
1
0
Author: tchemit
Date: 2010-01-06 21:03:30 +0100 (Wed, 06 Jan 2010)
New Revision: 649
Modified:
trunk/pom.xml
Log:
[maven-release-plugin] prepare release maven-helper-plugin-1.2.0
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-06 19:12:50 UTC (rev 648)
+++ trunk/pom.xml 2010-01-06 20:03:30 UTC (rev 649)
@@ -1,7 +1,5 @@
<?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">
+<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>
@@ -18,7 +16,7 @@
<!--<groupId>org.nuiton</groupId>-->
<artifactId>maven-helper-plugin</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<dependencies>
@@ -266,9 +264,9 @@
<!-- ************************************************************* -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/maven-helper-plugin/trunk</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/tags/maven-helper-plu…</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/tags/maven-helper-plu…</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/maven-helper-plugin/tags/maven-he…</url>
</scm>
<!-- ************************************************************* -->
1
0
Author: tchemit
Date: 2010-01-06 20:12:50 +0100 (Wed, 06 Jan 2010)
New Revision: 648
Added:
trunk/src/site/site_en.xml
Removed:
trunk/src/site/site.xml
Modified:
trunk/pom.xml
trunk/src/site/apt/index.apt
trunk/src/site/apt/mojo-framework.apt
trunk/src/site/apt/mojo-usages.apt
Log:
- Evolution #186: Utilisation de mavenpom
- update site documentation
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-03 11:32:36 UTC (rev 647)
+++ trunk/pom.xml 2010-01-06 19:12:50 UTC (rev 648)
@@ -9,7 +9,13 @@
<!-- *** POM Relationships *************************************** -->
<!-- ************************************************************* -->
- <groupId>org.nuiton</groupId>
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mavenpom</artifactId>
+ <version>1.1.3</version>
+ </parent>
+
+ <!--<groupId>org.nuiton</groupId>-->
<artifactId>maven-helper-plugin</artifactId>
<version>1.2.0-SNAPSHOT</version>
@@ -79,6 +85,7 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9-stable-1</version>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -241,19 +248,6 @@
<inceptionYear>2009</inceptionYear>
<url>http://maven-site.nuiton.org/maven-helper-plugin</url>
- <organization>
- <name>CodeLutin</name>
- <url>http://www.codelutin.com/</url>
- </organization>
-
- <licenses>
- <license>
- <name>Lesser General Public License (LGPL)</name>
- <url>${project.basedir}/LICENSE.txt</url>
- <distribution>local</distribution>
- </license>
- </licenses>
-
<developers>
<developer>
<name>Tony Chemit</name>
@@ -271,85 +265,12 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <mailingLists>
- <mailingList>
- <name>maven-helper-plugin-commits</name>
- <subscribe>
- http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-commits
- </subscribe>
- <unsubscribe>
- http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-commits
- </unsubscribe>
- <post>maven-helper-plugin-commits(a)list.nuiton.org</post>
- <archive>
- http://list.nuiton.org/pipermail/maven-helper-plugin-commits/
- </archive>
- </mailingList>
-
- <mailingList>
- <name>maven-helper-plugin-devel</name>
- <subscribe>
- http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-devel
- </subscribe>
- <unsubscribe>
- http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-devel
- </unsubscribe>
- <post>maven-helper-plugin-devel(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-devel/
- </archive>
- </mailingList>
-
- <mailingList>
- <name>maven-helper-plugin-users</name>
- <subscribe>
- http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-users
- </subscribe>
- <unsubscribe>
- http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-users
- </unsubscribe>
- <post>maven-helper-plugin-users(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-users/
- </archive>
- </mailingList>
- </mailingLists>
-
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk
- </connection>
- <developerConnection>
- scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk
- </developerConnection>
- <url>http://www.nuiton.org/repositories/browse/maven-helper-plugin/trunk
- </url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk</connection>
+ <developerConnection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk</developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/maven-helper-plugin/trunk</url>
</scm>
- <issueManagement>
- <system>Redmine</system>
- <url>http://www.nuiton.org/projects/maven-helper-plugin/issues/</url>
- </issueManagement>
-
- <distributionManagement>
- <repository>
- <id>nuiton</id>
- <url>scpexe://nuiton.org/var/lib/maven/release</url>
- </repository>
- <snapshotRepository>
- <id>nuiton</id>
- <url>scpexe://nuiton.org/var/lib/maven/snapshot</url>
- </snapshotRepository>
- <site>
- <id>nuiton</id>
- <url>
- scpexe://nuiton.org/var/lib/redmine-nuiton/project-site/maven-helper-plugin
- </url>
- </site>
- </distributionManagement>
-
- <ciManagement>
- <system>hudson</system>
- <url>http://hudson.nuiton.org/hudson/job/maven-helper-plugin</url>
- </ciManagement>
-
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
@@ -358,46 +279,14 @@
<properties>
- <platform>nuiton.org</platform>
- <listId>maven-helper-plugin</listId>
-
- <license.version>2.0.0</license.version>
- <jredmine.version>1.0.0</jredmine.version>
- <maven.version>2.2.1</maven.version>
<plexusMailSender.version>1.0-alpha-2</plexusMailSender.version>
- <javadoc.version>2.6</javadoc.version>
- <maven.src.dir>${basedir}/src</maven.src.dir>
- <maven.compile.source>1.6</maven.compile.source>
- <maven.compile.target>1.6</maven.compile.target>
+ <!-- extra files to include in release -->
+ <redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8
- </project.reporting.outputEncoding>
-
- <maven.test.skip>false</maven.test.skip>
- <maven.javadoc.skip>false</maven.javadoc.skip>
-
- <!-- to activate generation of reports and javadoc when doing a site -->
- <maven.reports.generate>true</maven.reports.generate>
-
- <license.licenseName>lgpl_v3</license.licenseName>
-
- <repository.home.url>http://maven.nuiton.org/release
- </repository.home.url>
-
- <!-- redmine configuration -->
- <redmine.safe>false</redmine.safe>
- <redmine.url>http://www.${platform}</redmine.url>
- <redmine.projectId>maven-helper-plugin</redmine.projectId>
- <redmine.xmlPath>${basedir}/target/generated-sources/changes/changes.xml
- </redmine.xmlPath>
- <redmine.issueLinkTemplate>${redmine.url}/issues/show/%ISSUE%
- </redmine.issueLinkTemplate>
- <redmine.versionLinkTemplate>${redmine.url}/versions/show/%VERSION%
- </redmine.versionLinkTemplate>
- <redmine.collectedFiles>target/collect.properties
- </redmine.collectedFiles>
+ <!-- documention is in english -->
+ <maven.site.locales>en</maven.site.locales>
+
</properties>
<build>
@@ -443,55 +332,11 @@
</plugins>
<pluginManagement>
-
<plugins>
-
<plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>${maven.compile.source}</source>
- <target>${maven.compile.target}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <skip>${maven.test.skip}</skip>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.1</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.3</version>
- </plugin>
-
- <plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version>
<configuration>
- <docencoding>${project.reporting.outputEncoding}
- </docencoding>
- <encoding>${project.reporting.outputEncoding}</encoding>
- <charset>${project.reporting.outputEncoding}</charset>
- <quiet>true</quiet>
- <skip>${maven.javadoc.skip}</skip>
<taglets>
<taglet>
<tagletClass>
@@ -736,100 +581,23 @@
</plugin>
<plugin>
- <artifactId>maven-site-plugin</artifactId>
- <version>2.0.1</version>
- <configuration>
- <locales>fr</locales>
- <siteDirectory>src/site</siteDirectory>
- <inputEncoding>${project.reporting.outputEncoding}
- </inputEncoding>
- <outputEncoding>${project.reporting.outputEncoding}
- </outputEncoding>
- <generateReports>${maven.reports.generate}
- </generateReports>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-9</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>2.5.1</version>
- </plugin>
-
- <plugin>
<artifactId>maven-invoker-plugin</artifactId>
- <version>1.4</version>
+ <version>1.5</version>
</plugin>
-
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-license-plugin</artifactId>
- <version>${license.version}</version>
- </plugin>
-
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <version>${jredmine.version}</version>
- </plugin>
-
+
</plugins>
</pluginManagement>
+
</build>
<reporting>
<plugins>
- <!-- The Project Info Reports Plugin has twelve goals:
- see http://maven.apache.org/plugins/maven-project-info-reports-plugin
- -->
<plugin>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.1.2</version>
- <configuration>
- <dependencyDetailsEnabled>
- ${maven.reports.dependencyDetailsEnabled}
- </dependencyDetailsEnabled>
- <dependencyLocationsEnabled>
- ${maven.reports.dependencyLocationsEnabled}
- </dependencyLocationsEnabled>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>cim</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- <report>dependencies</report>
- <report>dependency-convergence</report>
- <report>plugin-management</report>
- <report>plugins</report>
- <report>dependency-management</report>
- <report>summary</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
-
- <plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version>
<configuration>
- <quiet>true</quiet>
- <skip>${maven.javadoc.skip}</skip>
- <docencoding>${project.build.sourceEncoding}</docencoding>
- <encoding>${project.build.sourceEncoding}</encoding>
- <charset>${project.reporting.outputEncoding}</charset>
- <excludePackageNames>${maven.javadoc.excludePackageNames}
- </excludePackageNames>
<taglets>
<taglet>
<tagletClass>
@@ -1071,75 +839,9 @@
</taglet>
</taglets>
</configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>javadoc</report>
- <report>test-javadoc</report>
- </reports>
- </reportSet>
- </reportSets>
</plugin>
- <!-- changelog:changelog
- changelog:dev-activity
- changelog:file-activity -->
<plugin>
- <artifactId>maven-changelog-plugin</artifactId>
- <version>2.1</version>
- </plugin>
-
- <!-- Implicit add of reportSet to not generate jira reports -->
- <plugin>
- <artifactId>maven-changes-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <issueLinkTemplatePerSystem>
- <redmine>${redmine.issueLinkTemplate}</redmine>
- </issueLinkTemplatePerSystem>
- <xmlPath>${redmine.xmlPath}</xmlPath>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
-
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <encoding>${project.reporting.outputEncoding}</encoding>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <linkXRef>true</linkXRef>
- <sourceEncoding>${project.reporting.outputEncoding}
- </sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>${maven.compile.target}</targetJdk>
- </configuration>
-
- </plugin>
-
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.1</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
-
- <plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.5.1</version>
</plugin>
@@ -1195,314 +897,32 @@
</executions>
</plugin>
- <!-- always add license and third-party files to classpath -->
+ <!-- build release zip files -->
<plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-license-plugin</artifactId>
+ <artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
- <id>attach-licenses</id>
+ <id>create-assemblies</id>
+ <phase>package</phase>
<goals>
- <goal>add-license</goal>
- <goal>add-third-party</goal>
+ <goal>single</goal>
</goals>
</execution>
</executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
-
- <!-- perform only on a release stage when using the maven-release-plugin -->
- <profile>
- <id>redmine-pre-release-profile</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <properties>
- <redmine.safe>true</redmine.safe>
- </properties>
-
- <reporting>
- <plugins>
-
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <version>${jredmine.version}</version>
<configuration>
- <columnNames>
- key,summary,status,assignee,tracker,priority,version,category,createdOn
- </columnNames>
+ <attach>false</attach>
+ <descriptorRefs>
+ <descriptorRef>deps</descriptorRef>
+ <descriptorRef>full</descriptorRef>
+ </descriptorRefs>
</configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>issues-report</report>
- </reports>
- </reportSet>
- </reportSets>
</plugin>
</plugins>
- </reporting>
- <build>
-
- <plugins>
-
- <!--
- - obtain redmine login
- - collect files for jredmine release
- -->
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <version>1.1.0</version>
- <executions>
- <execution>
- <id>get-redmine-login</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>initialize</phase>
- <configuration>
- <serverId>redmine-${platform}</serverId>
- <passwordOut>redmine.password</passwordOut>
- <usernameOut>redmine.username</usernameOut>
- </configuration>
- </execution>
- <execution>
- <id>get-redmine-login-site</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>pre-site</phase>
- <configuration>
- <serverId>redmine-${platform}</serverId>
- <passwordOut>redmine.password</passwordOut>
- <usernameOut>redmine.username</usernameOut>
- </configuration>
- </execution>
- <execution>
- <id>collect-files</id>
- <goals>
- <goal>collect-files</goal>
- </goals>
- <phase>install</phase>
- <configuration>
- <extraFiles/>
- <descriptionFile>${redmine.collectedFiles}
- </descriptionFile>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- generate the changes.xml from redmine -->
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <executions>
- <execution>
- <id>jredmine-generate</id>
- <goals>
- <goal>generate-changes</goal>
- <goal>generate-news-announcement</goal>
- <goal>generate-email-announcement</goal>
- </goals>
- <phase>process-classes</phase>
- </execution>
- </executions>
- <configuration>
-
- <!-- generate-changes -->
- <generateOnce>true</generateOnce>
- <actionMapping>fix:1, add:2</actionMapping>
- <statusIds>3,4,5</statusIds>
-
- <!-- generate announcements -->
- <urlDownload>
- ${redmine.url}/projects/list_files/maven-helper-plugin
- </urlDownload>
-
- <!--<changesTitle>Release note of Maven pom project</changesTitle>-->
- <!--<releaseDescription>Description of first release</releaseDescription>-->
- <!--<verbose>true</verbose>-->
- </configuration>
- </plugin>
-
- </plugins>
-
</build>
</profile>
- <!-- perform a redmine release after a successfull release -->
<profile>
- <id>redmine-release-profile</id>
- <activation>
- <property>
- <name>performRedmineRelease</name>
- <value>true</value>
- </property>
- </activation>
-
- <properties>
- <dryRun>true</dryRun>
- <redmine.dryRun>${dryRun}</redmine.dryRun>
- </properties>
- <build>
-
- <plugins>
-
- <!--
- - obtain redmine login
- - send release email
- -->
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <version>1.1.0</version>
- <executions>
- <execution>
- <id>get-redmine-login</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>validate</phase>
- <configuration>
- <serverId>redmine-${platform}</serverId>
- <passwordOut>redmine.password</passwordOut>
- <usernameOut>redmine.username</usernameOut>
- </configuration>
- </execution>
- <execution>
- <id>send-release-email</id>
- <goals>
- <goal>send-email</goal>
- </goals>
- <phase>validate</phase>
- </execution>
- </executions>
- <configuration>
-
- <!-- for a multi-module just run on root project -->
- <runOnce>true</runOnce>
-
- <emailTitle>[ANNOUNCEMENT] - ${project.artifactId}
- ${project.version} released
- </emailTitle>
- <emailContentFile>
- target/generated-sources/announcement/release-email-announcement.vm
- </emailContentFile>
- <mailSender>
- <name>${platform} Release Notification</name>
- <email>noreply@${platform}</email>
- </mailSender>
- <toAddresses>
- <item>${listId}-users(a)list.${platform}</item>
- <item>${listId}-devel(a)list.${platform}</item>
- <item>dev(a)codelutin.com</item>
- </toAddresses>
- <smtpHost>smtp</smtpHost>
- </configuration>
- </plugin>
-
- <!--
- - update version in redmine
- - publish release files to redmine
- - publish a release news in redmine
- -->
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <executions>
- <execution>
- <id>jredmine-release</id>
- <goals>
- <goal>update-version</goal>
- <goal>publish-attachments</goal>
- <goal>publish-news</goal>
- </goals>
- <phase>validate</phase>
- </execution>
- </executions>
- <configuration>
-
- <!-- for a multi-module just run on root project -->
- <runOnce>true</runOnce>
-
- <!-- update-version -->
- <closeVersion>true</closeVersion>
-
- <!-- publish-attachments -->
- <filesFromProperties>${redmine.collectedFiles}
- </filesFromProperties>
-
- <!-- publish-news -->
- <newsContentFile>
- target/generated-sources/announcement/release-news-announcement.vm
- </newsContentFile>
- <newsSummary>${project.description}</newsSummary>
- <newsTitle>${project.artifactId} ${project.version}
- released
- </newsTitle>
-
- </configuration>
- </plugin>
-
- </plugins>
-
- </build>
- </profile>
-
- <!-- do not execute tests (generaly a bad idea...) -->
- <profile>
- <id>notests</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.test.skip>true</maven.test.skip>
- </properties>
- </profile>
- <!-- do not build reports (speedup site generation in dev) -->
- <profile>
- <id>noreports</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.reports.generate>false</maven.reports.generate>
- </properties>
- </profile>
- <!-- do not build dependencies detail in maven-project-info-report (speedup site generation in dev) -->
- <profile>
- <id>nodepdetails</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.reports.dependencyDetailsEnabled>false
- </maven.reports.dependencyDetailsEnabled>
- </properties>
- </profile>
- <!-- do not build locations of dependencies in maven-project-info-report (speedup site generation in dev) -->
- <profile>
- <id>nodeplocations</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.reports.dependencyLocationsEnabled>false
- </maven.reports.dependencyLocationsEnabled>
- </properties>
- </profile>
-
- <profile>
<id>run-its</id>
<activation>
<property>
@@ -1516,21 +936,15 @@
<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>
- <pomInclude>share-server-secret/single/pom.xml
- </pomInclude>
+ <pomInclude>collect-files/single/pom.xml</pomInclude>
+ <pomInclude>collect-files/multi/pom.xml</pomInclude>
+ <pomInclude>send-email/single/pom.xml</pomInclude>
+ <pomInclude>share-server-secret/single/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
- <localRepositoryPath>${basedir}/target/local-repo
- </localRepositoryPath>
+ <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
- <cloneProjectsTo>${project.build.directory}/its
- </cloneProjectsTo>
+ <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
</configuration>
<executions>
<execution>
@@ -1539,7 +953,6 @@
<goal>install</goal>
<goal>run</goal>
</goals>
- <phase>integration-test</phase>
</execution>
</executions>
</plugin>
Modified: trunk/src/site/apt/index.apt
===================================================================
--- trunk/src/site/apt/index.apt 2010-01-03 11:32:36 UTC (rev 647)
+++ trunk/src/site/apt/index.apt 2010-01-06 19:12:50 UTC (rev 648)
@@ -29,8 +29,6 @@
* {{{share-server-secret-mojo.html} helper:share-server-secret}} to expose a server secret data in project.
- * {{{generate-site-index-mojo.html} helper:generate-site-index}} to generate a simple redirect index.html page when using the symetric layout in site plugin.
-
Consult the {{{mojo-usages.html}usages}} page to have more details of mojos.
Consult the {{{mojo-examples.html}examples}} page to have some examples of mojos.
Modified: trunk/src/site/apt/mojo-framework.apt
===================================================================
--- trunk/src/site/apt/mojo-framework.apt 2010-01-03 11:32:36 UTC (rev 647)
+++ trunk/src/site/apt/mojo-framework.apt 2010-01-06 19:12:50 UTC (rev 648)
@@ -27,11 +27,19 @@
There is some filtering methods :
* <<checkPackaging>> to test if can perform mojo for the project's packaging.
+
- * <<init>> : initialize the mojo, and return <<true>> if can execute the mojo.
+ * <<init>> : initialize the mojo, throw an error if any problem.
+ * <<checkSkip>> to test if can skip mojo execution (since 1.2.0)
+
The core method is the <<doAction>> one, put there your logic.
+ Note: since version 1.2.0 the <<doAction>> method will only be executed if the
+ mojo must be executed. you should no more do some tests here to know if the
+ mojo can be skip.
+
+
Usefull methods
The <<org.nuiton.plugin.AbstractPlugin>> contains some usefull methods to work
Modified: trunk/src/site/apt/mojo-usages.apt
===================================================================
--- trunk/src/site/apt/mojo-usages.apt 2010-01-03 11:32:36 UTC (rev 647)
+++ trunk/src/site/apt/mojo-usages.apt 2010-01-06 19:12:50 UTC (rev 648)
@@ -130,26 +130,3 @@
</executions>
</plugin>
------------------------------------------------------------------------------
-
-generate-site-index
-
- This goal generate a simple redirect index.html page when using the symetric layout in site.
-
- This will generates by default a index.html in <<target/site>> directory which will redirect to the default locale site.
-
-------------------------------------------------------------------------------
-<plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>generate-site-index</goal>
- </goals>
- <configuration>
- <locales>${maven.site.locales}</locales>
- </configuration>
- </execution>
- </executions>
-</plugin>
-------------------------------------------------------------------------------
Deleted: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2010-01-03 11:32:36 UTC (rev 647)
+++ trunk/src/site/site.xml 2010-01-06 19:12:50 UTC (rev 648)
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="${project.name}">
-
- <publishDate format="dd/MM/yyyy"/>
-
- <skin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-nuiton-skin</artifactId>
- <version>1.0.0</version>
- </skin>
-
- <bannerLeft>
- <name>${project.name}</name>
- <href>index.html</href>
- </bannerLeft>
-
- <bannerRight>
- <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
- <href>${project.organization.url}</href>
- </bannerRight>
-
- <poweredBy>
- <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
- </poweredBy>
-
- <body>
- <links>
- <item name="Chorem" href="http://www.chorem.org"/>
- <item name="Nuiton" href="http://www.nuiton.org"/>
- <item name="Labs" href="http://labs.libre-entreprise.org"/>
- <item name="${project.organization.name}" href="${project.organization.url}"/>
- <item name="Dépôt maven" href="${repository.home.url}"/>
- </links>
-
- <breadcrumbs>
- <item name="Nuiton" href="http://www.nuiton.org" />
- <item name="${project.name}" href="${project.url}" />
- </breadcrumbs>
-
- <menu name="Utilisateur">
- <item name="Introduction" href="index.html"/>
- <item name="Goals" href="plugin-info.html">
- <item name="collect-files" href="collect-files-mojo.html"/>
- <item name="share-server-secret" href="share-server-secret-mojo.html"/>
- <item name="send-email" href="send-email-mojo.html"/>
- <item name="help" href="help-mojo.html"/>
- </item>
- <item name="Mojo usages" href="mojo-usages.html"/>
- <item name="Mojo examples" href="mojo-examples.html"/>
- </menu>
-
- <menu name="Développeur">
- <item name="Mojo framework" href="mojo-framework.html"/>
- <item name="Mojo test framework" href="mojo-testFramework.html"/>
- <item name="A faire" href="Todo.html"/>
- </menu>
-
- <menu name="Téléchargement">
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar"
- name="Librairie (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar"
- name="Javadoc (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-sources.jar"
- name="Sources (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-tests.jar"
- name="Test Librairie (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-test-javadoc.jar"
- name="Test Javadoc (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-test-sources.jar"
- name="Test Sources (jar)"/>
- </menu>
-
- <menu ref="reports"/>
-
- </body>
-</project>
Copied: trunk/src/site/site_en.xml (from rev 647, trunk/src/site/site.xml)
===================================================================
--- trunk/src/site/site_en.xml (rev 0)
+++ trunk/src/site/site_en.xml 2010-01-06 19:12:50 UTC (rev 648)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
+ </poweredBy>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="index.html" />
+ </breadcrumbs>
+
+ <menu name="User">
+ <item name="Introduction" href="index.html"/>
+ <item name="Goals" href="plugin-info.html">
+ <item name="collect-files" href="collect-files-mojo.html"/>
+ <item name="share-server-secret" href="share-server-secret-mojo.html"/>
+ <item name="send-email" href="send-email-mojo.html"/>
+ <item name="help" href="help-mojo.html"/>
+ </item>
+ <item name="Mojo usages" href="mojo-usages.html"/>
+ <item name="Mojo examples" href="mojo-examples.html"/>
+ </menu>
+
+ <menu name="Developer">
+ <item name="Mojo framework" href="mojo-framework.html"/>
+ <item name="Mojo test framework" href="mojo-testFramework.html"/>
+ <item name="A faire" href="Todo.html"/>
+ </menu>
+
+ <menu name="Download">
+ <item href="http://nuiton.org/projects/list_files/maven-helper-plugin" name="Sources bundles"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar"
+ name="Librairie (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar"
+ name="Javadoc (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-sources.jar"
+ name="Sources (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-tests.jar"
+ name="Test Librairie (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-test-javadoc.jar"
+ name="Test Javadoc (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-test-sources.jar"
+ name="Test Sources (jar)"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ </body>
+</project>
1
0
Author: tchemit
Date: 2010-01-03 12:32:36 +0100 (Sun, 03 Jan 2010)
New Revision: 647
Modified:
trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java
Log:
javadoc
Modified: trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java 2010-01-03 10:42:16 UTC (rev 646)
+++ trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java 2010-01-03 11:32:36 UTC (rev 647)
@@ -87,7 +87,7 @@
/**
*
- * @param anonymous the flat anonymous to set
+ * @param anonymous the flag anonymous to set
*/
void setAnonymous(boolean anonymous);
}
1
0
Author: tchemit
Date: 2010-01-03 11:42:16 +0100 (Sun, 03 Jan 2010)
New Revision: 646
Modified:
trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java
trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java
trunk/src/main/java/org/nuiton/io/rest/RestSession.java
Log:
add a flag anonymous in RestClientConfiguration
add better log
reformat
Modified: trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java 2010-01-03 10:09:05 UTC (rev 645)
+++ trunk/src/main/java/org/nuiton/io/rest/DefaultRestClientConfiguration.java 2010-01-03 10:42:16 UTC (rev 646)
@@ -20,11 +20,11 @@
*/
package org.nuiton.io.rest;
-import java.net.URL;
-
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
+import java.net.URL;
+
/**
* Default implementation of a {@link RestClientConfiguration}.
*
@@ -37,6 +37,7 @@
String restUsername;
String restPassword;
boolean verbose;
+ boolean anonymous;
String encoding;
@Override
@@ -89,12 +90,25 @@
this.verbose = verbose;
}
+ public boolean isAnonymous() {
+ return anonymous;
+ }
+
+ public void setAnonymous(boolean anonymous) {
+ this.anonymous = anonymous;
+ }
+
@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
b.append("redmineUrl", restUrl);
- b.append("redmineUsername", restUsername);
- b.append("redminePassword", "***");
+ if (anonymous) {
+
+ b.append("anonymous", anonymous);
+ } else {
+ b.append("redmineUsername", restUsername);
+ b.append("redminePassword", "***");
+ }
b.append("encoding", encoding);
b.append("verbose", verbose);
return b.toString();
Modified: trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java 2010-01-03 10:09:05 UTC (rev 645)
+++ trunk/src/main/java/org/nuiton/io/rest/RestClientConfiguration.java 2010-01-03 10:42:16 UTC (rev 646)
@@ -55,6 +55,12 @@
boolean isVerbose();
/**
+ *
+ * @return {@code true} if rest client does not need login
+ */
+ boolean isAnonymous();
+
+ /**
* @param restUrl the url of server to set
*/
void setRestUrl(URL restUrl);
@@ -78,4 +84,10 @@
* @param verbose the flag verbose to set
*/
void setVerbose(boolean verbose);
+
+ /**
+ *
+ * @param anonymous the flat anonymous to set
+ */
+ void setAnonymous(boolean anonymous);
}
Modified: trunk/src/main/java/org/nuiton/io/rest/RestSession.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/rest/RestSession.java 2010-01-03 10:09:05 UTC (rev 645)
+++ trunk/src/main/java/org/nuiton/io/rest/RestSession.java 2010-01-03 10:42:16 UTC (rev 646)
@@ -100,7 +100,7 @@
}
if (statusCode != HttpStatus.SC_OK) {
- log.error(gm.getResponseBodyAsString());
+ log.error("Error = "+gm.getResponseBodyAsString());
releaseConnection(getConnection());
throw new RestException("Got error code <" + statusCode + ":" + sl.getReasonPhrase() + "> on " + gm.getPath());
}
1
0
Author: tchemit
Date: 2010-01-03 11:09:05 +0100 (Sun, 03 Jan 2010)
New Revision: 645
Modified:
trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java
Log:
add log in Xpp3Helper
Modified: trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java
===================================================================
--- trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java 2010-01-01 18:47:47 UTC (rev 644)
+++ trunk/src/main/java/org/nuiton/io/xpp3/Xpp3Helper.java 2010-01-03 10:09:05 UTC (rev 645)
@@ -25,6 +25,8 @@
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@@ -55,8 +57,11 @@
* @since 1.0.3
*/
public class Xpp3Helper {
-
/**
+ * Logger
+ */
+ private static final Log log = LogFactory.getLog(Xpp3Helper.class);
+ /**
* les readers enregistres via un {@link ServiceLoader}
* sur le contrat {@link Xpp3Reader}.
*/
@@ -97,7 +102,9 @@
IOUtil.copy(reader, sWriter);
String rawInput = sWriter.toString();
-
+ if (log.isDebugEnabled()) {
+ log.debug("content to read : \n"+rawInput);
+ }
StringReader sReader = new StringReader(rawInput);
result = modelReader.read(sReader);
@@ -144,7 +151,9 @@
IOUtil.copy(reader, sWriter);
String rawInput = sWriter.toString();
-
+ if (log.isDebugEnabled()) {
+ log.debug("content to read : \n"+rawInput);
+ }
StringReader sReader = new StringReader(rawInput);
result = modelReader.readArray(sReader);
1
0
r644 - in trunk/src/main: java/org/nuiton/helper/plugin resources/org/nuiton/helper
by tchemit@users.nuiton.org 01 Jan '10
by tchemit@users.nuiton.org 01 Jan '10
01 Jan '10
Author: tchemit
Date: 2010-01-01 19:47:47 +0100 (Fri, 01 Jan 2010)
New Revision: 644
Removed:
trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java
trunk/src/main/resources/org/nuiton/helper/plugin/
Modified:
trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java
Log:
- reject Evolution #128: Ajout d'un goal pour g?\195?\169n?\195?\169rer une page index.html dans les site respectant la symetricLayout
- Evolution #181: Permettre de n'?\195?\169xecuter qu'une seule fois le goal share-server-secret
Deleted: trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java 2010-01-01 17:26:30 UTC (rev 643)
+++ trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java 2010-01-01 18:47:47 UTC (rev 644)
@@ -1,211 +0,0 @@
-package org.nuiton.helper.plugin;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.settings.Settings;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.context.Context;
-import org.apache.velocity.exception.ResourceNotFoundException;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.velocity.VelocityComponent;
-import org.nuiton.plugin.AbstractPlugin;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-
-/**
- * Generate a simple index.html page for the site using the symetricLayout.
- *
- * @author chemit
- * @goal generate-site-index
- * @phase pre-site
- * @requiresProject true
- * @since 1.1.1
- */
-public class GenerateSiteIndexPlugin extends AbstractPlugin {
-
- /**
- * Directory where the template file will be generated.
- *
- * @parameter expression="${helper.templateOutputDirectory}" default-value="${project.reporting.outputDirectory}"
- * @required
- * @since 1.1.1
- */
- protected File templateOutputDirectory;
- /**
- * Directory that contains the template.
- * <p>
- * <b>Note:</b> This directory must be a subdirectory of
- * <code>/src/main/resources/ or current project base directory</code>.
- * </p>
- *
- * @parameter expression="${helper.templateDirectory}" default-value="org/nuiton/helper/plugin"
- * @required
- * @since 1.1.1
- */
- protected String templateDirectory;
- /**
- * Velocity template name to use.
- *
- * @parameter expression="${helper.template}" default-value="site-index.vm"
- * @required
- * @since 1.1.1
- */
- protected String template;
- /**
- * The template encoding.
- *
- * @parameter expression="${helper.templateEncoding}" default-value="${project.reporting.outputEncoding}"
- * @since 1.1.1
- */
- protected String templateEncoding;
- /**
- * The name of the artifact to be used in the announcement.
- *
- * @parameter expression="${redmine.title}" default-value="${project.name}"
- * @required
- * @since 1.1.1
- */
- protected String title;
- /**
- * A comma separated list of locales supported by Maven. The first valid token will be the default Locale
- * for this instance of the Java Virtual Machine.
- *
- * @parameter expression="${locales}"
- * @required
- */
- protected String locales;
- /**
- * Dependance du projet.
- *
- * @parameter default-value="${project}"
- * @required
- * @readonly
- * @since 1.1.1
- */
- protected MavenProject project;
- /**
- * Dependance du settings.
- *
- * @parameter default-value="${settings}"
- * @required
- * @readonly
- * @since 1.1.1
- */
- protected Settings settings;
-
- /**
- * Un flag pour activer le mode verbeux.
- *
- * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
- * @since 1.1.1
- */
- protected boolean verbose;
- /**
- * The first locale of the given locales.
- */
- protected String defaultLocale;
-
- /**
- * Velocity Component.
- *
- * @component roleHint="maven-helper-plugin"
- */
- protected VelocityComponent velocity;
-
- @Override
- protected void init() throws Exception {
-// protected boolean init() throws Exception {
- if (StringUtils.isEmpty(templateEncoding)) {
- templateEncoding = ReaderFactory.FILE_ENCODING;
- getLog().warn("File encoding has not been set, using platform encoding " + templateEncoding + ", i.e. build is platform dependent!");
- }
- int firstComma = locales.indexOf(",");
- if (firstComma == -1) {
- defaultLocale = locales;
- } else {
- defaultLocale = locales.substring(0, firstComma);
- }
-
-// return true;
- }
-
- @Override
- protected void doAction() throws Exception {
-
-
- File out = new File(templateOutputDirectory, "index.html");
- if (verbose) {
- getLog().info("destination file " + out);
- }
-
- VelocityEngine engine = velocity.getEngine();
-
- engine.setApplicationAttribute("baseDirectory", project.getBasedir());
-
- // prepare velocity context
-
- Context context = new VelocityContext();
-
- context.put("project", project);
- context.put("title", title);
- context.put("defaultLocale", defaultLocale);
-
- String templatePath = templateDirectory + "/" + template;
-
- // generate index.html
-
- try {
-
- createDirectoryIfNecessary(out.getParentFile());
-
- Writer writer = new OutputStreamWriter(new FileOutputStream(out), templateEncoding);
-
- Template velocityTemplate = engine.getTemplate(templatePath, templateEncoding);
-
- velocityTemplate.merge(context, writer);
-
- writer.flush();
-
- writer.close();
-
- getLog().info("Created index.html from [" + template + "] in " + out);
-
- } catch (ResourceNotFoundException rnfe) {
- throw new MojoExecutionException("Resource not found.", rnfe);
- } catch (Exception e) {
- throw new MojoExecutionException(e.toString(), e);
- }
-
- }
-
-
- public MavenProject getProject() {
- return project;
- }
-
- public void setProject(MavenProject project) {
- this.project = project;
- }
-
- public Settings getSettings() {
- return settings;
- }
-
- public void setSettings(Settings settings) {
- this.settings = settings;
- }
-
- public boolean isVerbose() {
- return verbose;
- }
-
- public void setVerbose(boolean verbose) {
- this.verbose = verbose;
- }
-}
Modified: trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java 2010-01-01 17:26:30 UTC (rev 643)
+++ trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java 2010-01-01 18:47:47 UTC (rev 644)
@@ -109,6 +109,16 @@
*/
protected boolean verbose;
/**
+ * Un flag pour ne lancer le plugin qu'une seule fois par build.
+ * <p/>
+ * <b>Note:</b> Par défaut, la valeur est à {@code true} car il ne parrâit pas
+ * nécessaire de rejouer le mojo à chaque fois.
+ *
+ * @parameter expression="${helper.runOnce}" default-value="true"
+ * @since 1.1.0
+ */
+ protected boolean runOnce;
+ /**
* password decypher
*
* @component roleHint="maven-helper-plugin"
@@ -196,6 +206,41 @@
}
@Override
+ protected boolean checkSkip() {
+ if (runOnce) {
+
+ // compute the unique key refering to parameters of plugin
+
+ StringBuilder buffer = new StringBuilder("share-secret##");
+ buffer.append(serverId);
+ buffer.append("##");
+ for (Map.Entry<Property, String> entry : propertiesToTreate.entrySet()) {
+ buffer.append(entry.getKey()).append(entry.getValue());
+ }
+ // check if plugin was already done.
+
+ String key = buffer.toString();
+
+ if (verbose) {
+ getLog().info("check if already done for key : " + key);
+ }
+ Object value = project.getProperties().get(key);
+ if (value != null) {
+ // ok was already done
+ getLog().info("Goal was already executed, will skip goal.");
+ return false;
+ }
+ long timestamp = System.nanoTime();
+ project.getProperties().put(key, timestamp + "");
+ if (verbose) {
+ getLog().info("Adding cache key " + key + " with timestamp " + timestamp);
+ }
+
+ }
+ return true;
+ }
+
+ @Override
protected void doAction() throws Exception {
Properties properties = project.getModel().getProperties();
1
0
Author: tchemit
Date: 2010-01-01 18:26:30 +0100 (Fri, 01 Jan 2010)
New Revision: 643
Modified:
trunk/pom.xml
Log:
update javadoc taglets
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-01 16:54:27 UTC (rev 642)
+++ trunk/pom.xml 2010-01-01 17:26:30 UTC (rev 643)
@@ -502,7 +502,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -514,7 +514,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -526,7 +526,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -538,7 +538,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -550,7 +550,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -562,7 +562,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -574,7 +574,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -586,7 +586,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -598,7 +598,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -610,7 +610,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -622,7 +622,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -634,7 +634,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -646,7 +646,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -658,7 +658,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -670,7 +670,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -682,7 +682,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -694,7 +694,7 @@
</groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
@@ -704,8 +704,9 @@
</tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -714,8 +715,9 @@
</tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -724,8 +726,9 @@
</tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
</taglets>
@@ -833,10 +836,11 @@
org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -844,10 +848,11 @@
org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -855,10 +860,11 @@
org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -866,10 +872,11 @@
org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -877,10 +884,11 @@
org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -888,10 +896,11 @@
org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -899,10 +908,11 @@
org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -910,10 +920,11 @@
org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -921,10 +932,11 @@
org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -932,10 +944,11 @@
org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -943,10 +956,11 @@
org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -954,10 +968,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -965,10 +980,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -976,10 +992,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -987,10 +1004,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -998,10 +1016,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -1009,10 +1028,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
<artifactId>maven-plugin-tools-javadoc
</artifactId>
- <version>2.4.2</version>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
@@ -1022,8 +1042,9 @@
</tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -1032,8 +1053,9 @@
</tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -1042,8 +1064,9 @@
</tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
</taglets>
1
0
01 Jan '10
Author: tchemit
Date: 2010-01-01 17:54:27 +0100 (Fri, 01 Jan 2010)
New Revision: 642
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java
trunk/src/main/java/org/nuiton/plugin/PluginHelper.java
Log:
- add renameFile api
- fix plexus dependencies
- reformat pom
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-29 15:39:54 UTC (rev 641)
+++ trunk/pom.xml 2010-01-01 16:54:27 UTC (rev 642)
@@ -1,5 +1,6 @@
<?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"
+<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>
@@ -214,6 +215,20 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
<version>1.1.7</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
@@ -259,33 +274,53 @@
<mailingLists>
<mailingList>
<name>maven-helper-plugin-commits</name>
- <subscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-commits</subscribe>
- <unsubscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-commits</unsubscribe>
+ <subscribe>
+ http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-commits
+ </subscribe>
+ <unsubscribe>
+ http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-commits
+ </unsubscribe>
<post>maven-helper-plugin-commits(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-commits/</archive>
+ <archive>
+ http://list.nuiton.org/pipermail/maven-helper-plugin-commits/
+ </archive>
</mailingList>
<mailingList>
<name>maven-helper-plugin-devel</name>
- <subscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-devel</subscribe>
- <unsubscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-devel</unsubscribe>
+ <subscribe>
+ http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-devel
+ </subscribe>
+ <unsubscribe>
+ http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-devel
+ </unsubscribe>
<post>maven-helper-plugin-devel(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-devel/</archive>
+ <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-devel/
+ </archive>
</mailingList>
<mailingList>
<name>maven-helper-plugin-users</name>
- <subscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-users</subscribe>
- <unsubscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-users</unsubscribe>
+ <subscribe>
+ http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-users
+ </subscribe>
+ <unsubscribe>
+ http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-helper-plugin-users
+ </unsubscribe>
<post>maven-helper-plugin-users(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-users/</archive>
+ <archive>http://list.nuiton.org/pipermail/maven-helper-plugin-users/
+ </archive>
</mailingList>
</mailingLists>
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/maven-helper-plugin/trunk</url>
+ <connection>scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk
+ </connection>
+ <developerConnection>
+ scm:svn:http://svn.nuiton.org/svn/maven-helper-plugin/trunk
+ </developerConnection>
+ <url>http://www.nuiton.org/repositories/browse/maven-helper-plugin/trunk
+ </url>
</scm>
<issueManagement>
@@ -304,7 +339,9 @@
</snapshotRepository>
<site>
<id>nuiton</id>
- <url>scpexe://nuiton.org/var/lib/redmine-nuiton/project-site/maven-helper-plugin</url>
+ <url>
+ scpexe://nuiton.org/var/lib/redmine-nuiton/project-site/maven-helper-plugin
+ </url>
</site>
</distributionManagement>
@@ -335,7 +372,8 @@
<maven.compile.target>1.6</maven.compile.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <project.reporting.outputEncoding>UTF-8
+ </project.reporting.outputEncoding>
<maven.test.skip>false</maven.test.skip>
<maven.javadoc.skip>false</maven.javadoc.skip>
@@ -345,16 +383,21 @@
<license.licenseName>lgpl_v3</license.licenseName>
- <repository.home.url>http://maven.nuiton.org/release</repository.home.url>
+ <repository.home.url>http://maven.nuiton.org/release
+ </repository.home.url>
<!-- redmine configuration -->
<redmine.safe>false</redmine.safe>
<redmine.url>http://www.${platform}</redmine.url>
<redmine.projectId>maven-helper-plugin</redmine.projectId>
- <redmine.xmlPath>${basedir}/target/generated-sources/changes/changes.xml</redmine.xmlPath>
- <redmine.issueLinkTemplate>${redmine.url}/issues/show/%ISSUE%</redmine.issueLinkTemplate>
- <redmine.versionLinkTemplate>${redmine.url}/versions/show/%VERSION%</redmine.versionLinkTemplate>
- <redmine.collectedFiles>target/collect.properties</redmine.collectedFiles>
+ <redmine.xmlPath>${basedir}/target/generated-sources/changes/changes.xml
+ </redmine.xmlPath>
+ <redmine.issueLinkTemplate>${redmine.url}/issues/show/%ISSUE%
+ </redmine.issueLinkTemplate>
+ <redmine.versionLinkTemplate>${redmine.url}/versions/show/%VERSION%
+ </redmine.versionLinkTemplate>
+ <redmine.collectedFiles>target/collect.properties
+ </redmine.collectedFiles>
</properties>
<build>
@@ -433,8 +476,8 @@
<artifactId>maven-source-plugin</artifactId>
<version>2.1</version>
</plugin>
-
- <plugin>
+
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3</version>
</plugin>
@@ -443,112 +486,154 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${javadoc.version}</version>
<configuration>
- <docencoding>${project.reporting.outputEncoding}</docencoding>
+ <docencoding>${project.reporting.outputEncoding}
+ </docencoding>
<encoding>${project.reporting.outputEncoding}</encoding>
<charset>${project.reporting.outputEncoding}</charset>
<quiet>true</quiet>
<skip>${maven.javadoc.skip}</skip>
<taglets>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
@@ -557,8 +642,10 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
@@ -567,41 +654,54 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusComponentTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
@@ -609,7 +709,9 @@
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusConfigurationTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
@@ -617,7 +719,9 @@
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusRequirementTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
@@ -634,9 +738,12 @@
<configuration>
<locales>fr</locales>
<siteDirectory>src/site</siteDirectory>
- <inputEncoding>${project.reporting.outputEncoding}</inputEncoding>
- <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
- <generateReports>${maven.reports.generate}</generateReports>
+ <inputEncoding>${project.reporting.outputEncoding}
+ </inputEncoding>
+ <outputEncoding>${project.reporting.outputEncoding}
+ </outputEncoding>
+ <generateReports>${maven.reports.generate}
+ </generateReports>
</configuration>
</plugin>
@@ -682,8 +789,12 @@
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1.2</version>
<configuration>
- <dependencyDetailsEnabled>${maven.reports.dependencyDetailsEnabled}</dependencyDetailsEnabled>
- <dependencyLocationsEnabled>${maven.reports.dependencyLocationsEnabled}</dependencyLocationsEnabled>
+ <dependencyDetailsEnabled>
+ ${maven.reports.dependencyDetailsEnabled}
+ </dependencyDetailsEnabled>
+ <dependencyLocationsEnabled>
+ ${maven.reports.dependencyLocationsEnabled}
+ </dependencyLocationsEnabled>
</configuration>
<reportSets>
<reportSet>
@@ -714,104 +825,138 @@
<docencoding>${project.build.sourceEncoding}</docencoding>
<encoding>${project.build.sourceEncoding}</encoding>
<charset>${project.reporting.outputEncoding}</charset>
- <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames>
+ <excludePackageNames>${maven.javadoc.excludePackageNames}
+ </excludePackageNames>
<taglets>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
@@ -821,49 +966,60 @@
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
</tagletClass>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
<version>2.4.2</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusComponentTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
@@ -871,7 +1027,9 @@
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusConfigurationTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
@@ -879,7 +1037,9 @@
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusRequirementTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
@@ -909,7 +1069,7 @@
<!-- Implicit add of reportSet to not generate jira reports -->
<plugin>
<artifactId>maven-changes-plugin</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
<configuration>
<issueLinkTemplatePerSystem>
<redmine>${redmine.issueLinkTemplate}</redmine>
@@ -938,7 +1098,8 @@
<version>2.4</version>
<configuration>
<linkXRef>true</linkXRef>
- <sourceEncoding>${project.reporting.outputEncoding}</sourceEncoding>
+ <sourceEncoding>${project.reporting.outputEncoding}
+ </sourceEncoding>
<minimumTokens>100</minimumTokens>
<targetJdk>${maven.compile.target}</targetJdk>
</configuration>
@@ -1051,7 +1212,8 @@
<artifactId>maven-jredmine-plugin</artifactId>
<version>${jredmine.version}</version>
<configuration>
- <columnNames>key,summary,status,assignee,tracker,priority,version,category,createdOn
+ <columnNames>
+ key,summary,status,assignee,tracker,priority,version,category,createdOn
</columnNames>
</configuration>
<reportSets>
@@ -1110,7 +1272,8 @@
<phase>install</phase>
<configuration>
<extraFiles/>
- <descriptionFile>${redmine.collectedFiles}</descriptionFile>
+ <descriptionFile>${redmine.collectedFiles}
+ </descriptionFile>
</configuration>
</execution>
</executions>
@@ -1139,7 +1302,9 @@
<statusIds>3,4,5</statusIds>
<!-- generate announcements -->
- <urlDownload>${redmine.url}/projects/list_files/maven-helper-plugin</urlDownload>
+ <urlDownload>
+ ${redmine.url}/projects/list_files/maven-helper-plugin
+ </urlDownload>
<!--<changesTitle>Release note of Maven pom project</changesTitle>-->
<!--<releaseDescription>Description of first release</releaseDescription>-->
@@ -1204,8 +1369,11 @@
<!-- for a multi-module just run on root project -->
<runOnce>true</runOnce>
- <emailTitle>[ANNOUNCEMENT] - ${project.artifactId} ${project.version} released</emailTitle>
- <emailContentFile>target/generated-sources/announcement/release-email-announcement.vm
+ <emailTitle>[ANNOUNCEMENT] - ${project.artifactId}
+ ${project.version} released
+ </emailTitle>
+ <emailContentFile>
+ target/generated-sources/announcement/release-email-announcement.vm
</emailContentFile>
<mailSender>
<name>${platform} Release Notification</name>
@@ -1248,13 +1416,17 @@
<closeVersion>true</closeVersion>
<!-- publish-attachments -->
- <filesFromProperties>${redmine.collectedFiles}</filesFromProperties>
+ <filesFromProperties>${redmine.collectedFiles}
+ </filesFromProperties>
<!-- publish-news -->
- <newsContentFile>target/generated-sources/announcement/release-news-announcement.vm
+ <newsContentFile>
+ target/generated-sources/announcement/release-news-announcement.vm
</newsContentFile>
<newsSummary>${project.description}</newsSummary>
- <newsTitle>${project.artifactId} ${project.version} released</newsTitle>
+ <newsTitle>${project.artifactId} ${project.version}
+ released
+ </newsTitle>
</configuration>
</plugin>
@@ -1291,7 +1463,8 @@
<activeByDefault>false</activeByDefault>
</activation>
<properties>
- <maven.reports.dependencyDetailsEnabled>false</maven.reports.dependencyDetailsEnabled>
+ <maven.reports.dependencyDetailsEnabled>false
+ </maven.reports.dependencyDetailsEnabled>
</properties>
</profile>
<!-- do not build locations of dependencies in maven-project-info-report (speedup site generation in dev) -->
@@ -1301,7 +1474,8 @@
<activeByDefault>false</activeByDefault>
</activation>
<properties>
- <maven.reports.dependencyLocationsEnabled>false</maven.reports.dependencyLocationsEnabled>
+ <maven.reports.dependencyLocationsEnabled>false
+ </maven.reports.dependencyLocationsEnabled>
</properties>
</profile>
@@ -1319,15 +1493,21 @@
<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>
- <pomInclude>share-server-secret/single/pom.xml</pomInclude>
+ <pomInclude>collect-files/single/pom.xml
+ </pomInclude>
+ <pomInclude>collect-files/multi/pom.xml
+ </pomInclude>
+ <pomInclude>send-email/single/pom.xml
+ </pomInclude>
+ <pomInclude>share-server-secret/single/pom.xml
+ </pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
- <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+ <localRepositoryPath>${basedir}/target/local-repo
+ </localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
- <cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
+ <cloneProjectsTo>${project.build.directory}/its
+ </cloneProjectsTo>
</configuration>
<executions>
<execution>
Modified: trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java 2009-12-29 15:39:54 UTC (rev 641)
+++ trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java 2010-01-01 16:54:27 UTC (rev 642)
@@ -87,7 +87,7 @@
@Override
public final void execute() throws MojoExecutionException, MojoFailureException {
-
+ try {
// check if project packaging is compatible with the mojo
boolean canContinue = checkPackaging();
@@ -127,9 +127,19 @@
} catch (Exception e) {
throw new MojoExecutionException("could not execute goal " + getClass().getSimpleName() + " for reason : " + e.getMessage(), e);
}
+ } finally {
+ afterExecute();
+ }
}
/**
+ * A call back to execute after the {@link #execute()} is done
+ */
+ protected void afterExecute() {
+ // by default do nothing
+ }
+
+ /**
* Check if the project packaging is acceptable for the mojo.
* <p/>
* By default, accept all packaging types.
@@ -610,6 +620,19 @@
PluginHelper.deleteFile(file);
}
+/**
+ * Rename the given file to the destination one.
+ *
+ * @param file the file to rename
+ * @param destination the destination of the file
+ * @throws IOException if could not delete the file
+ * @since 1.2.0
+ */
+ protected void renameFile(File file,File destination) throws IOException {
+ PluginHelper.renameFile(file,destination);
+ }
+
+
/**
* @param file the source file
* @return the backup file
Modified: trunk/src/main/java/org/nuiton/plugin/PluginHelper.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/PluginHelper.java 2009-12-29 15:39:54 UTC (rev 641)
+++ trunk/src/main/java/org/nuiton/plugin/PluginHelper.java 2010-01-01 16:54:27 UTC (rev 642)
@@ -363,6 +363,21 @@
}
/**
+ * Rename the given file to a new destination.
+ *
+ * @param file the file to rename
+ * @param destination the destination file
+ * @throws IOException if could not rename the file
+ * @since 1.2.0
+ */
+ public static void renameFile(File file, File destination) throws IOException {
+ boolean b = file.renameTo(destination);
+ if (!b) {
+ throw new IOException("could not rename " + file + " to " + destination);
+ }
+ }
+
+ /**
* Permet de copier le fichier source vers le fichier cible.
*
* @param source le fichier source
@@ -456,6 +471,7 @@
// FileUtils.copyStreamToFile(facade, destFile);
// }
+
public static List<File> getIncludedFiles(File dir, String[] includes, String[] excludes) {
DirectoryScanner ds = new DirectoryScanner();
List<File> result = new ArrayList<File>();
1
0
29 Dec '09
Author: tchemit
Date: 2009-12-29 16:39:54 +0100 (Tue, 29 Dec 2009)
New Revision: 641
Added:
trunk/src/main/java/org/nuiton/helper/plugin/SendEmailMojo.java
trunk/src/main/java/org/nuiton/io/mail/
trunk/src/main/java/org/nuiton/io/mail/MailSender.java
trunk/src/main/java/org/nuiton/io/mail/ProjectJavamailMailSender.java
trunk/src/test/java/org/nuiton/helper/
trunk/src/test/java/org/nuiton/helper/plugin/
trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java
trunk/src/test/resources/org/nuiton/helper/
trunk/src/test/resources/org/nuiton/helper/plugin/
trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/
trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/mailContentFile.txt
trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/sendEmail.xml
trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/skipSendEmail.xml
Removed:
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/
trunk/src/test/java/org/nuiton/mail/
trunk/src/test/resources/org/nuiton/mail/
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/helper/plugin/CollectFilesMojo.java
trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java
trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java
trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java
trunk/src/main/java/org/nuiton/plugin/Plugin.java
trunk/src/main/java/org/nuiton/plugin/PluginHelper.java
Log:
- begin of version 1.2.0
- improve AbstrctPlugin api :
* init method does not anylonger returns anything just throw exception if something is wrong)
* add a checkSkip method in api to make possible easely to not execute the doAction method
* doAction method should not anylonger performs test form skipping content
- use the new api on goals
- move mail api to io.mail
-move mail mojo to helper.plugin package (with other goals)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/pom.xml 2009-12-29 15:39:54 UTC (rev 641)
@@ -11,7 +11,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-helper-plugin</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<dependencies>
Modified: trunk/src/main/java/org/nuiton/helper/plugin/CollectFilesMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/helper/plugin/CollectFilesMojo.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/helper/plugin/CollectFilesMojo.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -20,26 +20,22 @@
*/
package org.nuiton.helper.plugin;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.nuiton.plugin.AbstractPlugin;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
/**
* Collect files some files from a project and copy them into a directory.
*
+ * @author tchemit
* @goal collect-files
* @requiresProject true
- *
- * @author tchemit
* @since 1.1.0
*/
public class CollectFilesMojo extends AbstractPlugin {
@@ -64,7 +60,7 @@
protected List attachedArtifacts;
/**
* User extra files to collect.
- *
+ * <p/>
* Multi values can be used, separated by comma.
*
* @parameter expression="${helper.extraFiles}"
@@ -73,7 +69,7 @@
protected String extraFiles;
/**
* File name pattern of selected files to publish.
- *
+ * <p/>
* If no Set - no include filter
*
* @parameter expression="${helper.includes}" default-value=""
@@ -82,7 +78,7 @@
protected String includes;
/**
* File name pattern of selected files to publish.
- *
+ * <p/>
* If no Set - no exclude filter
*
* @parameter expression="${helper.excludes}" default-value=""
@@ -92,7 +88,7 @@
/**
* Directory where to store collected files.
* <p/>
- * <b>Note :</b> In a multi-module context, will always use the value of
+ * <b>Note :</b> In a multi-module context, will always use the value of
* the property of the root module, because we need to push collected files
* to only one place.
*
@@ -152,18 +148,35 @@
* @since 1.0.0
*/
protected String encoding;
- List<File> files;
+ /**
+ * Files to collect
+ */
+ protected List<File> files;
@Override
- protected boolean init() throws Exception {
+ protected void init() throws Exception {
if (skip) {
- return true;
+ return;
}
files = getFiles();
+// if (files.isEmpty()) {
+//
+// getLog().warn("No file to collect.");
+// skip = true;
+// }
+ }
+
+ @Override
+ protected boolean checkSkip() {
+ if (skip) {
+ getLog().info("Skip flag is on, goal will not be executed.");
+ return false;
+ }
+
if (files.isEmpty()) {
- getLog().warn("No file to collect.");
+ getLog().warn("No file to collect, goal will not be executed.");
return false;
}
@@ -173,10 +186,10 @@
@Override
public void doAction() throws Exception {
- if (skip) {
- getLog().info("Skip flag in on, goal will not be executed");
- return;
- }
+// if (skip) {
+// getLog().info("Skip flag in on, goal will not be executed");
+// return;
+// }
MavenProject rootProject = getExecutionRootProject();
@@ -265,7 +278,7 @@
/**
* 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
@@ -289,7 +302,7 @@
* 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
+ * @param files the files to store
* @throws IOException if any pb when writing file
*/
public void setFiles(File output, List<File> files) throws IOException {
Modified: trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/helper/plugin/GenerateSiteIndexPlugin.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -119,7 +119,8 @@
protected VelocityComponent velocity;
@Override
- protected boolean init() throws Exception {
+ protected void init() throws Exception {
+// protected boolean init() throws Exception {
if (StringUtils.isEmpty(templateEncoding)) {
templateEncoding = ReaderFactory.FILE_ENCODING;
getLog().warn("File encoding has not been set, using platform encoding " + templateEncoding + ", i.e. build is platform dependent!");
@@ -131,7 +132,7 @@
defaultLocale = locales.substring(0, firstComma);
}
- return true;
+// return true;
}
@Override
Copied: trunk/src/main/java/org/nuiton/helper/plugin/SendEmailMojo.java (from rev 640, trunk/src/main/java/org/nuiton/mail/plugin/SendEmailMojo.java)
===================================================================
--- trunk/src/main/java/org/nuiton/helper/plugin/SendEmailMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/helper/plugin/SendEmailMojo.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1,426 @@
+/*
+ * *##%
+ * 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.helper.plugin;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.model.Developer;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Settings;
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.logging.console.ConsoleLogger;
+import org.codehaus.plexus.mailsender.MailMessage;
+import org.codehaus.plexus.mailsender.MailSenderException;
+import org.nuiton.io.mail.MailSender;
+import org.nuiton.io.mail.ProjectJavamailMailSender;
+import org.nuiton.plugin.AbstractPlugin;
+import org.nuiton.plugin.PluginHelper;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * Send a email.
+ *
+ * @author tchemit
+ * @goal send-email
+ * @requiresOnline true
+ * @requiresProject true
+ * @since 1.0.3
+ */
+public class SendEmailMojo extends AbstractPlugin {
+
+ /**
+ * Dependance du projet.
+ *
+ * @parameter default-value="${project}"
+ * @required
+ * @readonly
+ * @since 1.0.3
+ */
+ protected MavenProject project;
+ /**
+ * Dependance du settings.
+ *
+ * @parameter default-value="${settings}"
+ * @required
+ * @readonly
+ * @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.3
+ */
+ protected boolean verbose;
+ /**
+ * The Velocity template used to format the email announcement.
+ *
+ * @parameter expression="${helper.emailContentFile}"
+ * @required
+ * @since 1.0.3
+ */
+ protected File emailContentFile;
+ /**
+ * The title of the email to send.
+ *
+ * @parameter expression="${helper.emailTitle}"
+ * @required
+ * @since 1.0.3
+ */
+ protected String emailTitle;
+ /**
+ * Smtp Server.
+ *
+ * @parameter expression="${helper.smtpHost}"
+ * @required
+ * @since 1.0.3
+ */
+ protected String smtpHost;
+ /**
+ * Port.
+ *
+ * @parameter default-value="25" expression="${helper.smtpPort}"
+ * @required
+ * @since 1.0.3
+ */
+ protected int smtpPort;
+ /**
+ * The username used to send the email.
+ *
+ * @parameter expression="${helper.username}"
+ * @since 1.0.3
+ */
+ protected String username;
+ /**
+ * The password used to send the email.
+ *
+ * @parameter expression="${helper.password}"
+ * @since 1.0.3
+ */
+ protected String password;
+ /**
+ * If the email should be sent in SSL mode.
+ *
+ * @parameter default-value="false" expression="${helper.sslMode}"
+ * @since 1.0.3
+ */
+ protected boolean sslMode;
+ /**
+ * The id of the developer sending the announcement mail. Only used if the <tt>mailSender</tt>
+ * attribute is not set. In this case, this should match the id of one of the developers in
+ * the pom. If a matching developer is not found, then the first developer in the pom will be
+ * used.
+ *
+ * @parameter expression="${helper.fromDeveloperId}"
+ * @since 1.0.3
+ */
+ protected String fromDeveloperId;
+ /**
+ * Defines the sender of the announcement if the list of developer is empty or
+ * if the sender is not a member of the development team.
+ *
+ * @parameter expression="${helper.mailSender}"
+ * @since 1.0.3
+ */
+ protected MailSender mailSender;
+ /**
+ * Recipient email address.
+ *
+ * @parameter
+ * @required
+ * @since 1.0.3
+ */
+ protected List<String> toAddresses;
+ /**
+ * Possible senders.
+ *
+ * @parameter expression="${project.developers}"
+ * @required
+ * @readonly
+ * @since 1.0.3
+ */
+ protected List<Developer> from;
+ /**
+ * Mail content type to use.
+ *
+ * @parameter default-value="text/plain"
+ * @required
+ * @since 1.0.3
+ */
+ protected String mailContentType;
+ /**
+ * The encoding used to read and write files.
+ *
+ * @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
+ * @since 1.0.3
+ */
+ protected String encoding;
+ /**
+ * A flag to skip the goal.
+ *
+ * @parameter expression="${helper.skipSendEmail}" default-value="false"
+ * @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.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.3
+ */
+ private boolean runOnce;
+ /**
+ * internal flag to know if plugin was already executed (for multi-module projects)
+ */
+ private boolean runOnceDone;
+ ///////////////////////////////////////////////////////////////////////////
+ /// Plugin
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public MavenProject getProject() {
+ return project;
+ }
+
+ @Override
+ public void setProject(MavenProject project) {
+ this.project = project;
+ }
+
+ @Override
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ @Override
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// AbstractPlugin
+ ///////////////////////////////////////////////////////////////////////////
+ @Override
+ protected void init() throws Exception {
+// protected boolean init() throws Exception {
+
+ if (isGoalSkip()) {
+ return;
+// return true;
+ }
+
+ runOnceDone = false;
+ if (runOnce) {
+ // check
+
+ if (!isExecutionRoot()) {
+// getLog().info("runOnce flag is on, will skip the goal");
+ runOnceDone = true;
+ return;
+// return true;
+ }
+ }
+
+ if (!emailContentFile.exists()) {
+ // no file to publish...
+ throw new MojoExecutionException("could not find the template " + emailContentFile);
+// getLog().warn("could not find the template " + emailContentFile);
+// getLog().warn("will skip send email...");
+// return false;
+ }
+
+ // check mail sender
+
+ if (mailSender == null) {
+
+ if (from == null || from.isEmpty()) {
+ throw new MojoExecutionException("The <developers> section in your pom should not be empty. Add a <developer> entry or set the " + "mailSender parameter.");
+// getLog().warn("The <developers> section in your pom should not be empty. Add a <developer> entry or set the " + "mailSender parameter.");
+// getLog().warn("will skip send email...");
+// return false;
+ }
+
+ if (fromDeveloperId == null) {
+ final Developer dev = from.get(0);
+ mailSender = new MailSender(dev.getName(), dev.getEmail());
+ } else {
+ for (Developer developer : from) {
+ if (fromDeveloperId.equals(developer.getId())) {
+ mailSender = new MailSender(developer.getName(), developer.getEmail());
+ break;
+ }
+ }
+ if (mailSender == null) {
+ throw new MojoExecutionException("Missing developer with id '" + fromDeveloperId + "' in the <developers> section in your pom.");
+// getLog().warn("Missing developer with id '" + fromDeveloperId + "' in the <developers> section in your pom.");
+// getLog().warn("will skip send email...");
+// return false;
+ }
+ }
+ }
+
+ String fromAddress = mailSender.getEmail();
+ if (StringUtils.isEmpty(fromAddress)) {
+ throw new MojoExecutionException("Invalid mail sender: name and email is mandatory (" + mailSender + ").");
+// getLog().warn("Invalid mail sender: name and email is mandatory (" + mailSender + ").");
+// getLog().warn("will skip send email...");
+// return false;
+ }
+
+// return true;
+ }
+
+ @Override
+ protected boolean checkSkip() {
+ if (isGoalSkip()) {
+ // goal mark to be skipped
+ getLog().info("skipGoal flag is on, will skip the goal.");
+ return false;
+ }
+
+ if (runOnce && runOnceDone) {
+ // already run
+ getLog().info("runOnce flag is on and goal was laready executed, will skip the goal");
+
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+// if (runOnce && runOnceDone) {
+// // already run
+// return;
+// }
+// if (isGoalSkip()) {
+// getLog().info("skipGoal flag is on, the goal is skip.");
+// return;
+// }
+
+ if (dryRun) {
+ getLog().info("\n dryRun flag is on, no mail will be send!\n");
+ }
+
+ String newsContent = PluginHelper.readAsString(emailContentFile, encoding);
+
+ MailMessage mailMsg = createMessage(newsContent, mailSender);
+
+
+ ProjectJavamailMailSender mailer = createMailer();
+
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("fromDeveloperId: " + fromDeveloperId);
+ }
+
+ if (dryRun) {
+ getLog().info("Mail title : " + emailTitle);
+ getLog().info("Mail content :\n" + mailMsg.getContent());
+ return;
+ }
+ getLog().info("Connecting to Host: " + smtpHost + ":" + smtpPort);
+
+ try {
+
+ mailer.send(mailMsg);
+ getLog().info("Sent...");
+ } catch (MailSenderException e) {
+ throw new MojoExecutionException("Failed to send email for reason " + e.getMessage(), e);
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ /// Other
+ ///////////////////////////////////////////////////////////////////////////
+ protected boolean isGoalSkip() {
+ return skipSendEmail;
+ }
+
+ protected MailMessage createMessage(String newsContent, MailSender mailSender) throws MailSenderException {
+
+ String fromName = mailSender.getName();
+ String fromAddress = mailSender.getEmail();
+
+ getLog().info("Using this sender for email announcement: " + fromAddress + " < " + fromName + " > ");
+
+ MailMessage mailMsg = new MailMessage();
+ mailMsg.setSubject(emailTitle);
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("email announcement :\n" + newsContent);
+ }
+ mailMsg.setContent(newsContent);
+ mailMsg.setContentType(mailContentType);
+ mailMsg.setFrom(fromAddress, fromName);
+ for (String e : toAddresses) {
+ getLog().info("Sending mail to " + e + "...");
+ mailMsg.addTo(e, "");
+ }
+ return mailMsg;
+ }
+
+ protected ProjectJavamailMailSender createMailer() {
+
+ ProjectJavamailMailSender mailer = new ProjectJavamailMailSender();
+ ConsoleLogger logger = new ConsoleLogger(Logger.LEVEL_INFO, "base");
+ if (getLog().isDebugEnabled()) {
+ logger.setThreshold(Logger.LEVEL_DEBUG);
+ }
+ mailer.enableLogging(logger);
+ mailer.setSmtpHost(smtpHost);
+ mailer.setSmtpPort(smtpPort);
+ mailer.setSslMode(sslMode);
+ if (username != null) {
+ mailer.setUsername(username);
+ }
+ if (password != null) {
+ mailer.setPassword(password);
+ }
+ mailer.initialize();
+ return mailer;
+ }
+
+ public void setMailSender(MailSender sender) {
+ this.mailSender = sender;
+ }
+
+ public void setFrom(List<Developer> from) {
+ this.from = from;
+ }
+
+ public void setToAddresses(List<String> toAddresses) {
+ this.toAddresses = toAddresses;
+ }
+
+ protected boolean isExecutionRoot() {
+ return project.isExecutionRoot();
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/helper/plugin/SendEmailMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Modified: trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/helper/plugin/ShareServerSecretPlugin.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -1,6 +1,7 @@
package org.nuiton.helper.plugin;
import org.apache.commons.lang.StringUtils;
+import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.maven.settings.Server;
import org.apache.maven.settings.Settings;
@@ -153,7 +154,8 @@
}
@Override
- protected boolean init() throws Exception {
+ protected void init() throws Exception {
+// protected boolean init() throws Exception {
propertiesToTreate = new EnumMap<Property, String>(Property.class);
@@ -170,23 +172,27 @@
propertiesToTreate.put(Property.privateKey, privateKeyOut);
}
if (propertiesToTreate.isEmpty()) {
- getLog().error("Nothing to export, you should specify what to export via 'usernameOut', 'passwordOut', 'passphraseOut', 'privateKeyOut' parameters.");
- return false;
+ throw new MojoExecutionException("Nothing to export, you should specify what to export via 'usernameOut', 'passwordOut', 'passphraseOut' or 'privateKeyOut' parameters.");
+//
+// getLog().error("Nothing to export, you should specify what to export via 'usernameOut', 'passwordOut', 'passphraseOut', 'privateKeyOut' parameters.");
+// return false;
}
if (StringUtils.isEmpty(serverId)) {
- getLog().error("No 'serverId' defined.");
- return false;
+ throw new MojoExecutionException("No 'serverId' defined.");
+// getLog().error("No 'serverId' defined.");
+// return false;
}
server = settings.getServer(serverId.trim());
if (server == null) {
- getLog().error("Could not find server with id '" + serverId + "', check your settings.xml file.");
- return false;
+ throw new MojoExecutionException("Could not find server with id '" + serverId + "', check your settings.xml file.");
+// getLog().error("Could not find server with id '" + serverId + "', check your settings.xml file.");
+// return false;
}
- return true;
+// return true;
}
@Override
@@ -199,6 +205,9 @@
String propertyValue = key.getSecret(server);
String propertyTargetName = entry.getValue();
+ if (isVerbose()) {
+ getLog().info("will decrypt [" + key + "] : " + propertyValue);
+ }
propertyValue = sec.decrypt(propertyValue);
getLog().info("export server [" + serverId + "] " + key.name() + " in ${" + propertyTargetName + "}");
Copied: trunk/src/main/java/org/nuiton/io/mail/MailSender.java (from rev 640, trunk/src/main/java/org/nuiton/mail/MailSender.java)
===================================================================
--- trunk/src/main/java/org/nuiton/io/mail/MailSender.java (rev 0)
+++ trunk/src/main/java/org/nuiton/io/mail/MailSender.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1,66 @@
+/*
+ * *##%
+ * 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.mail;
+
+/**
+ * Defines the sender of a email.
+ *
+ * Note : this code was stolen in {@code maven-changes-plugin}, should thanks
+ * them...
+ *
+ * @author chemit
+ * @since 1.0.3
+ */
+public class MailSender {
+
+ private String name;
+ private String email;
+
+ public MailSender() {
+ super();
+ }
+
+ public MailSender(String name, String email) {
+ this.name = name;
+ this.email = email;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ @Override
+ public String toString() {
+ return getName() + " (" + getEmail() + ")";
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/io/mail/MailSender.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Copied: trunk/src/main/java/org/nuiton/io/mail/ProjectJavamailMailSender.java (from rev 640, trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java)
===================================================================
--- trunk/src/main/java/org/nuiton/io/mail/ProjectJavamailMailSender.java (rev 0)
+++ trunk/src/main/java/org/nuiton/io/mail/ProjectJavamailMailSender.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1,182 @@
+/*
+ * *##%
+ * 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.mail;
+
+import java.security.Security;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+
+import javax.mail.Authenticator;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.PasswordAuthentication;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+
+import org.codehaus.plexus.mailsender.AbstractMailSender;
+import org.codehaus.plexus.mailsender.MailMessage;
+import org.codehaus.plexus.mailsender.MailSenderException;
+import org.codehaus.plexus.mailsender.util.DateFormatUtils;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * Helper class for sending email.
+ *
+ * Note : this code was stolen in {@code maven-changes-plugin}, should thanks
+ * them...
+ *
+ * @author chemit
+ * @since 1.0.3
+ */
+public class ProjectJavamailMailSender
+ extends AbstractMailSender {
+
+ private static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+ private Properties userProperties;
+ private Properties props;
+
+ // ----------------------------------------------------------------------
+ // Component Lifecycle
+ // ----------------------------------------------------------------------
+ public void initialize() {
+ if (StringUtils.isEmpty(getSmtpHost())) {
+ System.out.println("Error in configuration: Missing smtpHost.");
+ }
+
+ if (getSmtpPort() == 0) {
+ setSmtpPort(DEFAULT_SMTP_PORT);
+ }
+
+ props = new Properties();
+
+ props.put("mail.smtp.host", getSmtpHost());
+
+ props.put("mail.smtp.port", String.valueOf(getSmtpPort()));
+
+ if (getUsername() != null) {
+ props.put("mail.smtp.auth", "true");
+ }
+
+ props.put("mail.debug", String.valueOf(getLogger().isDebugEnabled()));
+
+ if (isSslMode()) {
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+
+ props.put("mail.smtp.socketFactory.port", String.valueOf(getSmtpPort()));
+
+ props.put("mail.smtp.socketFactory.class", SSL_FACTORY);
+
+ props.put("mail.smtp.socketFactory.fallback", "false");
+ }
+
+ if (userProperties != null) {
+ for (Iterator<?> i = userProperties.keySet().iterator(); i.hasNext();) {
+ String key = (String) i.next();
+
+ String value = userProperties.getProperty(key);
+
+ props.put(key, value);
+ }
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // MailSender Implementation
+ // ----------------------------------------------------------------------
+ @Override
+ public void send(MailMessage mail)
+ throws MailSenderException {
+ verify(mail);
+
+ try {
+ Authenticator auth = null;
+
+ if (getUsername() != null) {
+ auth = new Authenticator() {
+
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(getUsername(), getPassword());
+ }
+ };
+ }
+
+ Session session = Session.getDefaultInstance(props, auth);
+
+ session.setDebug(getLogger().isDebugEnabled());
+
+ Message msg = new MimeMessage(session);
+ InternetAddress addressFrom = new InternetAddress(mail.getFrom().getRfc2822Address());
+ msg.setFrom(addressFrom);
+
+ if (mail.getToAddresses().size() > 0) {
+ InternetAddress[] addressTo = new InternetAddress[mail.getToAddresses().size()];
+ int count = 0;
+ for (Iterator<?> i = mail.getToAddresses().iterator(); i.hasNext();) {
+ String address = ((MailMessage.Address) i.next()).getRfc2822Address();
+ addressTo[count++] = new InternetAddress(address);
+ }
+ msg.setRecipients(Message.RecipientType.TO, addressTo);
+ }
+
+ if (mail.getCcAddresses().size() > 0) {
+ InternetAddress[] addressCc = new InternetAddress[mail.getCcAddresses().size()];
+ int count = 0;
+ for (Iterator<?> i = mail.getCcAddresses().iterator(); i.hasNext();) {
+ String address = ((MailMessage.Address) i.next()).getRfc2822Address();
+ addressCc[count++] = new InternetAddress(address);
+ }
+ msg.setRecipients(Message.RecipientType.CC, addressCc);
+ }
+
+ if (mail.getBccAddresses().size() > 0) {
+ InternetAddress[] addressBcc = new InternetAddress[mail.getBccAddresses().size()];
+ int count = 0;
+ for (Iterator<?> i = mail.getBccAddresses().iterator(); i.hasNext();) {
+ String address = ((MailMessage.Address) i.next()).getRfc2822Address();
+ addressBcc[count++] = new InternetAddress(address);
+ }
+ msg.setRecipients(Message.RecipientType.BCC, addressBcc);
+ }
+
+ // Setting the Subject and Content Type
+ msg.setSubject(mail.getSubject());
+ msg.setContent(mail.getContent(), mail.getContentType() == null ? "text/plain" : mail.getContentType());
+
+ if (mail.getSendDate() != null) {
+ msg.setHeader("Date", DateFormatUtils.getDateHeader(mail.getSendDate()));
+ } else {
+ msg.setHeader("Date", DateFormatUtils.getDateHeader(new Date()));
+ }
+
+ // Send the message
+ Transport.send(msg);
+ } catch (MessagingException e) {
+ throw new MailSenderException("Error while sending mail.", e);
+ }
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/io/mail/ProjectJavamailMailSender.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Deleted: trunk/src/main/java/org/nuiton/mail/MailSender.java
===================================================================
--- trunk/src/main/java/org/nuiton/mail/MailSender.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/mail/MailSender.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -1,66 +0,0 @@
-/*
- * *##%
- * 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;
-
-/**
- * Defines the sender of a email.
- *
- * Note : this code was stolen in {@code maven-changes-plugin}, should thanks
- * them...
- *
- * @author chemit
- * @since 1.0.3
- */
-public class MailSender {
-
- private String name;
- private String email;
-
- public MailSender() {
- super();
- }
-
- public MailSender(String name, String email) {
- this.name = name;
- this.email = email;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- @Override
- public String toString() {
- return getName() + " (" + getEmail() + ")";
- }
-}
Deleted: trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java
===================================================================
--- trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/mail/ProjectJavamailMailSender.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -1,182 +0,0 @@
-/*
- * *##%
- * 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;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Properties;
-
-import javax.mail.Authenticator;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-
-import org.codehaus.plexus.mailsender.AbstractMailSender;
-import org.codehaus.plexus.mailsender.MailMessage;
-import org.codehaus.plexus.mailsender.MailSenderException;
-import org.codehaus.plexus.mailsender.util.DateFormatUtils;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * Helper class for sending email.
- *
- * Note : this code was stolen in {@code maven-changes-plugin}, should thanks
- * them...
- *
- * @author chemit
- * @since 1.0.3
- */
-public class ProjectJavamailMailSender
- extends AbstractMailSender {
-
- private static final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
- private Properties userProperties;
- private Properties props;
-
- // ----------------------------------------------------------------------
- // Component Lifecycle
- // ----------------------------------------------------------------------
- public void initialize() {
- if (StringUtils.isEmpty(getSmtpHost())) {
- System.out.println("Error in configuration: Missing smtpHost.");
- }
-
- if (getSmtpPort() == 0) {
- setSmtpPort(DEFAULT_SMTP_PORT);
- }
-
- props = new Properties();
-
- props.put("mail.smtp.host", getSmtpHost());
-
- props.put("mail.smtp.port", String.valueOf(getSmtpPort()));
-
- if (getUsername() != null) {
- props.put("mail.smtp.auth", "true");
- }
-
- props.put("mail.debug", String.valueOf(getLogger().isDebugEnabled()));
-
- if (isSslMode()) {
- Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
-
- props.put("mail.smtp.socketFactory.port", String.valueOf(getSmtpPort()));
-
- props.put("mail.smtp.socketFactory.class", SSL_FACTORY);
-
- props.put("mail.smtp.socketFactory.fallback", "false");
- }
-
- if (userProperties != null) {
- for (Iterator<?> i = userProperties.keySet().iterator(); i.hasNext();) {
- String key = (String) i.next();
-
- String value = userProperties.getProperty(key);
-
- props.put(key, value);
- }
- }
- }
-
- // ----------------------------------------------------------------------
- // MailSender Implementation
- // ----------------------------------------------------------------------
- @Override
- public void send(MailMessage mail)
- throws MailSenderException {
- verify(mail);
-
- try {
- Authenticator auth = null;
-
- if (getUsername() != null) {
- auth = new Authenticator() {
-
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(getUsername(), getPassword());
- }
- };
- }
-
- Session session = Session.getDefaultInstance(props, auth);
-
- session.setDebug(getLogger().isDebugEnabled());
-
- Message msg = new MimeMessage(session);
- InternetAddress addressFrom = new InternetAddress(mail.getFrom().getRfc2822Address());
- msg.setFrom(addressFrom);
-
- if (mail.getToAddresses().size() > 0) {
- InternetAddress[] addressTo = new InternetAddress[mail.getToAddresses().size()];
- int count = 0;
- for (Iterator<?> i = mail.getToAddresses().iterator(); i.hasNext();) {
- String address = ((MailMessage.Address) i.next()).getRfc2822Address();
- addressTo[count++] = new InternetAddress(address);
- }
- msg.setRecipients(Message.RecipientType.TO, addressTo);
- }
-
- if (mail.getCcAddresses().size() > 0) {
- InternetAddress[] addressCc = new InternetAddress[mail.getCcAddresses().size()];
- int count = 0;
- for (Iterator<?> i = mail.getCcAddresses().iterator(); i.hasNext();) {
- String address = ((MailMessage.Address) i.next()).getRfc2822Address();
- addressCc[count++] = new InternetAddress(address);
- }
- msg.setRecipients(Message.RecipientType.CC, addressCc);
- }
-
- if (mail.getBccAddresses().size() > 0) {
- InternetAddress[] addressBcc = new InternetAddress[mail.getBccAddresses().size()];
- int count = 0;
- for (Iterator<?> i = mail.getBccAddresses().iterator(); i.hasNext();) {
- String address = ((MailMessage.Address) i.next()).getRfc2822Address();
- addressBcc[count++] = new InternetAddress(address);
- }
- msg.setRecipients(Message.RecipientType.BCC, addressBcc);
- }
-
- // Setting the Subject and Content Type
- msg.setSubject(mail.getSubject());
- msg.setContent(mail.getContent(), mail.getContentType() == null ? "text/plain" : mail.getContentType());
-
- if (mail.getSendDate() != null) {
- msg.setHeader("Date", DateFormatUtils.getDateHeader(mail.getSendDate()));
- } else {
- msg.setHeader("Date", DateFormatUtils.getDateHeader(new Date()));
- }
-
- // Send the message
- Transport.send(msg);
- } catch (MessagingException e) {
- throw new MailSenderException("Error while sending mail.", e);
- }
- }
-}
Modified: trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/plugin/AbstractPlugin.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -49,13 +49,15 @@
* <p/>
* <b>Note:</b> The method is invoked before the {@link #doAction()} method.
* <p/>
+ * <p/>
+ * // * @return <code>true</code> if mojo is well initialize and something has
+ * // * to be done in the {@link #doAction()} method, <code>false</code>
+ * // * otherwise.
*
- * @return <code>true</code> if mojo is well initialize and something has
- * to be done in the {@link #doAction()} method, <code>false</code>
- * otherwise.
* @throws Exception if any
*/
- protected abstract boolean init() throws Exception;
+ protected abstract void init() throws Exception;
+// protected abstract boolean init() throws Exception;
/**
* Do plugin action.
@@ -70,41 +72,54 @@
*/
protected abstract void doAction() throws Exception;
- /**
- * the message to display when will skip the goal
- */
- protected String skipAfterInitMessage;
+// /**
+// * the message to display when will skip the goal
+// */
+// protected String skipAfterInitMessage;
- protected AbstractPlugin() {
- this("The goal could not be initialized, will skip the goal");
- }
+// protected AbstractPlugin() {
+// this("The goal could not be initialized, will skip the goal");
+// }
- protected AbstractPlugin(String skipAfterInitMessage) {
- this.skipAfterInitMessage = skipAfterInitMessage;
- }
+// protected AbstractPlugin(String skipAfterInitMessage) {
+// this.skipAfterInitMessage = skipAfterInitMessage;
+// }
@Override
- public void execute() throws MojoExecutionException, MojoFailureException {
+ public final void execute() throws MojoExecutionException, MojoFailureException {
+ // check if project packaging is compatible with the mojo
+
boolean canContinue = checkPackaging();
if (!canContinue) {
getLog().warn("The goal is skip due to packaging '" + getProject().getPackaging() + "'");
return;
}
+ // init the mojo
+
try {
- canContinue = init();
+ init();
+// canContinue = init();
} catch (Exception e) {
throw new MojoExecutionException("could not init goal " + getClass().getSimpleName() + " for reason : " + e.getMessage(), e);
}
+ // check if mojo can be skipped
+
+ canContinue = checkSkip();
if (!canContinue) {
- getLog().warn(skipAfterInitMessage);
+ if (isVerbose() || getLog().isDebugEnabled()) {
+ getLog().info("Goal will not be executed.");
+ }
+// getLog().warn(skipAfterInitMessage);
return;
}
+ // can really execute the mojo
+
try {
doAction();
@@ -134,14 +149,25 @@
* project, {@code false} otherwise.
*/
protected boolean checkPackaging() {
+ // by default, accept every type of packaging
return true;
}
/**
+ * Checks if the mojo execution should be skipped.
+ *
+ * @return {@code false} if the mojo should not be executed.
+ */
+ protected boolean checkSkip() {
+ // by default, never skip goal
+ return true;
+ }
+
+ /**
* Accept the project's packaging between some given.
*
* @param packages the accepted packaging
- * @return {@code true} if the project's packagin is one of the given ones.
+ * @return {@code true} if the project's packaging is one of the given ones.
*/
protected boolean acceptPackaging(Packaging... packages) {
String projectPackaging = getProject().getPackaging();
@@ -252,19 +278,18 @@
*
* @param srcFile represents the file to copy.
* @param destFile file name of destination file.
- * @throws MojoExecutionException with a message if an
- * error occurs.
+ * @throws IOException if could not copy file.
*/
public void copyFile(File srcFile, File destFile)
- throws MojoExecutionException {
- try {
- getLog().info("Copying " + srcFile.getName() + " to " + destFile);
+ throws IOException {
+// try {
+ getLog().info("Copying " + srcFile.getName() + " to " + destFile);
- PluginHelper.copy(srcFile, destFile);
+ PluginHelper.copy(srcFile, destFile);
- } catch (Exception e) {
- throw new MojoExecutionException("Error copying from " + srcFile + " to " + destFile, e);
- }
+// } catch (Exception e) {
+// throw new MojoExecutionException("Error copying from " + srcFile + " to " + destFile, e);
+// }
}
/**
@@ -586,6 +611,26 @@
}
/**
+ * @param file the source file
+ * @return the backup file
+ */
+ public File getBackupFile(File file) {
+ return new File(file.getAbsolutePath() + "~");
+ }
+
+ /**
+ * Backups the given file using the {@link #getBackupFile(java.io.File)} as
+ * destination file.
+ *
+ * @param f the file to backup
+ * @throws IOException if any pb while copying the file
+ */
+ protected void backupFile(File f) throws IOException {
+ File dst = getBackupFile(f);
+ copyFile(f, dst);
+ }
+
+ /**
* Init mojo classLoader.
*
* @param project the maven project
Modified: trunk/src/main/java/org/nuiton/plugin/Plugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/Plugin.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/plugin/Plugin.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -25,15 +25,33 @@
/**
* A common contract to be implements by our mojo and reports.
+ * <p/>
+ * Just expose a {@link #isVerbose()} flag and the maven project {@link #getProject()}.
*
- * Just expose a {@link #isVerbose()} flag and the maven project {@link #getProject()}.
- *
* @author chemit
* @since 1.0.3
*/
public interface Plugin extends Mojo {
/**
+ * An enumeration to qualify the init result of a plugin
+ */
+ enum InitState {
+ /**
+ * when something is wrong and should throw an error
+ */
+ failed,
+ /**
+ * when the plugin execution should be skipped
+ */
+ skip,
+ /**
+ * when plugin can be executed
+ */
+ ok
+ }
+
+ /**
* An enumeration to qualify a maven module packaging
*/
enum Packaging {
@@ -43,8 +61,10 @@
plugin,
war,
ear
- };
+ }
+ ;
+
MavenProject getProject();
void setProject(MavenProject project);
Modified: trunk/src/main/java/org/nuiton/plugin/PluginHelper.java
===================================================================
--- trunk/src/main/java/org/nuiton/plugin/PluginHelper.java 2009-12-28 09:27:41 UTC (rev 640)
+++ trunk/src/main/java/org/nuiton/plugin/PluginHelper.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -20,32 +20,19 @@
*/
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.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
import org.apache.maven.model.Resource;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.DirectoryScanner;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
+import java.io.*;
+import java.text.MessageFormat;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
/**
* Une classe pour mutualiser toutes les méthodes utiles pour un plugin.
*
@@ -269,7 +256,7 @@
/**
* @param newresourceDir the new resource directory to add
- * @param project the maven project to modifiy
+ * @param project the maven project to modifiy
* @return {@code true} if resources was added
* @deprecated since 1.1.1, prefer use the {@link #addResourceDir(java.io.File, org.apache.maven.project.MavenProject, String...)}
*/
@@ -282,7 +269,7 @@
/**
* @param newresourceDir the new resource directory to add
- * @param project the maven project to modifiy
+ * @param project the maven project to modifiy
* @return {@code true} if resources was added
* @deprecated since 1.1.1, prefer use the {@link #addTestResourceDir(java.io.File, org.apache.maven.project.MavenProject, String...)}
*/
@@ -295,8 +282,8 @@
/**
* @param newresourceDir the new resource directory to add
- * @param project the maven project to modifiy
- * @param resources the known resources for the maven project
+ * @param project the maven project to modifiy
+ * @param resources the known resources for the maven project
* @return {@code true} if resources was added
* @deprecated since 1.1.1, prefer use the {@link #addResourceDir(java.io.File, org.apache.maven.project.MavenProject, java.util.List, String...)}
*/
@@ -365,6 +352,10 @@
* @since 1.1.1
*/
public static void deleteFile(File file) throws IOException {
+ if (!file.exists()) {
+ // file does not exist, can not delete it
+ return;
+ }
boolean b = file.delete();
if (!b) {
throw new IOException("could not delete file " + file);
Copied: trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java (from rev 640, trunk/src/test/java/org/nuiton/mail/plugin/SendEmailMojoTest.java)
===================================================================
--- trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1,88 @@
+/*
+ * *##%
+ * 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.helper.plugin;
+
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Test;
+import org.nuiton.io.mail.MailSender;
+import org.nuiton.plugin.AbstractMojoTest;
+
+import java.io.File;
+import java.util.Arrays;
+
+/**
+ * @author tchemit
+ * @since 1.0.0
+ */
+public class SendEmailMojoTest extends AbstractMojoTest<SendEmailMojo> {
+
+ protected boolean canContinue;
+
+ @Override
+ protected String getGoalName(String methodName) {
+ return "send-email";
+ }
+
+ @Override
+ protected void setUpMojo(SendEmailMojo mojo, File pomFile) throws Exception {
+ super.setUpMojo(mojo, pomFile);
+
+ // add a mailSender here
+ MailSender sender = new MailSender();
+ sender.setName("Nuiton Release Notification");
+ sender.setEmail("test(a)noway.fr");
+ mojo.setMailSender(sender);
+
+ // add a destination
+ mojo.setToAddresses(Arrays.asList("chemit(a)codelutin.com"));
+
+ try {
+ mojo.init();
+ canContinue = true;
+ } catch (Exception e) {
+ canContinue = false;
+ }
+// canContinue = mojo.init();
+ if (canContinue) {
+ if (mojo.isVerbose()) {
+ log.info("setup done for " + mojo.getProject().getFile().getName());
+ }
+ } else {
+ log.error("setup was not successfull, will skip this test [" + getClass() + "]");
+ }
+ }
+
+ @Test
+ public void sendEmail() throws Exception {
+ Assume.assumeTrue(canContinue);
+
+ Assert.assertNotNull(getMojo());
+ getMojo().doAction();
+ }
+
+ @Test
+ public void skipSendEmail() throws Exception {
+ Assume.assumeTrue(canContinue);
+ Assert.assertNotNull(getMojo());
+ getMojo().execute();
+ }
+}
Property changes on: trunk/src/test/java/org/nuiton/helper/plugin/SendEmailMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Copied: trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/mailContentFile.txt (from rev 640, trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/mailContentFile.txt)
===================================================================
--- trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/mailContentFile.txt (rev 0)
+++ trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/mailContentFile.txt 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1 @@
+The content of the test email
\ No newline at end of file
Copied: trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/sendEmail.xml (from rev 640, trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/sendEmail.xml)
===================================================================
--- trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/sendEmail.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/sendEmail.xml 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1,43 @@
+<?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>test-send-email</artifactId>
+ <version>0</version>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <configuration>
+ <emailContentFile>target/test-classes/org/nuiton/mail/plugin/sendEmailMojoTest/mailContentFile.txt</emailContentFile>
+ <emailTitle>[ANNOUNCEMENT] - One 1.0.0 released</emailTitle>
+ <encoding>UTF-8</encoding>
+ <skipSendEmail>false</skipSendEmail>
+ <!--<mailSender>
+ <name>Nuiton Release Notification</name>
+ <email>noreply@${platform}</email>
+ </mailSender>
+ <toAddresses>
+ <item>chemit(a)codelutin.com</item>
+ </toAddresses>-->
+ <smtpHost>smtp</smtpHost>
+ <smtpPort>25</smtpPort>
+ <dryRun>true</dryRun>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>send-email</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/skipSendEmail.xml (from rev 640, trunk/src/test/resources/org/nuiton/mail/plugin/sendEmailMojoTest/skipSendEmail.xml)
===================================================================
--- trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/skipSendEmail.xml (rev 0)
+++ trunk/src/test/resources/org/nuiton/helper/plugin/sendEmailMojoTest/skipSendEmail.xml 2009-12-29 15:39:54 UTC (rev 641)
@@ -0,0 +1,33 @@
+<?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>test-send-email</artifactId>
+ <version>0</version>
+
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-helper-plugin</artifactId>
+ <configuration>
+ <emailContentFile>target/test-classes/org/nuiton/smail/plugin/sendEmailMojoTest/mailContentFile.txt</emailContentFile>
+ <emailTitle>[ANNOUNCEMENT] - One 1.0.0 released</emailTitle>
+ <encoding>UTF-8</encoding>
+ <skipSendEmail>true</skipSendEmail>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>send-email</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
1
0