Author: tchemit Date: 2009-09-20 22:22:59 +0200 (Sun, 20 Sep 2009) New Revision: 648 Modified: trunk/pom.xml trunk/src/site/apt/index.apt trunk/src/site/en/apt/index.apt Log: [EVOLUTION #49] : mise en place jredmine dans mavenpom [EVOLUTION #55] : ajout de profiles pour acceler la generation des sites Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-09-02 13:37:07 UTC (rev 647) +++ trunk/pom.xml 2009-09-20 20:22:59 UTC (rev 648) @@ -223,14 +223,21 @@ <!-- to activate generation of reports and javadoc when doing a site --> <maven.reports.generate>true</maven.reports.generate> + <!-- to activate or not the generation of detail dependencies in site --> + <maven.reports.dependencyDetailsEnabled>true</maven.reports.dependencyDetailsEnabled> + + <!-- to activate or not the generation of location detail of dependencies in site --> + <maven.reports.dependencyLocationsEnabled>true</maven.reports.dependencyLocationsEnabled> + <!-- do not use 2.5 version, it is buggy (crazy aggregate mode !) --> <javadoc.version>2.4</javadoc.version> <!-- pour ne pas generer la javadoc (quand on aura un javadoc 2.5) --> <maven.javadoc.skip>false</maven.javadoc.skip> - <maven.version>2.0.10</maven.version> - <helper.version>1.0.2</helper.version> + <maven.version>2.1.0</maven.version> + <helper.version>1.0.3-SNAPSHOT</helper.version> + <jredmine.version>1.0.0-SNAPSHOT</jredmine.version> <jrst.version>1.0.0</jrst.version> <!-- default license to use --> @@ -239,9 +246,18 @@ <!-- release repository url (to be used in site.xml) --> <repository.home.url>http://maven.${platform}/release</repository.home.url> - <!-- generated changes.xml file --> - <maven.changeFile>${maven.gen.dir}/changes/changes.xml</maven.changeFile> + <!-- redmine configuration --> + <redmine.url>http://www.${platform}</redmine.url> + <redmine.serverId>redmine-${platform}</redmine.serverId> + <redmine.projectId>${projectId}</redmine.projectId> + <redmine.xmlPath>${maven.gen.dir}/changes/changes.xml</redmine.xmlPath> + <redmine.issueLinkTemplate>${redmine.url}/issues/show/%ISSUE%</redmine.issueLinkTemplate> + <redmine.versionLinkTemplate>${redmine.url}/issues/show/%VERSION%</redmine.versionLinkTemplate> + <redmine.collectedFiles>target/collect.properties</redmine.collectedFiles> + <!-- extra files to include in release --> + <redmine.releaseFiles/> + </properties> <packaging>pom</packaging> @@ -280,28 +296,6 @@ </executions> </plugin> - <!--plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-redmine-plugin</artifactId> - <executions> - <execution> - <id>create-reports</id> - <goals> - <goal>create-report</goal> - </goals> - <phase>pre-site</phase> - </execution> - </executions> - <configuration> - <xmlPath>${maven.changeFile}</xmlPath> - <trackerTypes> - <Anomalie>fix</Anomalie> - <Evolution>add</Evolution> - <Task>update</Task> - </trackerTypes> - </configuration> - </plugin--> - </plugins> <pluginManagement> @@ -500,16 +494,11 @@ <version>1.1.1</version> </plugin> - <!--plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-redmine-plugin</artifactId> - <version>1.0.0</version> - <configuration> - <projectIdentifier>${projectId}</projectIdentifier> - <serverId>redmine-${platform}</serverId> - <url>http://www.${platform}</url> - </configuration> - </plugin--> + <plugin> + <groupId>org.nuiton.jredmine</groupId> + <artifactId>maven-jredmine-plugin</artifactId> + <version>${jredmine.version}</version> + </plugin> </plugins> </pluginManagement> @@ -527,6 +516,10 @@ <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> </plugin> <plugin> @@ -557,10 +550,12 @@ <plugin> <artifactId>maven-changes-plugin</artifactId> <version>2.1</version> - <!--configuration> - <issueLinkTemplate>http://www.${platform}/issues/show/%ISSUE%</issueLinkTemplate> - <xmlPath>${maven.changeFile}</xmlPath> - </configuration--> + <configuration> + <issueLinkTemplatePerSystem> + <redmine>${redmine.issueLinkTemplate}</redmine> + </issueLinkTemplatePerSystem> + <xmlPath>${redmine.xmlPath}</xmlPath> + </configuration> <reportSets> <reportSet> <reports> @@ -600,6 +595,22 @@ <version>2.4.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> + <!-- a voir si on le garde car hudson le fait aussi ? --> <!--plugin> <groupId>org.codehaus.mojo</groupId> @@ -626,7 +637,7 @@ <issueManagement> <system>redmine</system> - <url>http://www.${platform}/projects/${projectId}/issues</url> + <url>${redmine.url}/projects/${projectId}/issues</url> </issueManagement> <ciManagement> @@ -721,6 +732,27 @@ </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> + <!-- perform only on a release stage when using the maven-release-plugin --> <profile> <id>release-profile</id> @@ -734,6 +766,39 @@ <plugins> + <!-- 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> + <!-- common --> + <!--<xmlPath>${maven.changeFile}</xmlPath>--> + + <!-- 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> @@ -766,58 +831,112 @@ <goal>add-third-party</goal> </goals> </execution> + + <execution> + <id>collect-files</id> + <goals> + <goal>collect-files</goal> + </goals> + <phase>package</phase> + <configuration> + <extraFiles>${redmine.releaseFiles}</extraFiles> + <descriptionFile>${redmine.collectedFiles}</descriptionFile> + <!--<copyFiles>false</copyFiles>--> + </configuration> + </execution> + </executions> </plugin> + + </plugins> - <!--<plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-redmine-plugin</artifactId> + </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> + <build> + + <plugins> + + <!-- generate the changes.xml from redmine --> + <plugin> + <groupId>org.nuiton.jredmine</groupId> + <artifactId>maven-jredmine-plugin</artifactId> <executions> <execution> - <id>publish-news</id> + <id>jredmine-release</id> <goals> + <goal>update-version</goal> + <goal>publish-attachments</goal> <goal>publish-news</goal> </goals> - phase>install</phase </execution> + <phase>validate</phase> + </execution> </executions> <configuration> - <newsTitle>${project.version} released</newsTitle> - </configuration> - </plugin>--> + <!-- Send nothing ! --> + <dryRun>true</dryRun> - <!--<plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-release-plugin</artifactId> - <configuration> - <goals>deploy redmine:create-report changes:announcement-mail redmine:publish-news</goals> + <!-- 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/announcement/release-news-announcement.vm</newsContentFile> + <newsSummary>${project.description}</newsSummary> + <newsTitle>${project.name} ${project.version} released</newsTitle> + </configuration> - </plugin>--> + </plugin> - <!-- a utiliser lorsqu'on aura fait un transformer - de changelog.txt en target/changes.xml + <!-- always add license and third-party files to classpath --> <plugin> - <artifactId>maven-changes-plugin</artifactId> - <version>2.1</version> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> <executions> <execution> - <id>send-announcement-email</id> - <phase>install</phase> + <id>send-release-email</id> <goals> - <goal>announcement-mail</goal> + <goal>send-email</goal> </goals> - <configuration> - <mailSender> - <name>Nuiton Release Notification</name> - <email>noreply@${platform}</email> - </mailSender> - <toAddresses> - <item>${listId}-devel@list.${platform}</item> - </toAddresses> - <smtpHost>smtp</smtpHost> - </configuration> + <phase>validate</phase> </execution> </executions> - </plugin--> + <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/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>lutin@codelutin.com</item> + <item>dev@codelutin.com</item> + </toAddresses> + <smtpHost>smtp</smtpHost> + </configuration> + </plugin> + </plugins> </build> Modified: trunk/src/site/apt/index.apt =================================================================== --- trunk/src/site/apt/index.apt 2009-09-02 13:37:07 UTC (rev 647) +++ trunk/src/site/apt/index.apt 2009-09-20 20:22:59 UTC (rev 648) @@ -89,6 +89,15 @@ Pour ne pas lancer la génération des rapport lors de la création du site (par défaut <<false>>) +* maven.reports.dependencyDetailsEnabled + + Pour générer ou non le détail des dépendances dans le rapport des dépendances + +* maven.reports.dependencyLocationsEnabled + + Pour générer ou pas la location des dépendances sur les dépôts maven dans le + rapport des dépendances. + * maven.version La version de l'api de maven utilisée (principalement dans les plugins maven) @@ -177,6 +186,38 @@ mvn -Prun -Dmaven.jar.main.class=org.nuiton.MyMainClass -------------------------------------------------------------------------------- + +* profile <<nodepdetails>> + + Ce profile permet de désactiver la génération du détail des dépendances + lors du rapport des dépendances (accélère beaucoup les temps de génération du + site en phase de développement). + +-------------------------------------------------------------------------------- +mvn site -Pnodepdetails +-------------------------------------------------------------------------------- + +* profile <<nodeplocations>> + + Ce profile permet de désactiver la génération de la localisation des dépendances + lors du rapport des dépendances (accélère beaucoup les temps de génération du + site en phase de développement). + +-------------------------------------------------------------------------------- +mvn site -Pnodeplocations +-------------------------------------------------------------------------------- + +* profile <<redmine-release-profile>> + + Ce profile permet suite à une release de publier la release sur redmine et est + activable via la propriété <<performRedmineRelease>>. + + Il faut l'utiliser sur le projet releasé (et pas le projet en SNAPSHOT). + +-------------------------------------------------------------------------------- +cd target/checkout; mvn validate -DperformRedmineRelease +-------------------------------------------------------------------------------- + * profile <<internal>> Ce profile permet de corriger l'url de deployement du site de <mavenpom> Modified: trunk/src/site/en/apt/index.apt =================================================================== --- trunk/src/site/en/apt/index.apt 2009-09-02 13:37:07 UTC (rev 647) +++ trunk/src/site/en/apt/index.apt 2009-09-20 20:22:59 UTC (rev 648) @@ -86,6 +86,15 @@ To skip site reports generation (by default <<false>>) + +* maven.reports.dependencyDetailsEnabled + + To generate or not the detail of dependencies in depedencies report + +* maven.reports.dependencyLocationsEnabled + + To generate or not the location of dependencies in depedencies report + * maven.version The maven api version to use (in plugin mostly) @@ -174,6 +183,36 @@ mvn -Prun -Dmaven.jar.main.class=org.nuiton.MyMainClass -------------------------------------------------------------------------------- +* profile <<nodepdetails>> + + This profile permits to not generate the detail of dependencies in dependency + report (speed up a lot site generation time in developement status). + +-------------------------------------------------------------------------------- +mvn site -Pnodepdetails +-------------------------------------------------------------------------------- + +* profile <<nodeplocations>> + + This profile permits to not generate the location of dependencies in dependency + report (speed up a lot site generation time in developement status). + +-------------------------------------------------------------------------------- +mvn site -Pnodeplocations +-------------------------------------------------------------------------------- + + +* profile <<redmine-release-profile>> + + This profile permits to publish a fresh release to redmine server, is activable + via the property <<performRedmineRelease>>. + + It must be used on a released project (so not on a SNAPSHOT project). + +-------------------------------------------------------------------------------- +cd target/checkout; mvn validate -DperformRedmineRelease +-------------------------------------------------------------------------------- + * profile <<internal>> This profile permits to fix the site url of the <mavenpom> project.