Author: tchemit Date: 2009-08-24 15:00:00 +0200 (Mon, 24 Aug 2009) New Revision: 2 Modified: trunk/pom.xml Log: duplicate mavenpom to chorempom Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-08-24 10:52:01 UTC (rev 1) +++ trunk/pom.xml 2009-08-24 13:00:00 UTC (rev 2) @@ -7,12 +7,6 @@ <!-- *** POM Relationships *************************************** --> <!-- ************************************************************* --> - <parent> - <groupId>org.nuiton</groupId> - <artifactId>mavenpom</artifactId> - <version>1.0.0</version> - </parent> - <groupId>org.chorem</groupId> <artifactId>chorempom</artifactId> <version>1.0.0-SNAPSHOT</version> @@ -26,7 +20,110 @@ <inceptionYear>2009</inceptionYear> <url>http://maven-site.chorem.org/chorempom</url> + <licenses> + <license> + <name>Lesser General Public License (LGPL)</name> + <url>http://www.gnu.org/licenses/lgpl.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + <developers> + <developer> + <name>Benjamin Poussin</name> + <id>bpoussin</id> + <email>poussin@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + <role>Debian packager</role> + </roles> + </developer> + + <developer> + <name>Arnaud Thimel</name> + <id>athimel</id> + <email>thimel@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + + <developer> + <name>Julien Ruchaud</name> + <id>jruchaud</id> + <email>ruchaud@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + + <developer> + <name>Eric Chatellier</name> + <id>echatellier</id> + <email>chatellier@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + + <developer> + <name>Tony Chemit</name> + <id>tchemit</id> + <email>chemit@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + + <developer> + <name>Sylvain Letellier</name> + <id>sletellier</id> + <email>letellier@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + + <developer> + <name>Yannick Martel</name> + <id>ymartel</id> + <email>martel@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + + <developer> + <name>Stéphane Chorlet</name> + <id>schorlet</id> + <email>chorlet@codelutin.com</email> + <organization>CodeLutin</organization> + <timezone>+2</timezone> + <roles> + <role>Développeur</role> + </roles> + </developer> + </developers> + + <organization> + <name>CodeLutin</name> + <url>http://www.codelutin.com/</url> + </organization> + <!-- ************************************************************* --> <!-- *** Build Settings ****************************************** --> <!-- ************************************************************* --> @@ -34,25 +131,389 @@ <packaging>pom</packaging> <properties> + <!-- 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> + + <!-- java level is 1.6 --> + <maven.compile.source>1.6</maven.compile.source> + <maven.compile.target>1.6</maven.compile.target> + + <!-- default encoding --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + + <!-- by default, use maven 2 source base dir --> + <maven.src.dir>${basedir}/src</maven.src.dir> + + <!-- where to generate sources --> + <maven.gen.dir>${project.build.directory}/generated-sources</maven.gen.dir> + + <!-- where to generate test sources --> + <maven.test.gen.dir>${project.build.directory}/generated-test-sources</maven.test.gen.dir> + + <!-- locales for the site generation, by default only french --> + <maven.site.locales>fr</maven.site.locales> + + <!-- 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 control fork mode of tests --> + <maven.test.forkMode>once</maven.test.forkMode> + + <!-- to activate generation of reports and javadoc when doing a site --> + <maven.reports.generate>true</maven.reports.generate> + + <!-- 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.1</helper.version> + <!-- license to use --> <license.licenseName>lgpl_v3</license.licenseName> <!-- release repository url (to be used in site.xml) --> <repository.home.url>http://maven.chorem.org/release</repository.home.url> - + </properties> + <build> + + <defaultGoal>install</defaultGoal> + + <resources> + <resource> + <directory>${maven.src.dir}/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + <excludes> + <exclude>**/*~</exclude> + </excludes> + </resource> + </resources> + + <pluginManagement> + + <plugins> + + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.3</version> + <configuration> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.0.2</version> + <configuration> + <source>${maven.compile.source}</source> + <target>${maven.compile.target}</target> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.4.3</version> + <configuration> + <skip>${maven.test.skip}</skip> + <testFailureIgnore>${maven.test.testFailureIgnore}</testFailureIgnore> + <forkMode>${maven.test.forkMode}</forkMode> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.1</version> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>false</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <outputDirectory>${project.build.directory}/lib</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-war-plugin</artifactId> + <version>2.1-beta-1</version> + <configuration> + <warSourceDirectory>${maven.src.dir}/main/webapp</warSourceDirectory> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> + <inherited>true</inherited> + + <configuration> + <archive> + <!-- cela fait bugger le chargement des service via + ServiceLoader donc on desactive --> + <!--index>true</index--> + <manifest> + <mainClass>${maven.jar.main.class}</mainClass> + </manifest> + <manifestEntries> + <url>${pom.url}</url> + </manifestEntries> + </archive> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-source-plugin</artifactId> + <version>2.1</version> + <inherited>true</inherited> + <executions> + <execution> + <id>attach-sources</id> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <version>${javadoc.version}</version> + <configuration> + <docencoding>${project.reporting.outputEncoding}</docencoding> + <encoding>${project.reporting.outputEncoding}</encoding> + <charset>${project.reporting.outputEncoding}</charset> + <quiet>true</quiet> + <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames> + <!-- uniquement a partir de javadoc 2.5 --> + <!--skip>${maven.javadoc.skip}</skip--> + </configuration> + <executions> + <execution> + <id>attach-javadocs</id> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-site-plugin</artifactId> + <version>2.0.1</version> + <configuration> + <inputEncoding>${project.reporting.outputEncoding}</inputEncoding> + <outputEncoding>${project.reporting.outputEncoding}</outputEncoding> + <generateReports>${maven.reports.generate}</generateReports> + <locales>${maven.site.locales}</locales> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-release-plugin</artifactId> + <version>2.0-beta-9</version> + </plugin> + + <plugin> + <artifactId>maven-plugin-plugin</artifactId> + <version>2.5</version> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.2-beta-4</version> + <dependencies> + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${helper.version}</version> + </dependency> + </dependencies> + <executions> + <!-- + Pour construire les bundles d'une lib. + + Il suffit d'ajouter dans le profile release-profile : + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + <configuration> + <attach>false</attach> + <descriptorRefs> + <descriptorRef>deps</descriptorRef> + <descriptorRef>full</descriptorRef> + </descriptorRefs> + </configuration> + </plugin> + --> + <!--execution> + <id>attach-assemblies-libs</id> + + </execution--> + </executions> + </plugin> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${helper.version}</version> + </plugin> + + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <version>1.0-beta-1</version> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.1.1</version> + </plugin> + + </plugins> + </pluginManagement> + + </build> + + <reporting> + <plugins> + + <!-- + The Project Info Reports Plugin has twelve goals: + see http://maven.apache.org/plugins/maven-project-info-reports-plugin + --> + <plugin> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>2.1.2</version> + </plugin> + + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <version>${javadoc.version}</version> + <configuration> + <quiet>true</quiet> + <docencoding>${project.build.sourceEncoding}</docencoding> + <encoding>${project.build.sourceEncoding}</encoding> + <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames> + </configuration> + </plugin> + + <!-- changelog:changelog + changelog:dev-activity + changelog:file-activity --> + <!--FIXME : TC-20090816 : there is a bug with fileactivity + in report, trunk url are prefix with tag/xxx-releaseNumber !--> + <plugin> + <artifactId>maven-changelog-plugin</artifactId> + <version>2.1</version> + <!--configuration> + <displayFileDetailUrl>http://svn.chorem.org/svn/${projectId}%FILE%</displayFileDetailUrl> + </configuration--> + </plugin> + + <!-- Implicit add of reportSet to not generate jira reports --> + <plugin> + <artifactId>maven-changes-plugin</artifactId> + <version>2.1</version> + <!--configuration> + <issueLinkTemplatePerSystem>%URL%/issues/show/%ISSUE%</issueLinkTemplatePerSystem> + </configuration--> + <reportSets> + <reportSet> + <reports> + <report>changes-report</report> + </reports> + </reportSet> + </reportSets> + </plugin> + + <plugin> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.3</version> + <configuration> + <encoding>${project.reporting.outputEncoding}</encoding> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-pmd-plugin</artifactId> + <version>2.4</version> + <configuration> + <linkXRef>true</linkXRef> + <sourceEncoding>${project.reporting.outputEncoding}</sourceEncoding> + <minimumTokens>100</minimumTokens> + <targetJdk>${maven.compile.target}</targetJdk> + </configuration> + + </plugin> + + <plugin> + <artifactId>maven-jxr-plugin</artifactId> + <version>2.1</version> + </plugin> + + <plugin> + <artifactId>maven-surefire-report-plugin</artifactId> + <version>2.4.3</version> + </plugin> + + <!-- a voir si on le garde car hudson le fait aussi ? --> + <!--plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + <version>2.2</version> + </plugin--> + + <!-- a tester si c'est viable sur du multi-module --> + <!-- il y a une version 2.1 voir pour la conf car sans conf ca plante --> + <!--plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>1.2</version> + </plugin--> + + </plugins> + </reporting> + <!-- ************************************************************* --> <!-- *** Build Environment ************************************** --> <!-- ************************************************************* --> - <scm> - <connection>scm:svn:http://svn.chorem.org/svn/chorempom/trunk</connection> - <developerConnection>scm:svn:http://svn.chorem.org/svn/chorempom/trunk</developerConnection> - <url>http://www.chorem.org/repositories/browse/chorempom/trunk</url> - </scm> + <!-- Build Environment : Environment Information --> + <issueManagement> <system>redmine</system> <url>http://www.chorem.org/projects/${projectId}/issues</url> @@ -63,32 +524,21 @@ <url>http://hudson.chorem.org/job/${projectId}</url> </ciManagement> - <!--Any mailing lists for the project--> - <mailingLists> - <mailingList> - <name>${listId}-commits</name> - <subscribe>http://list.chorem.org/cgi-bin/mailman/listinfo/${listId}-commits</subscribe> - <unsubscribe>http://list.chorem.org/cgi-bin/mailman/listinfo/${listId}-commits</unsubscribe> - <post>${listId}-commits@$list.chorem.org</post> - <archive>http://list.chorem.org/pipermail/${listId}-commits/</archive> - </mailingList> + <!-- Source control management. --> + <scm> + <connection>scm:svn:http://svn.chorem.org/svn/chorempom/trunk</connection> + <developerConnection>scm:svn:http://svn.chorem.org/svn/chorempom/trunk</developerConnection> + <url>http://www.chorem.org/repositories/browse/chorempom/trunk</url> + </scm> - <mailingList> - <name>${listId}-devel</name> - <subscribe>http://list.chorem.org/cgi-bin/mailman/listinfo/${listId}-devel</subscribe> - <unsubscribe>http://list.chorem.org/cgi-bin/mailman/listinfo/${listId}-devel</unsubscribe> - <post>${listId}-devel@list.chorem.org</post> - <archive>http://list.chorem.org/pipermail/${listId}-devel/</archive> - </mailingList> + <!-- ************************************************************* --> + <!-- *** Maven Environment *************************************** --> + <!-- ************************************************************* --> - <mailingList> - <name>${listId}-users</name> - <subscribe>http://list.chorem.org/cgi-bin/mailman/listinfo/${listId}-users</subscribe> - <unsubscribe>http://list.chorem.org/cgi-bin/mailman/listinfo/${listId}-users</unsubscribe> - <post>${listId}-users@list.chorem.org</post> - <archive>http://list.chorem.org/pipermail/${listId}-users/</archive> - </mailingList> - </mailingLists> + <!-- prerequisites --> + <prerequisites> + <maven>[2.0.10,)</maven> + </prerequisites> <!--Distribution--> <distributionManagement> @@ -100,13 +550,281 @@ <id>nuiton</id> <url>scpexe://chorem.org/var/lib/maven/snapshot</url> </snapshotRepository> + <site> - <id>nuiton</id> + <id>chorem</id> + <!-- l'héritage sur les poms donnera la bonne url pour tous les poms + qui héritent de ce pom (/artifactId est rajouté) mais cela ne + fonctionne pas pour mavenpom lui-même (voir profile internal) + --> <url>scpexe://chorem.org/var/lib/redmine-chorem/project-site/</url> </site> </distributionManagement> + <!-- Maven Environment : profiles --> + <profiles> + + <!-- do not execute tests (generaly a bad idea...) --> + <profile> + <id>notests</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <maven.test.skip>true</maven.test.skip> + </properties> + </profile> + <!-- do not build reports (speedup site generation in dev) --> + <profile> + <id>noreports</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <properties> + <maven.reports.generate>false</maven.reports.generate> + </properties> + </profile> + + <!-- perform only on a release stage when using the maven-release-plugin --> + <profile> + <id>release-profile</id> + <activation> + <property> + <name>performRelease</name> + <value>true</value> + </property> + </activation> + <build> + + <plugins> + + <!-- always check labs properties --> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>validate-project</id> + <goals> + <goal>enforce</goal> + </goals> + <phase>initialize</phase> + </execution> + </executions> + <configuration> + <rules> + <requireFilesExist> + <files> + <file>changelog.txt</file> + <file>LICENSE.txt</file> + <file>README.txt</file> + </files> + </requireFilesExist> + </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + + </configuration> + </plugin> + + <!-- always compute source jar --> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <id>attach-sources</id> + </execution> + </executions> + </plugin> + + <!-- always compute javadoc jar --> + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> + <executions> + <execution> + <id>attach-javadocs</id> + </execution> + </executions> + </plugin> + + <!-- always add license and third-party files to classpath --> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <executions> + <execution> + <id>attach-licenses</id> + <goals> + <goal>add-license</goal> + <goal>add-third-party</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- a utiliser lorsqu'on aura fait un transformer + de changelog.txt en target/changes.xml + <plugin> + <artifactId>maven-changes-plugin</artifactId> + <version>2.1</version> + <executions> + <execution> + <id>send-announcement-email</id> + <phase>install</phase> + <goals> + <goal>announcement-mail</goal> + </goals> + <configuration> + <mailSender> + <name>Nuiton Release Notification</name> + <email>noreply@nuiton.org</email> + </mailSender> + <toAddresses> + <item>admin@codelutin.com</item> + </toAddresses> + <smtpHost>smtp</smtpHost> + </configuration> + </execution> + </executions> + </plugin--> + </plugins> + + </build> + </profile> + + <!-- use this plugin to run the main class --> + <profile> + <id>run</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <defaultGoal>compile</defaultGoal> + <plugins> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>run</id> + <goals> + <goal>enforce</goal> + </goals> + <phase>initialize</phase> + <configuration> + <rules> + <requireProperty> + <property>maven.jar.main.class</property> + <message>Could not find the "maven.jar.main.class" required property, use + -Dmaven.jar.main.class=your.main.class.fqn + </message> + </requireProperty> + </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <id>run</id> + <goals> + <goal>java</goal> + </goals> + <phase>compile</phase> + <configuration> + <mainClass>${maven.jar.main.class}</mainClass> + <classpathScope>runtime</classpathScope> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> + <properties> + <exec.mainClass>${maven.jar.main.class}</exec.mainClass> + <exec.classpathScope>runtime</exec.classpathScope> + </properties> + </profile> + + <!-- use this plugin to run the main class --> + <profile> + <id>runJava</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <defaultGoal>compile</defaultGoal> + <plugins> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>run</id> + <goals> + <goal>enforce</goal> + </goals> + <phase>initialize</phase> + <configuration> + <rules> + <requireProperty> + <property>maven.jar.main.class</property> + <message>Could not find the "maven.jar.main.class" required property, use + -Dmaven.jar.main.class=your.main.class.fqn + </message> + </requireProperty> + </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <executions> + <execution> + <id>run</id> + <goals> + <goal>java</goal> + </goals> + <phase>compile</phase> + <configuration> + <mainClass>${maven.jar.main.class}</mainClass> + <classpathScope>runtime</classpathScope> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> + <properties> + <exec.mainClass>${maven.jar.main.class}</exec.mainClass> + <exec.classpathScope>runtime</exec.classpathScope> + </properties> + </profile> + <!-- ce profile est dedie uniquement a mavenpom pour faire des releases pour corriger les url de deployements qui marcheront pour tous les poms héritant de mavenpom, mais pas pour mavenpom lui-même... @@ -120,10 +838,11 @@ <distributionManagement> <site> <id>nuiton</id> - <url>scpexe://chorem.org/var/lib/redmine-chorem/project-site/chorempom</url> + <url>scpexe://chorem.org/var/lib/redmine-nuiton/project-site/chorempom</url> </site> </distributionManagement> </profile> + </profiles> </project>