Author: tchemit Date: 2008-12-04 21:04:18 +0000 (Thu, 04 Dec 2008) New Revision: 226 Added: lutinpluginproject/trunk/src/ lutinpluginproject/trunk/src/site/ lutinpluginproject/trunk/src/site/fr/ lutinpluginproject/trunk/src/site/fr/rst/ lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst lutinpluginproject/trunk/src/site/fr/rst/Todo.rst lutinpluginproject/trunk/src/site/fr/rst/images/ lutinpluginproject/trunk/src/site/fr/rst/images/jrst-logo.png lutinpluginproject/trunk/src/site/fr/rst/index.rst lutinpluginproject/trunk/src/site/site.xml lutinproject/trunk/src/ lutinproject/trunk/src/site/ lutinproject/trunk/src/site/fr/ lutinproject/trunk/src/site/fr/rst/ lutinproject/trunk/src/site/fr/rst/MavenProjectBestPractices.rst lutinproject/trunk/src/site/fr/rst/Todo.rst lutinproject/trunk/src/site/fr/rst/images/ lutinproject/trunk/src/site/fr/rst/images/jrst-logo.png lutinproject/trunk/src/site/fr/rst/index.rst lutinproject/trunk/src/site/site.xml Modified: lutinpluginproject/trunk/changelog lutinpluginproject/trunk/pom.xml lutinproject/trunk/changelog lutinproject/trunk/pom.xml Log: passage en 3.2-SNAPSHOT avant release : - am?\195?\169lioration des propri?\195?\169t?\195?\169s scm - suppression des groupId sur les plugins maven - suppression du profile project (car supprim?\195?\169e si un autre profile est active dans le pom) - ce projet est d?\195?\169sormais releasable - mise en place du site Attention : utilisation de la propri?\195?\169t?\195?\169 labs.project sur le projet, donc il faut obligatoirementla redefinir pour tous les projects et plugins. Modified: lutinpluginproject/trunk/changelog =================================================================== --- lutinpluginproject/trunk/changelog 2008-12-04 20:44:51 UTC (rev 225) +++ lutinpluginproject/trunk/changelog 2008-12-04 21:04:18 UTC (rev 226) @@ -1,3 +1,14 @@ +3.2 chemit (200812??) + * 20081204 [chemit] - amélioration des propriétés scm + - suppression des groupId sur les plugins maven + - suppression du profile project (car supprimée si un autre + profile est active dans le pom) + - ce projet est désormais releasable + - mise en place du site + - Attention : utilisation de la propriété labs.project sur + le projet, donc il faut obligatoirementla redefinir pour + tous les plugins + 3.1 chatellier (20081118) * bump maven-license-switcher-plugin to 0.5 * javadoc done on verify phase Modified: lutinpluginproject/trunk/pom.xml =================================================================== --- lutinpluginproject/trunk/pom.xml 2008-12-04 20:44:51 UTC (rev 225) +++ lutinpluginproject/trunk/pom.xml 2008-12-04 21:04:18 UTC (rev 226) @@ -11,7 +11,7 @@ <!-- POM Relationships : Coordinates --> <groupId>org.codelutin</groupId> <artifactId>lutinpluginproject</artifactId> - <version>3.1</version> + <version>3.2-SNAPSHOT</version> <!-- POM Relationships : Inheritance --> @@ -79,9 +79,9 @@ <!-- *** Project Information ************************************* --> <!-- ************************************************************* --> - <name>Codelutin plugin project superpom</name> + <name>Codelutin plugin superpom</name> - <description>Projet Maven de reference pour les plugins des autres projets Maven.</description> + <description>Projet Maven de reference pour les plugins Maven.</description> <!-- BE WARE, will be suffixed by /${project.artifactId} by inheritance --> <url>${site.home.url}</url> @@ -175,7 +175,7 @@ </roles> </developer> - <developer> + <developer> <name>Stéphane Chorlet</name> <id>schorlet</id> <email>chorlet@codelutin.com</email> @@ -197,28 +197,13 @@ <!-- ************************************************************* --> <properties> - <!-- Set this value in your pom --> + + <!-- the labs' project id : change this in your pom --> <labs.id>11</labs.id> - <!-- change this in your pom if your pom is a module of a labs' project --> - <labs.project>${project.artifactId}</labs.project> + <!-- this labs' project name : change this in your pom --> + <labs.project>lutinbuilder</labs.project> - <!-- labs project's url --> - <site.home.url>http://${labs.project}.${labs.host}</site.home.url> - - <!-- override this property to define scm url property --> - <maven.scm.url>http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.artifactId}/trunk/?root=${labs.project} - </maven.scm.url> - - <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance --> - <maven.scm.developerConnection> - scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk - </maven.scm.developerConnection> - - <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance --> - <maven.scm.connection>scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk - </maven.scm.connection> - <!-- labs host --> <labs.host>labs.libre-entreprise.org</labs.host> @@ -228,6 +213,9 @@ <!-- labs builder host --> <labs.builder.url>http://lutinbuilder.labs.libre-entreprise.org/maven2</labs.builder.url> + <!-- labs project's url --> + <site.home.url>http://${labs.project}.${labs.host}</site.home.url> + <!-- by default, java sources are in java 1.6 --> <maven.compile.source>1.6</maven.compile.source> @@ -252,11 +240,17 @@ <!-- to allow bad tests --> <maven.test.testFailureIgnore>false</maven.test.testFailureIgnore> + <!-- to skip tests (can use also profile notests) --> + <maven.test.skip>false</maven.test.skip> + + <!-- to activate generation of reports and javadoc when doing a site --> + <maven.reports.generate>true</maven.reports.generate> + <!-- version of license-switcher plugin to use --> <license-switcher.version>0.5</license-switcher.version> <!-- version of i18n plugin to use --> - <i18n.version>0.6</i18n.version> + <i18n.version>0.7</i18n.version> <!-- version of jrst plugin to use --> <jrst.version>0.8.3</jrst.version> @@ -264,12 +258,51 @@ <!-- default license to use --> <license-switcher.licenseName>lgpl_v3</license-switcher.licenseName> + <!-- single pom or multi-module pom scm properties --> + <maven.scm.url> + http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.artifactId}/trunk/?root=${labs.project} + </maven.scm.url> + + <maven.scm.developerConnection> + scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk + </maven.scm.developerConnection> + + <maven.scm.connection> + scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk + </maven.scm.connection> + + <!-- multi-module level one son pom scm properties --> + <maven.scm.url.child> + http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.parent.artifactId}/trunk/${project.artifactId}?root=${labs.project} + </maven.scm.url.child> + + <maven.scm.developerConnection.child> + scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.parent.artifactId}/trunk/${project.artifactId} + </maven.scm.developerConnection.child> + + <maven.scm.connection.child> + scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.parent.artifactId}/trunk/${project.artifactId} + </maven.scm.connection.child> + + <!-- multi-module level two son pom scm properties --> + <maven.scm.url.child.child> + http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.parent.parent.artifactId}/trunk/${project.parent.artifactId}/${project.artifactId}?root=${labs.project} + </maven.scm.url.child.child> + + <maven.scm.developerConnection.child.child> + scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.parent.parent.artifactId}/trunk/${project.parent.artifactId}/${project.artifactId} + </maven.scm.developerConnection.child.child> + + <maven.scm.connection.child.child> + scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.parent.parent.artifactId}/trunk/${project.parent.artifactId}/${project.artifactId} + </maven.scm.connection.child.child> + </properties> <packaging>pom</packaging> <build> - + <defaultGoal>install</defaultGoal> <!--Ressources--> <resources> @@ -283,6 +316,7 @@ </excludes> </resource> + <!-- TODO Remove this : no need in plugin --> <resource> <directory>${maven.src.dir}/main/uimodel</directory> <includes> @@ -292,6 +326,7 @@ </includes> </resource> + <!-- TODO Remove this : no need in plugin --> <resource> <directory>${maven.src.dir}/main/xsl</directory> <includes> @@ -312,13 +347,30 @@ <!-- PHASE GENERATE-RESOURCES --> <!-- - - - - - - - - - - - - --> + <!-- plugin i18n --> + <plugin> + <groupId>org.codelutin</groupId> + <artifactId>maven-i18n-plugin</artifactId> + <version>${i18n.version}</version> + <configuration> + <bundles> + <param>fr_FR</param> + <param>en_GB</param> + </bundles> + <encoding>${maven.compile.encoding}</encoding> + <src>${maven.src.dir}/main/resources/i18n</src> + <defaultBasedir>${maven.src.dir}/main/java</defaultBasedir> + <keysModifier>false</keysModifier> + <keepBackup>false</keepBackup> + </configuration> + </plugin> + <!-- - - - - - - - - --> <!-- PHASE RESOURCES --> <!-- - - - - - - - - --> <!-- plugin resources --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>${maven.compile.encoding}</encoding> @@ -331,7 +383,6 @@ <!-- plugin compiler --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${maven.compile.source}</source> @@ -368,7 +419,6 @@ <!-- plugin surefire --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>${maven.test.skip}</skip> @@ -394,7 +444,6 @@ <!-- plugin source --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> @@ -408,7 +457,6 @@ <!-- plugin javadoc --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <docencoding>${maven.compile.encoding}</docencoding> @@ -457,7 +505,6 @@ <!-- plugin site --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>2.0-beta-7</version> <configuration> @@ -472,9 +519,8 @@ <!-- plugin plugin --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> - <version>2.4.2</version> + <version>2.4.3</version> <executions> <execution> <goals> @@ -490,13 +536,11 @@ <plugins> <!-- always compute javadoc jar --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> <!-- always compute source jar --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> </plugin> @@ -508,7 +552,6 @@ <!-- always launch plugin plugin on plugin ! --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> </plugin> @@ -568,14 +611,12 @@ Note : la version 2.1 officielle bug sur le caractere ' --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <!--version>2.1</version--> <version>2.1-cl</version> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> @@ -583,7 +624,6 @@ changelog:dev-activity changelog:file-activity --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> </plugin> @@ -601,12 +641,10 @@ </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> <linkXRef>true</linkXRef> @@ -618,12 +656,10 @@ </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> </plugin> @@ -637,7 +673,6 @@ <!--Site report's plugin--> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> </plugin> @@ -690,8 +725,7 @@ </mailingList--> </mailingLists> - <!-- - Source control management. + <!-- Source control management. By inheritance, url are always false, need manual include. Add this to your pom : @@ -701,7 +735,12 @@ <url>${maven.scm.url}</url> </scm> --> - + <scm> + <connection>${maven.scm.connection}</connection> + <developerConnection>${maven.scm.developerConnection}</developerConnection> + <url>${maven.scm.url}</url> + </scm> + <!-- ************************************************************* --> <!-- *** Maven Environment *************************************** --> <!-- ************************************************************* --> @@ -713,7 +752,7 @@ <!-- Maven Environment : Repositories --> - <!--Code Lutin Repository--> + <!--Code Lutin Repository--> <repositories> <repository> <id>codelutin-repository</id> @@ -721,19 +760,27 @@ <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> + <updatePolicy>always</updatePolicy> </snapshots> + <releases> + <enabled>true</enabled> + </releases> </repository> </repositories> <!-- Code Lutin : plugin repositories --> <pluginRepositories> <pluginRepository> - <id>codelutin-plugin</id> + <id>codelutin-plugin-repository</id> <name>CodeLutinPluginRepository</name> <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> + <updatePolicy>always</updatePolicy> </snapshots> + <releases> + <enabled>true</enabled> + </releases> </pluginRepository> </pluginRepositories> @@ -757,23 +804,12 @@ <!-- Maven Environment : profiles --> <profiles> <profile> - <id>project</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <properties> - <maven.test.skip>false</maven.test.skip> - <maven.reports.generate>true</maven.reports.generate> - </properties> - </profile> - <profile> <id>notests</id> <activation> <activeByDefault>false</activeByDefault> </activation> <properties> <maven.test.skip>true</maven.test.skip> - <maven.reports.generate>false</maven.reports.generate> </properties> </profile> <profile> @@ -801,6 +837,22 @@ </plugins> </build> </profile> + <profile> + <!-- profile to fix site url only for the pom --> + <!-- big hack : test the existance of a rst file to know if we are reaaly in the plugin ? --> + <activation> + <file> + <exists>src/site/fr/rst/MavenPluginBestPractices.rst</exists> + </file> + <activeByDefault>false</activeByDefault> + </activation> + <distributionManagement> + <site> + <id>labs</id> + <url>scpexe://${labs.host}/home/groups/${labs.project}/htdocs/${project.artifactId}</url> + </site> + </distributionManagement> + </profile> </profiles> </project> Added: lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst =================================================================== --- lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst (rev 0) +++ lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,25 @@ +============================ +Maven 2 plugin best pratices +============================ + + +.. contents:: + + +Présentation +------------ + +Ce document énumère les bonnes pratiques à retenir sur l'utilisation de maven 2 pour créer des plugins. + +Préconisations générales +------------------------ + +Création d'un nouveau pugin +--------------------------- + +A faire + +Les plugins utilisés +-------------------- + +A faire Added: lutinpluginproject/trunk/src/site/fr/rst/Todo.rst =================================================================== --- lutinpluginproject/trunk/src/site/fr/rst/Todo.rst (rev 0) +++ lutinpluginproject/trunk/src/site/fr/rst/Todo.rst 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,10 @@ +==== +TODO +==== + + +Création d'archetypes +--------------------- + +Il nous faudrait un archetype pour la construction d'un nouveau plugin. + Added: lutinpluginproject/trunk/src/site/fr/rst/images/jrst-logo.png =================================================================== (Binary files differ) Property changes on: lutinpluginproject/trunk/src/site/fr/rst/images/jrst-logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: lutinpluginproject/trunk/src/site/fr/rst/index.rst =================================================================== --- lutinpluginproject/trunk/src/site/fr/rst/index.rst (rev 0) +++ lutinpluginproject/trunk/src/site/fr/rst/index.rst 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,96 @@ +lutinpluginproject +================== + +.. contents:: + + +Présentation +------------ + +Super pom de tous nos plugins (sauf ceux dans du multi-module). + +Les propriétés définies +----------------------- + + - *labs.id* + + - *labs.project* + + - *labs.host* + + - *labs.list.host* + + - *labs.builder.url* + + - *site.home.url* + + - *maven.compile.source* + + - *maven.compile.target* + + - *maven.compile.encoding* + + - *maven.src.dir* + + - *maven.gen.dir* + + - *maven.site.gen.dir* + + - *maven.site.locales* + + - *maven.test.testFailureIgnore* + + - *maven.test.skip* + + - *maven.reports.generate* + + - *license-switcher.version* + + - *i18n.version* + + - *jrst.version* + + - *license-switcher.licenseName* + + - *maven.scm.url* + + - *maven.scm.developerConnection* + + - *maven.scm.connection* + + - *maven.scm.url.child* + + - *maven.scm.developerConnection.child* + + - *maven.scm.connection.child* + + - *maven.scm.url.child.child* + + - *maven.scm.developerConnection.child.child* + + - *maven.scm.connection.child.child* + + +.. WARNING:: + Expliquer à quoi servent ces propriétés. + + +Les plugins configurés +---------------------- + +.. WARNING:: + A faire + + +Montée en version d'un plugin +----------------------------- + +.. WARNING:: + A faire + + +La gestion scm +-------------- + +.. WARNING:: + A faire Added: lutinpluginproject/trunk/src/site/site.xml =================================================================== --- lutinpluginproject/trunk/src/site/site.xml (rev 0) +++ lutinpluginproject/trunk/src/site/site.xml 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="${project.name}"> + + <publishDate format="dd/MM/yyyy"/> + + <skin> + <groupId>org.codelutin</groupId> + <artifactId>maven-lutin-skin</artifactId> + <version>0.2.1</version> + </skin> + + <bannerLeft> + <name>${project.name}</name> + <src>${site.home.url}</src> + <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"/> + <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/> + <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="images/restructuredtext-logo.png"/> + </poweredBy> + + <body> + <links> + <item name="Labs" href="http://labs.libre-entreprise.org/"/> + <item name="${project.organization.name}" href="${project.organization.url}"/> + <item name="lutin project" href="../lutinproject"/> + <item name="lutin maven repository" href="../maven2"/> + </links> + + <menu name="Utilisateur"> + <item name="Accueil" href="index.html"/> + </menu> + + <menu name="Téléchargement"> + <item href="../maven2/org/codelutin/${project.artifactId}/${project.version}" + name="Télécharger la dernière version"/> + <item href="../maven2/org/codelutin/${project.artifactId}" + name="Voir toutes les versions"/> + </menu> + + <menu name="Développeur"> + <item name="best practices" href="MavenPluginBestPractices.html"/> + <item name="A faire" href="Todo.html"/> + </menu> + + <menu ref="reports"/> + + <menu ref="modules"/> + + </body> +</project> Modified: lutinproject/trunk/changelog =================================================================== --- lutinproject/trunk/changelog 2008-12-04 20:44:51 UTC (rev 225) +++ lutinproject/trunk/changelog 2008-12-04 21:04:18 UTC (rev 226) @@ -1,4 +1,15 @@ -ver-3-1 chemit (200811??) +3.2 chemit (200812??) + * 20081204 [chemit] - amélioration des propriétés scm + - suppression des groupId sur les plugins maven + - suppression du profile project (car supprimée si un autre + profile est active dans le pom) + - ce projet est désormais releasable + - mise en place du site + - Attention : utilisation de la propriété labs.project sur + le projet, donc il faut obligatoirementla redefinir pour + tous les projets + +3.1 chatellier (20081118) * bump maven-license-switcher-plugin to 0.5 * Update plugin version * Add schorlet as developper Modified: lutinproject/trunk/pom.xml =================================================================== --- lutinproject/trunk/pom.xml 2008-12-04 20:44:51 UTC (rev 225) +++ lutinproject/trunk/pom.xml 2008-12-04 21:04:18 UTC (rev 226) @@ -11,7 +11,7 @@ <!-- POM Relationships : Coordinates --> <groupId>org.codelutin</groupId> <artifactId>lutinproject</artifactId> - <version>3.1</version> + <version>3.2-SNAPSHOT</version> <!-- POM Relationships : Inheritance --> @@ -59,7 +59,7 @@ <name>Codelutin project superpom</name> - <description>Projet Maven de référence pour l'ensemble des autres projets Maven.</description> + <description>Projet Maven de référence pour l'ensemble des projets Maven.</description> <!-- BE WARE, will be suffixed by /${project.artifactId} by inheritance --> <url>${site.home.url}</url> @@ -153,7 +153,7 @@ </roles> </developer> - <developer> + <developer> <name>Stéphane Chorlet</name> <id>schorlet</id> <email>chorlet@codelutin.com</email> @@ -175,28 +175,13 @@ <!-- ************************************************************* --> <properties> - <!-- Set this value in your pom --> - <labs.id>11</labs.id> - <!-- change this in your pom if your pom is a module of a labs' project --> - <labs.project>${project.artifactId}</labs.project> + <!-- the labs' project id : change this in your pom --> + <labsIdd>11</labsIdd> - <!-- labs project's url --> - <site.home.url>http://${labs.project}.${labs.host}</site.home.url> + <!-- this labs' project name : change this in your pom --> + <labs.project>lutinbuilder</labs.project> - <!-- override this property to define scm url property --> - <maven.scm.url>http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.artifactId}/trunk/?root=${labs.project} - </maven.scm.url> - - <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance --> - <maven.scm.developerConnection> - scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk - </maven.scm.developerConnection> - - <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance --> - <maven.scm.connection>scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk - </maven.scm.connection> - <!-- labs host --> <labs.host>labs.libre-entreprise.org</labs.host> @@ -206,6 +191,9 @@ <!-- labs builder host --> <labs.builder.url>http://lutinbuilder.labs.libre-entreprise.org/maven2</labs.builder.url> + <!-- labs project's url --> + <site.home.url>http://${labs.project}.${labs.host}</site.home.url> + <!-- by default, java sources are in java 1.6 --> <maven.compile.source>1.6</maven.compile.source> @@ -230,6 +218,12 @@ <!-- to allow bad tests --> <maven.test.testFailureIgnore>false</maven.test.testFailureIgnore> + <!-- to skip tests (can use also profile notests) --> + <maven.test.skip>false</maven.test.skip> + + <!-- to activate generation of reports and javadoc when doing a site --> + <maven.reports.generate>true</maven.reports.generate> + <!-- version of license-switcher to use --> <license-switcher.version>0.5</license-switcher.version> @@ -242,12 +236,51 @@ <!-- default license to use --> <license-switcher.licenseName>lgpl_v3</license-switcher.licenseName> + <!-- single pom or multi-module pom scm properties --> + <maven.scm.url> + http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.artifactId}/trunk/?root=${labs.project} + </maven.scm.url> + + <maven.scm.developerConnection> + scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk + </maven.scm.developerConnection> + + <maven.scm.connection> + scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.artifactId}/trunk + </maven.scm.connection> + + <!-- multi-module level one son pom scm properties --> + <maven.scm.url.child> + http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.parent.artifactId}/trunk/${project.artifactId}?root=${labs.project} + </maven.scm.url.child> + + <maven.scm.developerConnection.child> + scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.parent.artifactId}/trunk/${project.artifactId} + </maven.scm.developerConnection.child> + + <maven.scm.connection.child> + scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.parent.artifactId}/trunk/${project.artifactId} + </maven.scm.connection.child> + + <!-- multi-module level two son pom scm properties --> + <maven.scm.url.child.child> + http://${labs.host}/plugins/scmsvn/viewcvs.php/${project.parent.parent.artifactId}/trunk/${project.parent.artifactId}/${project.artifactId}?root=${labs.project} + </maven.scm.url.child.child> + + <maven.scm.developerConnection.child.child> + scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${project.parent.parent.artifactId}/trunk/${project.parent.artifactId}/${project.artifactId} + </maven.scm.developerConnection.child.child> + + <maven.scm.connection.child.child> + scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${project.parent.parent.artifactId}/trunk/${project.parent.artifactId}/${project.artifactId} + </maven.scm.connection.child.child> + </properties> <packaging>pom</packaging> <build> - + <defaultGoal>install</defaultGoal> <!--Ressources--> <resources> <resource> @@ -287,9 +320,9 @@ <!-- plugin jaxx --> <!--plugin> - <groupId>org.codelutin.jaxx</groupId> + <groupId>org.codelutin</groupId> <artifactId>maven-jaxx-plugin</artifactId> - <version>0.4</version> + <version>${jaxx.version}</version> <executions> <execution> <id>generate jaxx</id> @@ -328,7 +361,6 @@ <!-- plugin resources --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>${maven.compile.encoding}</encoding> @@ -341,7 +373,6 @@ <!-- plugin compiler --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${maven.compile.source}</source> @@ -378,7 +409,6 @@ <!-- plugin surefire --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>${maven.test.skip}</skip> @@ -400,7 +430,6 @@ <!-- plugin dependency --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <configuration> <overWriteReleases>false</overWriteReleases> @@ -420,7 +449,6 @@ <!-- plugin war --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1-alpha-2</version> <configuration> @@ -430,7 +458,6 @@ <!-- plugin jar --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <inherited>true</inherited> <configuration> @@ -452,7 +479,6 @@ <!-- plugin source --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> @@ -466,7 +492,6 @@ <!-- plugin javadoc --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <docencoding>${maven.compile.encoding}</docencoding> @@ -514,7 +539,6 @@ <!-- plugin site --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>2.0-beta-7</version> <configuration> @@ -533,7 +557,6 @@ <!-- always compute source jar --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> </plugin> @@ -598,14 +621,12 @@ Note : la version 2.1 officielle bug sur le caractere ' --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <!--version>2.1</version--> <version>2.1-cl</version> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> @@ -613,13 +634,11 @@ changelog:dev-activity changelog:file-activity --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> </plugin> <!-- Implicit add of reportSet to not generate jira reports --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> <reportSets> <reportSet> @@ -631,12 +650,10 @@ </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> <linkXRef>true</linkXRef> @@ -648,12 +665,10 @@ </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> </plugin> @@ -675,7 +690,7 @@ <issueManagement> <system>gforge</system> - <url>http://${labs.host}/tracker/?group_id=${labs.id}</url> + <url>http://${labs.host}/tracker/?group_id=${labsId}</url> </issueManagement> <!-- add ciManagement @@ -724,6 +739,11 @@ <url>${maven.scm.url}</url> </scm> --> + <scm> + <connection>${maven.scm.connection}</connection> + <developerConnection>${maven.scm.developerConnection}</developerConnection> + <url>${maven.scm.url}</url> + </scm> <!-- ************************************************************* --> <!-- *** Maven Environment *************************************** --> @@ -744,23 +764,32 @@ <name>CodeLutinRepository</name> <url>${labs.builder.url}</url> <snapshots> - <enabled>true</enabled> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> </snapshots> + <releases> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </releases> </repository> </repositories> <!-- Code Lutin : plugin repositories --> <pluginRepositories> <pluginRepository> - <id>codelutin-plugin</id> + <id>codelutin-plugin-repository</id> <name>CodeLutinPluginRepository</name> <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> + <updatePolicy>always</updatePolicy> </snapshots> + <releases> + <enabled>true</enabled> + </releases> </pluginRepository> </pluginRepositories> - + <!--Distribution--> <distributionManagement> <repository> @@ -779,25 +808,14 @@ </distributionManagement> <!-- Maven Environment : profiles --> - <profiles> + <profiles> <profile> - <id>project</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <properties> - <maven.test.skip>false</maven.test.skip> - <maven.reports.generate>true</maven.reports.generate> - </properties> - </profile> - <profile> <id>notests</id> <activation> <activeByDefault>false</activeByDefault> </activation> <properties> <maven.test.skip>true</maven.test.skip> - <maven.reports.generate>false</maven.reports.generate> </properties> </profile> <profile> @@ -825,6 +843,22 @@ </plugins> </build> </profile> + <profile> + <!-- profile to fix site url only for the pom --> + <!-- big hack : test the existance of a rst file to know if we are reaaly in the plugin ? --> + <activation> + <file> + <exists>src/site/fr/rst/MavenProjectBestPractices.rst</exists> + </file> + <activeByDefault>false</activeByDefault> + </activation> + <distributionManagement> + <site> + <id>labs</id> + <url>scpexe://${labs.host}/home/groups/${labs.project}/htdocs/${project.artifactId}</url> + </site> + </distributionManagement> + </profile> </profiles> </project> Added: lutinproject/trunk/src/site/fr/rst/MavenProjectBestPractices.rst =================================================================== --- lutinproject/trunk/src/site/fr/rst/MavenProjectBestPractices.rst (rev 0) +++ lutinproject/trunk/src/site/fr/rst/MavenProjectBestPractices.rst 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,50 @@ +===================== +Maven 2 best pratices +===================== + + +.. contents:: + + +Présentation +------------ + +Ce document énumère les bonnes pratiques à retenir sur l'utilisation de maven 2. + +Préconisations générales +------------------------ + +Inspiration du document http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html . + +.. image:: http://www.javaworld.com/javaworld/jw-05-2006/images/jw-0529-maven1.gif + +- toujours respecter la même organisation dans nos pom + +- les principales sections d'un pom : + + - POM Relationships + + - Project Information + + - Build Settings + + - Build Environment + + - Maven Environment + +A faire + +Création d'un nouveau projet lutin +---------------------------------- + +A faire + +Création d'un nouveau projet lutin multi-modules +------------------------------------------------ + +A faire + +Les plugins utilisés +-------------------- + +A faire Added: lutinproject/trunk/src/site/fr/rst/Todo.rst =================================================================== --- lutinproject/trunk/src/site/fr/rst/Todo.rst (rev 0) +++ lutinproject/trunk/src/site/fr/rst/Todo.rst 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,15 @@ +==== +TODO +==== + + +Création d'archetypes +--------------------- + +Il nous faudrait 2 archetypes pour la construction d'un nouveau projet : + + - un pour un projet no multi-modules + + - un pour les projets multi-modules + + \ No newline at end of file Added: lutinproject/trunk/src/site/fr/rst/images/jrst-logo.png =================================================================== (Binary files differ) Property changes on: lutinproject/trunk/src/site/fr/rst/images/jrst-logo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: lutinproject/trunk/src/site/fr/rst/index.rst =================================================================== --- lutinproject/trunk/src/site/fr/rst/index.rst (rev 0) +++ lutinproject/trunk/src/site/fr/rst/index.rst 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,97 @@ +lutinproject +============ + +.. contents:: + + +Présentation +------------ + +Super pom de tous nos projets. + +Les propriétés définies +----------------------- + + - *labs.id* + + - *labs.project* + + - *labs.host* + + - *labs.list.host* + + - *labs.builder.url* + + - *site.home.url* + + - *maven.compile.source* + + - *maven.compile.target* + + - *maven.compile.encoding* + + - *maven.src.dir* + + - *maven.gen.dir* + + - *maven.site.gen.dir* + + - *maven.site.locales* + + - *maven.test.testFailureIgnore* + + - *maven.test.skip* + + - *maven.reports.generate* + + - *license-switcher.version* + + - *i18n.version* + + - *jrst.version* + + - *license-switcher.licenseName* + + - *maven.scm.url* + + - *maven.scm.developerConnection* + + - *maven.scm.connection* + + - *maven.scm.url.child* + + - *maven.scm.developerConnection.child* + + - *maven.scm.connection.child* + + - *maven.scm.url.child.child* + + - *maven.scm.developerConnection.child.child* + + - *maven.scm.connection.child.child* + + +.. WARNING:: + Expliquer à quoi servent ces propriétés. + + +Les plugins configurés +---------------------- + +.. WARNING:: + A faire + + +Montée en version d'un plugin +----------------------------- + +.. WARNING:: + A faire + + +La gestion scm +-------------- + +.. WARNING:: + A faire + Added: lutinproject/trunk/src/site/site.xml =================================================================== --- lutinproject/trunk/src/site/site.xml (rev 0) +++ lutinproject/trunk/src/site/site.xml 2008-12-04 21:04:18 UTC (rev 226) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="${project.name}"> + + <publishDate format="dd/MM/yyyy"/> + + <skin> + <groupId>org.codelutin</groupId> + <artifactId>maven-lutin-skin</artifactId> + <version>0.2.1</version> + </skin> + + <bannerLeft> + <name>${project.name}</name> + <src>${site.home.url}</src> + <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"/> + <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/> + <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="images/restructuredtext-logo.png"/> + </poweredBy> + + <body> + <links> + <item name="Labs" href="http://labs.libre-entreprise.org/"/> + <item name="${project.organization.name}" href="${project.organization.url}"/> + <item name="lutin plugin project" href="../lutinpluginproject"/> + <item name="lutin maven repository" href="../maven2"/> + </links> + + <menu name="Utilisateur"> + <item name="Accueil" href="index.html"/> + </menu> + + <menu name="Téléchargement"> + <item href="../maven2/org/codelutin/${project.artifactId}/${project.version}" + name="Télécharger la dernière version"/> + <item href="../maven2/org/codelutin/${project.artifactId}" + name="Voir toutes les versions"/> + </menu> + + <menu name="Développeur"> + <item name="best practices" href="MavenProjectBestPractices.html"/> + <item name="A faire" href="Todo.html"/> + </menu> + + <menu ref="reports"/> + + <menu ref="modules"/> + + </body> +</project>