[Lutinbuilder-commits] r238 - lutinpluginproject/trunk lutinpluginproject/trunk/src/site/fr/rst lutinproject/trunk lutinproject/trunk/src/site/fr/rst
Author: tchemit Date: 2008-12-05 11:40:09 +0000 (Fri, 05 Dec 2008) New Revision: 238 Modified: lutinpluginproject/trunk/changelog lutinpluginproject/trunk/pom.xml lutinpluginproject/trunk/src/site/fr/rst/index.rst lutinproject/trunk/changelog lutinproject/trunk/pom.xml lutinproject/trunk/src/site/fr/rst/index.rst Log: utilisation du plugin enforcer pour faire des verifications sur le pom Modified: lutinpluginproject/trunk/changelog =================================================================== --- lutinpluginproject/trunk/changelog 2008-12-05 09:04:06 UTC (rev 237) +++ lutinpluginproject/trunk/changelog 2008-12-05 11:40:09 UTC (rev 238) @@ -1,10 +1,13 @@ 3.2 chemit (20081204) - * 20081205 [chemit] - amélioration des propriétés scm + * 20081205 [chemit] - utilisation du plugin enforcer pour faire des verifications sur le pom + - 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 est devenu obligatoire. 3.1 chatellier (20081118) * bump maven-license-switcher-plugin to 0.5 Modified: lutinpluginproject/trunk/pom.xml =================================================================== --- lutinpluginproject/trunk/pom.xml 2008-12-05 09:04:06 UTC (rev 237) +++ lutinpluginproject/trunk/pom.xml 2008-12-05 11:40:09 UTC (rev 238) @@ -198,10 +198,10 @@ <properties> <!-- the labs' project id : change this in your pom --> - <labs.id>11</labs.id> + <labs.id/> - <!-- this labs' project name : change this in your pom, if needed --> - <labs.project>${project.artifactId}</labs.project> + <!-- this labs' project name : change this in your pom --> + <labs.project/> <!-- labs host --> <labs.host>labs.libre-entreprise.org</labs.host> @@ -338,6 +338,47 @@ <plugins> + <!-- - - - - - - - - --> + <!-- PHASE VALIDATE --> + <!-- - - - - - - - - --> + + <!-- enforcer plugin --> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <version>1.0-alpha-4</version> + <executions> + <execution> + <goals> + <goal>enforce</goal> + </goals> + </execution> + </executions> + <configuration> + <rules> + <requireProperty> + <property>labs.id</property> + <regex>\d+</regex> + <regexMessage>"labs.id can must be a number!"</regexMessage> + </requireProperty> + <requireProperty> + <property>labs.project</property> + <regex>\w(\w|\d)*</regex> + <regexMessage>"labs.project can not be empty!"</regexMessage> + </requireProperty> + <requireFilesExist> + <files> + <file>changelog</file> + <file>LICENSE.txt</file> + <file>README</file> + </files> + </requireFilesExist> + </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + </configuration> + </plugin> + <!-- - - - - - - - - - - - --> <!-- PHASE PROCESS-SOURCES --> <!-- - - - - - - - - - - - --> @@ -363,7 +404,7 @@ <keepBackup>false</keepBackup> </configuration> </plugin> - + <!-- - - - - - - - - --> <!-- PHASE RESOURCES --> <!-- - - - - - - - - --> @@ -533,6 +574,12 @@ </pluginManagement> <plugins> + + <!-- always check labs properties --> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + </plugin> + <!-- always compute javadoc jar --> <plugin> <artifactId>maven-javadoc-plugin</artifactId> @@ -641,6 +688,9 @@ <plugin> <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <encoding>${maven.compile.encoding}</encoding> + </configuration> </plugin> <plugin> @@ -739,7 +789,7 @@ <developerConnection>${maven.scm.developerConnection}</developerConnection> <url>${maven.scm.url}</url> </scm> - + <!-- ************************************************************* --> <!-- *** Maven Environment *************************************** --> <!-- ************************************************************* --> @@ -759,10 +809,11 @@ <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> - <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> </snapshots> <releases> <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> </releases> </repository> </repositories> @@ -775,10 +826,11 @@ <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> - <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> </snapshots> <releases> <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> </releases> </pluginRepository> </pluginRepositories> @@ -852,6 +904,7 @@ </site> </distributionManagement> <properties> + <labs.id>11</labs.id> <labs.project>lutinbuilder</labs.project> <site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url> </properties> Modified: lutinpluginproject/trunk/src/site/fr/rst/index.rst =================================================================== --- lutinpluginproject/trunk/src/site/fr/rst/index.rst 2008-12-05 09:04:06 UTC (rev 237) +++ lutinpluginproject/trunk/src/site/fr/rst/index.rst 2008-12-05 11:40:09 UTC (rev 238) @@ -12,9 +12,9 @@ Les propriétés définies ----------------------- - - *labs.id* + - **labs.id** - - *labs.project* + - **labs.project** - *labs.host* @@ -74,7 +74,28 @@ .. WARNING:: Expliquer à quoi servent ces propriétés. +Vérification de conformité +-------------------------- +On effectue sur le pom des contrôles de conformités via *maven-enforcer-plugin*. + +propriétés obligatoires +~~~~~~~~~~~~~~~~~~~~~~~ + + - *labs.id* : doit être un nombre + + - *labs.projects* : doit etre non vide et commencer par un mot + +fichiers obligatoires +~~~~~~~~~~~~~~~~~~~~~ + + - README + + - changelog + + - LICENSE.txt + + Les plugins configurés ---------------------- Modified: lutinproject/trunk/changelog =================================================================== --- lutinproject/trunk/changelog 2008-12-05 09:04:06 UTC (rev 237) +++ lutinproject/trunk/changelog 2008-12-05 11:40:09 UTC (rev 238) @@ -1,10 +1,13 @@ 3.2 chemit (20081204) - * 20081205 [chemit] - amélioration des propriétés scm + * 20081205 [chemit] - utilisation du plugin enforcer pour faire des verifications sur le pom + - 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 est devenu obligatoire. 3.1 chatellier (20081118) * bump maven-license-switcher-plugin to 0.5 * Update plugin version Modified: lutinproject/trunk/pom.xml =================================================================== --- lutinproject/trunk/pom.xml 2008-12-05 09:04:06 UTC (rev 237) +++ lutinproject/trunk/pom.xml 2008-12-05 11:40:09 UTC (rev 238) @@ -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> @@ -176,10 +177,10 @@ <properties> <!-- the labs' project id : change this in your pom --> - <labs.id>11</labs.id> + <labs.id/> - <!-- this labs' project name : change this in your pom, if needed --> - <labs.project>${project.artifactId}</labs.project> + <!-- this labs' project name : change this in your pom --> + <labs.project/> <!-- labs host --> <labs.host>labs.libre-entreprise.org</labs.host> @@ -311,8 +312,51 @@ <pluginManagement> + <plugins> + <!-- - - - - - - - - --> + <!-- PHASE VALIDATE --> + <!-- - - - - - - - - --> + + <!-- enforcer plugin --> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <version>1.0-alpha-4</version> + <executions> + <execution> + <goals> + <goal>enforce</goal> + </goals> + </execution> + </executions> + <configuration> + <rules> + <requireProperty> + <property>labs.id</property> + <regex>\d+</regex> + <regexMessage>"labs.id can must be a number!"</regexMessage> + + </requireProperty> + <requireProperty> + <property>labs.project</property> + <regex>\w(\w|\d)*</regex> + <regexMessage>"labs.project can not be empty!"</regexMessage> + </requireProperty> + <requireFilesExist> + <files> + <file>changelog</file> + <file>LICENSE.txt</file> + <file>README</file> + </files> + </requireFilesExist> + </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + </configuration> + </plugin> + <!-- - - - - - - - - - - - --> <!-- PHASE PROCESS-SOURCES --> <!-- - - - - - - - - - - - --> @@ -554,6 +598,11 @@ <plugins> + <!-- always check labs properties --> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + </plugin> + <!-- always compute source jar --> <plugin> <artifactId>maven-source-plugin</artifactId> @@ -575,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> @@ -650,6 +699,9 @@ <plugin> <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <encoding>${maven.compile.encoding}</encoding> + </configuration> </plugin> <plugin> @@ -764,11 +816,11 @@ <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> - <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> </snapshots> <releases> <enabled>true</enabled> - <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> </releases> </repository> </repositories> @@ -781,10 +833,11 @@ <url>${labs.builder.url}</url> <snapshots> <enabled>true</enabled> - <updatePolicy>always</updatePolicy> + <checksumPolicy>warn</checksumPolicy> </snapshots> <releases> <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> </releases> </pluginRepository> </pluginRepositories> @@ -807,7 +860,7 @@ </distributionManagement> <!-- Maven Environment : profiles --> - <profiles> + <profiles> <profile> <id>notests</id> <activation> @@ -844,13 +897,13 @@ </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 ? --> + <!-- 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> + </activation> <distributionManagement> <site> <id>labs</id> @@ -858,6 +911,7 @@ </site> </distributionManagement> <properties> + <labs.id>11</labs.id> <labs.project>lutinbuilder</labs.project> <site.home.url>http://${labs.project}.${labs.host}/${project.artifactId}</site.home.url> </properties> Modified: lutinproject/trunk/src/site/fr/rst/index.rst =================================================================== --- lutinproject/trunk/src/site/fr/rst/index.rst 2008-12-05 09:04:06 UTC (rev 237) +++ lutinproject/trunk/src/site/fr/rst/index.rst 2008-12-05 11:40:09 UTC (rev 238) @@ -12,9 +12,9 @@ Les propriétés définies ----------------------- - - *labs.id* + - **labs.id** - - *labs.project* + - **labs.project** - *labs.host* @@ -74,7 +74,28 @@ .. WARNING:: Expliquer à quoi servent ces propriétés. +Vérification de conformité +-------------------------- +On effectue sur le pom des contrôles de conformités via *maven-enforcer-plugin*. + +propriétés obligatoires +~~~~~~~~~~~~~~~~~~~~~~~ + + - *labs.id* : doit être un nombre + + - *labs.projects* : doit etre non vide et commencer par un mot + +fichiers obligatoires +~~~~~~~~~~~~~~~~~~~~~ + + - README + + - changelog + + - LICENSE.txt + + Les plugins configurés ----------------------
participants (1)
-
tchemit@users.labs.libre-entreprise.org