Author: tchemit Date: 2009-11-02 04:09:28 +0100 (Mon, 02 Nov 2009) New Revision: 1664 Modified: trunk/pom.xml Log: bump maven-helper-pluging and maven-jredmine-plugin + fix redmine-release-profile Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-11-01 16:19:45 UTC (rev 1663) +++ trunk/pom.xml 2009-11-02 03:09:28 UTC (rev 1664) @@ -346,6 +346,17 @@ <properties> + <platform>nuiton.org</platform> + + <!-- a proprerty to define the id of the project, in a multi-module + project, you must use a hard-cored value, otherwise for modules + the artifactId will be expanded , otherwise, no need to override it + --> + <projectId>${project.artifactId}</projectId> + + <!-- a property to define list id --> + <listId>${projectId}</listId> + <maven.src.dir>${basedir}/src</maven.src.dir> <maven.compile.source>1.6</maven.compile.source> <maven.compile.target>1.6</maven.compile.target> @@ -362,8 +373,8 @@ <repository.home.url>http://maven.nuiton.org/release</repository.home.url> - <helper.version>1.1.0-SNAPSHOT</helper.version> - <jredmine.version>1.0.0-rc-3-SNAPSHOT</jredmine.version> + <helper.version>1.1.0</helper.version> + <jredmine.version>1.0.0</jredmine.version> <processor.version>1.0.1</processor.version> <jrst.version>1.0.0</jrst.version> @@ -372,8 +383,9 @@ <javadoc.version>2.5</javadoc.version> <!-- redmine configuration --> - <redmine.url>http://www.nuiton.org</redmine.url> - <redmine.serverId>redmine-nuiton.org</redmine.serverId> + <redmine.safe>false</redmine.safe> + <redmine.url>http://www.${platform}</redmine.url> + <redmine.serverId>redmine-${platform}</redmine.serverId> <redmine.projectId>maven-license-plugin</redmine.projectId> <redmine.xmlPath>target/generated-sources/changes/changes.xml</redmine.xmlPath> <redmine.issueLinkTemplate>${redmine.url}/issues/show/%ISSUE%</redmine.issueLinkTemplate> @@ -974,22 +986,6 @@ <version>2.3</version> </plugin> - <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> - </configuration> - <reportSets> - <reportSet> - <reports> - <report>issues-report</report> - </reports> - </reportSet> - </reportSets> - </plugin> - </plugins> </reporting> @@ -1007,7 +1003,7 @@ <build> <plugins> - <!-- add license and third-party files to build --> + <!-- add license and third-party files to build --> <plugin> <groupId>org.nuiton</groupId> <artifactId>maven-license-plugin</artifactId> @@ -1023,37 +1019,6 @@ </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/${projectId}</urlDownload> - - <!--<changesTitle>Release note of Maven pom project</changesTitle>--> - <!--<releaseDescription>Description of first release</releaseDescription>--> - <!--<verbose>true</verbose>--> - </configuration> - </plugin> - <!-- always compute source jar --> <plugin> <artifactId>maven-source-plugin</artifactId> @@ -1080,12 +1045,82 @@ </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> + </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> <executions> - <!-- collect files to send to redmine --> <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> @@ -1097,11 +1132,42 @@ <!--<copyFiles>false</copyFiles>--> </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/${projectId}</urlDownload> + + <!--<changesTitle>Release note of Maven pom project</changesTitle>--> + <!--<releaseDescription>Description of first release</releaseDescription>--> + <!--<verbose>true</verbose>--> + </configuration> </plugin> </plugins> + </build> </profile> @@ -1123,8 +1189,62 @@ <plugins> - <!-- generate the changes.xml from redmine --> + + <!-- + - obtain redmine login + - send release email + --> <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <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.name} ${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@list.${platform}</item> + <item>${listId}-devel@list.${platform}</item> + <item>dev@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> @@ -1139,8 +1259,6 @@ </execution> </executions> <configuration> - <!-- Send nothing ! --> - <!--<dryRun>true</dryRun>--> <!-- for a multi-module just run on root project --> <runOnce>true</runOnce> @@ -1152,49 +1270,14 @@ <filesFromProperties>${redmine.collectedFiles}</filesFromProperties> <!-- publish-news --> - <newsContentFile>target/generated-sources/announcement/release-news-announcement.vm</newsContentFile> + <newsContentFile>target/generated-sources/announcement/release-news-announcement.vm + </newsContentFile> <newsSummary>${project.description}</newsSummary> <newsTitle>${project.name} ${project.version} released</newsTitle> </configuration> </plugin> - <!-- always add license and third-party files to classpath --> - <plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-helper-plugin</artifactId> - <executions> - <execution> - <id>send-release-email</id> - <goals> - <goal>send-email</goal> - </goals> - <phase>validate</phase> - </execution> - </executions> - <configuration> - <!-- Send nothing ! --> - <!--<dryRun>true</dryRun>--> - - <!-- for a multi-module just run on root project --> - <runOnce>true</runOnce> - - <emailTitle>[ANNOUNCEMENT] - ${project.name} ${project.version} released</emailTitle> - <emailContentFile>target/generated-sources/announcement/release-email-announcement.vm</emailContentFile> - <mailSender> - <name>nuiton.org Release Notification</name> - <email>noreply@nuiton.org</email> - </mailSender> - <toAddresses> - <!--<item>${listId}-users@list.nuiton.org</item>--> - <!--<item>lutin@codelutin.com</item>--> - <!--<item>dev@codelutin.com</item>--> - <item>chemit@codelutin.com</item> - </toAddresses> - <smtpHost>smtp</smtpHost> - </configuration> - </plugin> - </plugins> </build>