Author: tchemit Date: 2009-01-28 11:23:49 +0000 (Wed, 28 Jan 2009) New Revision: 303 Modified: lutin-enforcer-rules/trunk/pom.xml lutin-enforcer-rules/trunk/src/site/site.xml lutinpluginproject/trunk/changelog.txt lutinpluginproject/trunk/pom.xml lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst lutinproject/trunk/changelog.txt lutinproject/trunk/pom.xml Log: - fix bug sur l'url de nos super-pom lors de la g?\195?\169n?\195?\169ration d'un site. - ajout de nos regles pour enforcer Modified: lutin-enforcer-rules/trunk/pom.xml =================================================================== --- lutin-enforcer-rules/trunk/pom.xml 2009-01-28 10:12:46 UTC (rev 302) +++ lutin-enforcer-rules/trunk/pom.xml 2009-01-28 11:23:49 UTC (rev 303) @@ -11,7 +11,7 @@ <parent> <groupId>org.codelutin</groupId> <artifactId>lutinpluginproject</artifactId> - <version>3.3</version> + <version>3.4-SNAPSHOT</version> </parent> <artifactId>lutin-enforcer-rules</artifactId> @@ -24,11 +24,11 @@ <artifactId>enforcer-api</artifactId> <version>${api.version}</version> </dependency> - <dependency> + <!--dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${api.version}</version> - </dependency> + </dependency--> <dependency> <groupId>org.apache.maven</groupId> @@ -67,7 +67,7 @@ <name>Lutin enforcer rules</name> <description>Customized maven enforcer plugins rules for our projects or plugins.</description> - <inceptionYear>2008</inceptionYear> + <inceptionYear>2009</inceptionYear> <url>${site.home.url}</url> <!-- ************************************************************* --> @@ -86,6 +86,8 @@ <api.version>1.0-alpha-4</api.version> <maven.version>2.0.9</maven.version> + + <lutin-enforcer.rules.version>${project.version}</lutin-enforcer.rules.version> </properties> <build> Modified: lutin-enforcer-rules/trunk/src/site/site.xml =================================================================== --- lutin-enforcer-rules/trunk/src/site/site.xml 2009-01-28 10:12:46 UTC (rev 302) +++ lutin-enforcer-rules/trunk/src/site/site.xml 2009-01-28 11:23:49 UTC (rev 303) @@ -36,6 +36,8 @@ <item name="lutin maven repository" href="../maven2"/> </links> + <menu ref="parent"/> + <menu name="Utilisateur"> <item name="Accueil" href="index.html"/> </menu> Modified: lutinpluginproject/trunk/changelog.txt =================================================================== --- lutinpluginproject/trunk/changelog.txt 2009-01-28 10:12:46 UTC (rev 302) +++ lutinpluginproject/trunk/changelog.txt 2009-01-28 11:23:49 UTC (rev 303) @@ -1,4 +1,8 @@ -3.3 ?? (200812..) +3.4 ??? 200902?? + * 20090128 [chemit] - fix bug sur l'url de nos super-pom lors de la génération d'un site. + * 20090127 [chemit] - suppression variable scm pour multi-niveau (pas utile pour les plugins) + - ajout lien vers maven-lutin-skin dans le site +3.3 chemit 20090111 * 20081230 [chemit] - utilisation du profile release-profile pour mettre les executions nécessaire à une release (enforcer, javadoc, sources,...) * 20081215 [chemit] - ajout des versions de nos plugins ou librairies (a finir...) Modified: lutinpluginproject/trunk/pom.xml =================================================================== --- lutinpluginproject/trunk/pom.xml 2009-01-28 10:12:46 UTC (rev 302) +++ lutinpluginproject/trunk/pom.xml 2009-01-28 11:23:49 UTC (rev 303) @@ -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" 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 +19,7 @@ <parent> <groupId>org.codelutin</groupId> <artifactId>lutinpluginproject</artifactId> - <version>3.3</version> + <version>3.4</version> </parent> --> @@ -47,14 +48,14 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> - <version>2.0.9</version> + <version>${maven.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> - <version>2.0.9</version> + <version>${maven.version}</version> <scope>provided</scope> </dependency> @@ -82,7 +83,6 @@ <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> <inceptionYear>2008</inceptionYear> @@ -198,11 +198,14 @@ <properties> <!-- the labs' project id : change this in your pom --> - <labs.id /> + <labs.id>11</labs.id> <!-- this labs' project name : change this in your pom --> - <labs.project /> + <labs.project>lutinbuilder</labs.project> + <!-- project site url --> + <!--site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url--> + <!-- labs host --> <labs.host>labs.libre-entreprise.org</labs.host> @@ -213,7 +216,7 @@ <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> + <site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url> <!-- by default, java sources are in java 1.6 --> <maven.compile.source>1.6</maven.compile.source> @@ -242,30 +245,26 @@ <!-- to skip tests (can use also profile notests) --> <maven.test.skip>false</maven.test.skip> + <!-- to control fork mode of tests --> + <maven.test.forkMode>never</maven.test.forkMode> + <!-- 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 --> + <!-- lutin stable librairies versions --> <license-switcher.version>0.5</license-switcher.version> - - <!-- version of i18n plugin to use --> <i18n.version>0.8</i18n.version> - - <!-- version of jrst plugin to use --> <jrst.version>0.8.3</jrst.version> - - <!-- version of jaxx plugin to use --> <jaxx.version>1.0</jaxx.version> - - <!-- topia version --> <topia.version>2.1.2</topia.version> - - <!-- generator version --> <generator.version>0.63</generator.version> - - <!-- lutinprocessor version --> + <lutinutil.version>1.0.2</lutinutil.version> <lutinprocessor.version>0.16</lutinprocessor.version> + <lutin-enforcer.rules.version>0.1-SNAPSHOT</lutin-enforcer.rules.version> + <javadoc.version>2.4</javadoc.version> + <maven.version>2.0.9</maven.version> + <!-- default license to use --> <license-switcher.licenseName>lgpl_v3</license-switcher.licenseName> @@ -282,32 +281,6 @@ 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> @@ -350,6 +323,10 @@ </executions> <configuration> <rules> + <!-- on verifie que le labs.id et labs.name sont bien surchargés (sauf pour les project de + lutinbuilder). --> + <myCustomRule implementation="org.codelutin.enforcer.CheckLabsPropertiesRule"/> + <requireProperty> <property>labs.id</property> <regex>\d+</regex> @@ -372,6 +349,13 @@ <failFast>true</failFast> <fail>true</fail> </configuration> + <dependencies> + <dependency> + <groupId>org.codelutin</groupId> + <artifactId>lutin-enforcer-rules</artifactId> + <version>${lutin-enforcer.rules.version}</version> + </dependency> + </dependencies> </plugin> <!-- - - - - - - - - - - - --> @@ -436,6 +420,14 @@ <keysModifier>false</keysModifier> <keepBackup>false</keepBackup> </configuration> + <dependencies> + <dependency> + <groupId>org.codelutin</groupId> + <artifactId>lutinutil</artifactId> + <version>${lutinutil.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> </plugin> <!-- - - - - - - - - --> @@ -497,7 +489,7 @@ <configuration> <skip>${maven.test.skip}</skip> <testFailureIgnore>${maven.test.testFailureIgnore}</testFailureIgnore> - <forkMode>never</forkMode> + <forkMode>${maven.test.forkMode}</forkMode> <!--Exclude NaughtyTest.java--> <!--<includes> <include>**/*Test.java</include> @@ -535,7 +527,7 @@ <!-- plugin javadoc --> <plugin> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.4</version> + <version>${javadoc.version}</version> <configuration> <docencoding>${maven.compile.encoding}</docencoding> <encoding>${maven.compile.encoding}</encoding> @@ -600,6 +592,9 @@ <plugin> <artifactId>maven-plugin-plugin</artifactId> <version>2.4.3</version> + <configuration> + <goalPrefix>i18n</goalPrefix> + </configuration> <executions> <execution> <goals> @@ -629,10 +624,10 @@ <phase>pre-site</phase> <configuration> <tasks> - <mkdir dir="${maven.src.dir}/site" /> + <mkdir dir="${maven.src.dir}/site"/> <copy todir="${maven.site.gen.dir}" verbose="${maven.verbose}" overwrite="false"> <fileset dir="${maven.src.dir}/site"> - <exclude name="**/rst/**" /> + <exclude name="**/rst/**"/> </fileset> </copy> </tasks> @@ -682,10 +677,11 @@ <plugin> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.4</version> + <version>${javadoc.version}</version> <configuration> <docencoding>${maven.compile.encoding}</docencoding> <encoding>${maven.compile.encoding}</encoding> + <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames> <quiet>true</quiet> </configuration> </plugin> @@ -699,7 +695,6 @@ <!-- Implicit add of reportSet to not generate jira reports --> <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> <reportSets> <reportSet> @@ -963,9 +958,31 @@ </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 ? --> + <id>not-release-profile</id> <activation> + <property> + <name>performRelease</name> + <value>!true</value> + </property> + </activation> + <build> + <plugins> + <!-- always compute source jar --> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <id>attach-sources</id> + </execution> + </executions> + </plugin> + </plugins> + </build> + </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 ? --> + <!--profile> + <activation> <file> <exists>src/site/fr/rst/MavenPluginBestPractices.rst</exists> </file> @@ -982,7 +999,7 @@ <labs.project>lutinbuilder</labs.project> <site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url> </properties> - </profile> + </profile--> </profiles> </project> Modified: lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst =================================================================== --- lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst 2009-01-28 10:12:46 UTC (rev 302) +++ lutinpluginproject/trunk/src/site/fr/rst/MavenPluginBestPractices.rst 2009-01-28 11:23:49 UTC (rev 303) @@ -14,6 +14,21 @@ Préconisations générales ------------------------ +- toujours permettre la surcharge des propriétés d'un plugin en utilisant l'annotation javadoc @expression : + +:: + + /** + * encoding a utiliser pour charger et sauver les bundles + * + * @parameter expression="${i18n.encoding}" default-value="${maven.compile.encoding}" + * @required + */ + protected String encoding; + +Ainsi on peut linéariser les configuration des plugins sans avoir à les surcharger. + + Création d'un nouveau pugin --------------------------- Modified: lutinproject/trunk/changelog.txt =================================================================== --- lutinproject/trunk/changelog.txt 2009-01-28 10:12:46 UTC (rev 302) +++ lutinproject/trunk/changelog.txt 2009-01-28 11:23:49 UTC (rev 303) @@ -1,3 +1,7 @@ +3.4 ??? 200902?? + * 20090128 [chemit] - fix bug sur l'url de nos super-pom lors de la génération d'un site. + * 20090127 [chemit] - ajout lien vers maven-lutin-skin dans le site + 3.3 chemit 20090107 * 20090105 [chemit] - utilisation org.codelutin.jaxx:maven-jaxx-plugin:1.0 * 20081230 [chemit] - utilisation du profile release-profile pour mettre les executions nécessaire à une release (enforcer, javadoc, sources,...) Modified: lutinproject/trunk/pom.xml =================================================================== --- lutinproject/trunk/pom.xml 2009-01-28 10:12:46 UTC (rev 302) +++ lutinproject/trunk/pom.xml 2009-01-28 11:23:49 UTC (rev 303) @@ -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" 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 +19,7 @@ <parent> <groupId>org.codelutin</groupId> <artifactId>lutinproject</artifactId> - <version>3.3</version> + <version>3.4</version> </parent> --> @@ -60,7 +61,6 @@ <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> <inceptionYear>1999</inceptionYear> @@ -176,11 +176,14 @@ <properties> <!-- the labs' project id : change this in your pom --> - <labs.id /> + <labs.id>11</labs.id> <!-- this labs' project name : change this in your pom --> - <labs.project /> + <labs.project>lutinbuilder</labs.project> + <!-- project site url --> + <!--site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url--> + <!-- labs host --> <labs.host>labs.libre-entreprise.org</labs.host> @@ -191,7 +194,7 @@ <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> + <site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url> <!-- by default, java sources are in java 1.6 --> <maven.compile.source>1.6</maven.compile.source> @@ -220,33 +223,24 @@ <!-- to skip tests (can use also profile notests) --> <maven.test.skip>false</maven.test.skip> + <!-- to control fork mode of tests --> + <maven.test.forkMode>never</maven.test.forkMode> + <!-- to activate generation of reports and javadoc when doing a site --> <maven.reports.generate>true</maven.reports.generate> - <!-- version of license-switcher to use --> + <!-- lutin stable librairies versions --> <license-switcher.version>0.5</license-switcher.version> - - <!-- version of i18n plugin to use --> <i18n.version>0.8</i18n.version> - - <!-- version of jrst plugin to use --> <jrst.version>0.8.3</jrst.version> - - <!-- version of jaxx plugin to use --> <jaxx.version>1.0</jaxx.version> - - <!-- topia version --> <topia.version>2.1.1</topia.version> - - <!-- generator version --> <generator.version>0.63</generator.version> - - <!-- lutinprocessor version --> <processor.version>0.16</processor.version> + <lutinutil.version>1.0.2</lutinutil.version> + <javadoc.version>2.4</javadoc.version> + <lutin-enforcer.rules.version>0.1-SNAPSHOT</lutin-enforcer.rules.version> - <!-- lutinutil version --> - <lutinutil.version>1.0.2</lutinutil.version> - <!-- default license to use --> <license-switcher.licenseName>lgpl_v3</license-switcher.licenseName> @@ -310,21 +304,23 @@ </excludes> </resource> - <resource> + <!-- this is a deprecated directory --> + <!--resource> <directory>${maven.src.dir}/main/uimodel</directory> <includes> <include>**/*.xml</include> <include>**/*.xgl</include> <include>**/*.bsh</include> </includes> - </resource> + </resource--> - <resource> + <!-- this is a deprecated directory --> + <!--resource> <directory>${maven.src.dir}/main/xsl</directory> <includes> <include>**/*.xsl</include> </includes> - </resource> + </resource--> </resources> <pluginManagement> @@ -349,11 +345,14 @@ </executions> <configuration> <rules> + <!-- on verifie que le labs.id et labs.name sont bien surchargés (sauf pour les project de + lutinbuilder). --> + <myCustomRule implementation="org.codelutin.enforcer.CheckLabsPropertiesRule"/> + <requireProperty> <property>labs.id</property> <regex>\d+</regex> <regexMessage>"labs.id can must be a number!"</regexMessage> - </requireProperty> <requireProperty> <property>labs.project</property> @@ -371,7 +370,15 @@ <ignoreCache>true</ignoreCache> <failFast>true</failFast> <fail>true</fail> + </configuration> + <dependencies> + <dependency> + <groupId>org.codelutin</groupId> + <artifactId>lutin-enforcer-rules</artifactId> + <version>${lutin-enforcer.rules.version}</version> + </dependency> + </dependencies> </plugin> <!-- - - - - - - - - - - - --> @@ -490,7 +497,7 @@ <configuration> <skip>${maven.test.skip}</skip> <testFailureIgnore>${maven.test.testFailureIgnore}</testFailureIgnore> - <forkMode>never</forkMode> + <forkMode>${maven.test.forkMode}</forkMode> <!--Exclude NaughtyTest.java--> <!--<includes> <include>**/*Test.java</include> @@ -573,12 +580,13 @@ <!-- plugin javadoc --> <plugin> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.4</version> + <version>${javadoc.version}</version> <configuration> <docencoding>${maven.compile.encoding}</docencoding> <encoding>${maven.compile.encoding}</encoding> <charset>${maven.compile.encoding}</charset> <quiet>true</quiet> + <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames> </configuration> <executions> <execution> @@ -673,10 +681,10 @@ <phase>pre-site</phase> <configuration> <tasks> - <mkdir dir="${maven.src.dir}/site" /> + <mkdir dir="${maven.src.dir}/site"/> <copy todir="${maven.site.gen.dir}" verbose="${maven.verbose}" overwrite="false"> <fileset dir="${maven.src.dir}/site"> - <exclude name="**/rst/**" /> + <exclude name="**/rst/**"/> </fileset> </copy> </tasks> @@ -725,7 +733,7 @@ <plugin> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.4</version> + <version>${javadoc.version}</version> <configuration> <quiet>true</quiet> <docencoding>${maven.compile.encoding}</docencoding> @@ -1006,7 +1014,7 @@ <activation> <property> <name>performRelease</name> - <value>false</value> + <value>!true</value> </property> </activation> <build> @@ -1023,9 +1031,9 @@ </plugins> </build> </profile> - <profile> - <!-- profile to fix site url only for the pom --> + <!-- 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 ? --> + <!--profile> <activation> <file> <exists>src/site/fr/rst/MavenProjectBestPractices.rst</exists> @@ -1043,7 +1051,7 @@ <labs.project>lutinbuilder</labs.project> <site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url> </properties> - </profile> + </profile--> </profiles> </project>