IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Architecture Maven d'un projet Seam 2

Date de publication : 05 mars 2009

Par Mikael Robert (mikael-robert.developpez.com) (Blog)
 

L'outil Seam-gen est bien pratique, mais pour ce qui est des projets générés, le seul outil de compilation possible reste ant. De plus l'architecture proposée reste simpliste et limitée, voir précaire. Maven est aujourd'hui l'outil de compilation/gestion des dépendances incontournable en java, il facile énormément cet aspect de la gestion du projet. C'est pourquoi lorsque je créer un nouveau projet Seam je préfère utiliser Maven 2. Néanmoins, pourquoi se priver des facilités de seam-gen ? Nous allons donc voir, à partir d'un projet généré par Seam-gen comment créer une architecture 4 tiers avec gestion des dépendance automatisée.

               Version PDF (Miroir)   Version hors-ligne (Miroir)

I. Introduction
II. Structure des projets
II-A. Les projets Ear et Entities
II-B. Le projet Services
II-C. Le projet War
III. Création des fichiers pom.xml
III-A. Le pom du projet parent
III-B. Le pom du projet EAR
III-C. Le pom du projet Entities
III-D. Le pom du projet Services
III-E. Le pom du projet War
IV. Conclusion


I. Introduction

Afin d'être relativement large dans les explications, nous couvrirons ici, la création d'un projet de type EAR, pour pouvoir y inclure des EJB. Si vous souhaitez créer simplement une webapp simple (vous ne voulez pas d'un serveur d'application avec conteneur d'EJB par exemple), le principe reste le même. Cependant il est bon de savoir que Seam permet la gestion des EJBs dans un serveur web type tomcat, grâce à un système interne d'émulation de conteneur d'EJB, cela peut être très pratique si vous travaillez dans un environnement rigide que vous ne pouvez faire évoluer. Je vous invite à vous référer à la documentation pour ce cas là. Je vois d'ici arriver les commentaires du type «Pourquoi s'embêter et ne pas mettre un JBoss ou un Glassfish à la place ?», la réponse est simple : en entreprise on a pas toujours le choix de l'environnement. La robustesse de ce type de projet est à mes yeux douteuse, mais si on a pas le choix … Bref ce n'est pas sujet de ce billet. Personnellement j'ai passé beaucoup de temps sur mes premiers projets à faire la structure Maven et les poms. Et à l'époque un exemple m'aurait été bien utile, c'est pourquoi j'ai décidé d'écrire cet article. Dans le cas présent, admettons que l'on souhaite créer un outils de blog relativement large, l'équivalent d'un wordpress un genre de cms donc. Le projet s'appellera alors dans mon billet dreamisle-cms, à vous de modifier tout ce qui suivra pour votre projet. Bien entendu, il est nécessaire de savoir utiliser l'outil Maven pour pouvoir comprendre et appliquer les explications données ci-après.


II. Structure des projets

La première partie pour la création de votre projet va donc consister à créer ce dernier avec seam-gen, comme expliqué dans la documentation officielle. Cette étape est très simple et seam-gen vous guide pas à pas. Ainsi, nous évitons la laborieuse étape de création des fichiers de configurations xml et properties, que nous n'aurons qu'a déplacer dans notre architecture Maven une fois celle-ci en place. Enfin gardez ce projet dans un coin de votre disque dur il vous servira toujours. On va maintenant créer un projet vide. Dans Eclipse : new project, général, project. Ici on l'appelle dreamisle-cms. Dans celui ci on créer alors 4 repertoires : - dreamisle-cms-ear ce sera le sous projet qui contiendra le pom utilisé par maven pour générer l'ear de votre application. - dreamisle-cms-entities qui sera le projet qui contiendra vos EJB Entity, il représentera la couche modèle. - dreamisle-cms-services sera le projet qui contiendra la couche service (action/contrôleur) de votre application : les EJB sessions, messages et les composants Seam. Vous pouvez aussi décider de mettre vos EJB Entity dans un packages entities dans ce projet, mais personnellement je préfère les séparer dans un projet externe, ainsi l'abstraction des données est indépendantes du reste du projet (Cas classique d'architecture 4-tiers). - dreamisle-cms-war : le war de votre application, la webapp si vous préférez. La couche vue. Enfin importez ces répertoires comme nouveaux projets vides dans Eclipse. (Utilisez l'outil de création de projet vide, mais changez l'emplacement du projet, et donner lui le même nom que le répertoire.) Désormais on va créer les sous répertoire de votre architecture Maven typique.


J'ai pensé que des captures d'écran seraient plus clair qu'un long texte. Vous voyez donc ici la structure du projet principal.


II-A. Les projets Ear et Entities


Ici donc l'arborescence du projet EAR et du projet entities. Vous pouvez aussi voir quels fichiers vous devez placer dans quels répertoires. Reprenez ceux de votre projet seam gen créé en première partie.


II-B. Le projet Services


On constate la présence du fichier seam.properties, dans mon cas il est vide mais absolument nécessaire. et il doit être présent dans tous les projets ou des composants seam sont déployé. En effet lors de son démarrage, Seam scanne les archives qui contiennent ce fichier. La structure doit être identique à la capture. Sauf bien sur le package org.dreamisle.services, : c'est à vous de décider de votre packaging.


II-C. Le projet War

Et enfin le war. La partie Web-inf est la plus importante, une bonne partie de la configuration de votre application va se trouver ici. Je n'ai pas étendu img, layout, stylesheet mais vous vous doutez bien de leur contenu.



III. Création des fichiers pom.xml

On va pouvoir attaquer les choses sérieuses désormais : les fameux pom. Ils sont souvent la hantise des développeurs java, mais une fois en place, ils font gagner un temps fou et évitent une sacrée perte de temps due au versioning des librairies et frameworks utilisés. Et au moins si vous êtes plusieurs dans l'équipe, vous êtes sûr que tout le monde travaille sur la même version de chaque librairie. Et puis pom, moi ça me rappelle un certain constructeur d'ordinateurs que j'affectionne particulièrement … pas vous ? Vous l'avez vu chaque sous projet à son fichier pom.xml. Le projet principal qui contient les autres : dreamisle-cms, a aussi son pom. Il s'agit pour maven du projet parent, il contient donc le pom principal, c'est lui qui contient en statique les versions de chaque dépendance, référencées dans les pom fils grâce a provided ou à ${pom.version} pour vos dépendances personnelles.


III-A. Le pom du projet parent

Commençons donc par voir le pom parent : Comme vous pouvez le voir j'exclue parfois des librairies lors d'inclusion : c'est simplement pour éviter les redondances de librairies dans l'archive finale. En effet, lorsqu'on inclus une librairie via Maven, on appelle le pom de celle-ci, donc si vous incluez une librairie qui inclue d'autre librairies que vous avez déjà vous allez vous retrouver avec des jars en double dans votre archives, autant dire que c'est pas génial. Conclusion quand vous faite un EAR avec Maven, regardez bien ce qu'il contient et adaptez votre pom, ça peut éviter des bêtises.
Pom du projet paren

<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>
  <groupId>dreamisle-cms</groupId>
  <artifactId>dreamisle-cms</artifactId>
  <packaging>pom</packaging>
  <version>1.0-SNAPSHOT</version>

  <name>dreamisle-cms</name>
  <description>Parent project for Dreamisle CMS project.</description>
  <inceptionYear>2008</inceptionYear>
  <organization>
    <name>Dreamisle</name>
    <url>http://www.dreamisle.net</url>
  </organization>


  <modules>
    <module>dreamisle-cms-services</module>
    <module>dreamisle-cms-entities</module>
    <module>dreamisle-cms-war</module>
    <module>dreamisle-cms-ear</module>
  </modules>

  <developers>
    <developer>
      <id>mikael</id>
      <name>Mikael</name>
      <email>mikael@dreamisle.net</email>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <repositories>
    <!--repository>
      <id>jboss.com</id>
      <url>http://repository.jboss.com/maven2</url>
    </repository-->
    <!--repository>
      <id>java.net</id>
      <url>http://download.java.net/maven/2</url>
    </repository-->
  </repositories>

  <dependencyManagement>
    <dependencies>
     <!-- JBoss Seam -->
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam</artifactId>
        <!--  type>ejb</type -->
        <version>2.1.1.GA</version>
        <exclusions>
          <exclusion>
            <groupId>jboss</groupId>
            <artifactId>javassist</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam-debug</artifactId>
        <version>2.1.1.GA</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam-ui</artifactId>
        <version>2.1.1.GA</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam-pdf</artifactId>
        <version>2.1.1.GA</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam-mail</artifactId>
        <version>2.1.1.GA</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam-remoting</artifactId>
        <version>2.1.1.GA</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.seam</groupId>
        <artifactId>jboss-seam-ioc</artifactId>
        <version>2.1.1.GA</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.el</groupId>
        <artifactId>jboss-el</artifactId>
        <version>1.0_02.CR2</version>
      </dependency>
	  <dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.3.GA</version>
        <scope>provided</scope>
      </dependency>
      <!--  RichFaces -->
      <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-impl</artifactId>
        <version>3.3.0.GA</version>
      </dependency>
      <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-api</artifactId>
        <version>3.3.0.GA</version>
      </dependency>
      <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui</artifactId>
        <version>3.3.0.GA</version>
      </dependency>
      
      <!-- Jericho HTML parser -->

      <dependency>
        <groupId>net.htmlparser.jericho</groupId>
        <artifactId>jericho-html</artifactId>
        <version>2.6-downloaded</version>
      </dependency>
      
      <!-- iText -->
      <dependency>
        <groupId>com.lowagie</groupId>
        <artifactId>itext</artifactId>
        <version>2.0.6</version>
      </dependency>

      <!-- Quartz -->
      <dependency>
        <groupId>quartz</groupId>
        <artifactId>quartz</artifactId>
        <version>1.6.0</version>
      </dependency>

      <!-- antlr -->
      <dependency>
        <groupId>antlr</groupId>
        <artifactId>antlr</artifactId>
        <version>2.7.6</version>
      </dependency>
      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr-runtime</artifactId>
        <version>3.0</version>
      </dependency>

      <!-- jbpm -->
      <dependency>
        <groupId>org.jbpm</groupId>
        <artifactId>jbpm-jpdl</artifactId>
        <version>3.2.2</version>
      </dependency>

      <!-- drools -->
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-compiler</artifactId>
        <version>4.0.7</version>
      </dependency>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-core</artifactId>
        <version>4.0.7</version>
      </dependency>
      <dependency>
        <groupId>janino</groupId>
        <artifactId>janino</artifactId>
        <version>2.5.10</version>
      </dependency>
      <dependency>
        <groupId>org.mvel</groupId>
        <artifactId>mvel</artifactId>
        <version>1.3.1-java1.4</version>
      </dependency>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.4.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>1.0.b2</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jdt</groupId>
        <artifactId>core</artifactId>
        <version>3.2.3.v_686_R32x</version>
        <scope>provided</scope>
      </dependency>

      <!-- Jakarta commons -->
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.7.0</version>
      </dependency>
      <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>1.8</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.0.4</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-math</groupId>
        <artifactId>commons-math</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.3</version>
      </dependency>

      <!-- Open CSV -->
      <dependency>
        <groupId>net.sf.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>1.8</version>
      </dependency>

      <!-- JFree chart -->
      <dependency>
        <groupId>jfree</groupId>
        <artifactId>jfreechart</artifactId>
        <version>1.0.9</version>
      </dependency>
      <dependency>
        <groupId>jfree</groupId>
        <artifactId>jcommon</artifactId>
        <version>1.0.12</version>
      </dependency>
      
        <!-- Hibernate validator -->
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.3.1.GA</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>3.0.0.ga</version>
        <scope>provided</scope>
      </dependency>
      
      <dependency>
        <groupId>jdom</groupId>
        <artifactId>jdom</artifactId>
        <version>1.0</version>
      </dependency>

      <!-- JEE 5 -->

      <dependency>
        <groupId>javax.ejb</groupId>
        <artifactId>ejb-api</artifactId>
        <version>3.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>jsr250-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.xml.ws</groupId>
        <artifactId>jaxws-api</artifactId>
        <version>2.1</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.jws</groupId>
        <artifactId>jsr181-api</artifactId>
        <version>1.0-MR1</version>
        <exclusions>
          <exclusion>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
          </exclusion>
        </exclusions>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.xml.soap</groupId>
        <artifactId>saaj-api</artifactId>
        <version>1.3</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.jms</groupId>
        <artifactId>jms</artifactId>
        <version>1.1</version>
        <scope>provided</scope>
      </dependency>



      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>com.sun.facelets</groupId>
        <artifactId>jsf-facelets</artifactId>
        <version>1.1.14</version>
      </dependency>

      <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>1.2</version>
        <scope>provided</scope>
      </dependency>
      
      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jbossall-client</artifactId>
        <version>4.2.0.GA</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-embedded-all</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-ejb3x</artifactId>
        <version>4.2.0.GA</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jboss</groupId>
        <artifactId>ejb3-persistence</artifactId>
        <version>4.2.0.GA</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-jaxws</artifactId>
        <version>4.2.0.GA</version>
        <scope>provided</scope>
      </dependency>
      

	<!-- JBoss EJB 3.0 specific annotations -->

      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-annotations-ejb3</artifactId>
        <version>4.2.1.GA</version>
        <scope>provided</scope>
      </dependency>

   
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>3.3.2.GA</version>
        <exclusions>
          <exclusion>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>jboss</groupId>
        <artifactId>mail-plugin</artifactId>
        <version>4.2.2.GA</version>
      </dependency>



    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.8</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changelog-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javancss-maven-plugin</artifactId>
      </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>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <formats>
            <format>html</format>
            <format>xml</format>
          </formats>
          <outputDirectory>
            ${project.reporting.outputDirectory}/cobertura
          </outputDirectory>
          <instrumentation>
            <excludes>
              <exclude>
                org/dreamisle/entities/**/*
              </exclude>
              <exclude>**/*Test.class</exclude>
              <exclude>**/*Exception.class</exclude>
            </excludes>
          </instrumentation>
          <check>
            <branchRate>85</branchRate>
            <lineRate>85</lineRate>
            <haltOnFailure>false</haltOnFailure>
            <totalBranchRate>85</totalBranchRate>
            <totalLineRate>85</totalLineRate>
            <packageLineRate>85</packageLineRate>
            <packageBranchRate>85</packageBranchRate>
          </check>

          <executions>
            <execution>
              <goals>
                <goal>clean</goal>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

</project>
Et voilà, ouf ! Je ne vais pas rentrez dans le détails sur le contenu du pom, si vous ne comprenez pas ce code xml, commencez par vous reporter à des documentations sur maven, il y en a de très bonnes sur developpez.com.


III-B. Le pom du projet EAR

Et maintenant le pom de l'ear : c'est lui qui contient les instructions de build pour maven, donc faites celui-ci avec une attention particulière. Lisez attentivement la partie build, j'y utilise un plugin qui permet de déplacer l'ear final vers le répertoire de déploiement de votre serveur d'application (ici jboss).

<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">
  <parent>
    <groupId>dreamisle-cms</groupId>
    <artifactId>dreamisle-cms</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>dreamisle-cms</groupId>
  <artifactId>dreamisle-cms-ear</artifactId>
  <packaging>ear</packaging>

  <name>dreamisle-cms-ear</name>
  <description>ear archive for dreamisle cms.</description>
  <inceptionYear>2009</inceptionYear>
  <organization>
    <name>Dreamisle</name>
    <url>http://www.dreamisle.net</url>
  </organization>

  <dependencies>

    <dependency>
      <groupId>dreamisle-cms</groupId>
      <artifactId>dreamisle-cms-entities</artifactId>
      <type>ejb</type>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>dreamisle-cms</groupId>
      <artifactId>dreamisle-cms-services</artifactId>
      <type>ejb</type>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>dreamisle-cms</groupId>
      <artifactId>dreamisle-cms-war</artifactId>
      <type>war</type>
      <version>${pom.version}</version>
    </dependency>

    <!-- Jboss Seam -->
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam</artifactId>
      <!--<type>ejb</type> !-->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-ui</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.el</groupId>
      <artifactId>jboss-el</artifactId>
      <scope>provided</scope>
    </dependency>

   <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
    </dependency>
    
    <!-- RichFaces -->
    <dependency>
      <groupId>org.richfaces.framework</groupId>
      <artifactId>richfaces-api</artifactId>
    </dependency>

    <!-- Quartz -->
    <dependency>
      <groupId>quartz</groupId>
      <artifactId>quartz</artifactId>
    </dependency>

    <!-- antlr -->
    <dependency>
      <groupId>antlr</groupId>
      <artifactId>antlr</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr-runtime</artifactId>
    </dependency>

    <!-- jbpm -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-jpdl</artifactId>
    </dependency>

    <!-- drools -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
    </dependency>
    <dependency>
      <groupId>janino</groupId>
      <artifactId>janino</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mvel</groupId>
      <artifactId>mvel</artifactId>
    </dependency>

    <!-- OpenCSV -->
    <dependency>
      <groupId>net.sf.opencsv</groupId>
      <artifactId>opencsv</artifactId>
    </dependency>

    <!-- Jericho HTML parser -->
    <dependency>
      <groupId>net.htmlparser.jericho</groupId>
      <artifactId>jericho-html</artifactId>
    </dependency>

    <!-- Jakarta commons -->
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-math</groupId>
      <artifactId>commons-math</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>


    <!-- Facelets -->
    <dependency>
      <groupId>com.sun.facelets</groupId>
      <artifactId>jsf-facelets</artifactId>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
          <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <copy todir="${project.build.directory}/${project.build.finalName}">
                  <fileset dir="../dreamisle-cms-ear/src/main/application" excludes="components.properties"/>
                </copy>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <displayName>Dreamisle CMS</displayName>
          <description>Seam CMS by Dreamisle</description>
          <modules>
            <ejbModule>
              <groupId>dreamisle-cms</groupId>
              <artifactId>dreamisle-cms-entities</artifactId>
            </ejbModule>
            <ejbModule>
              <groupId>dreamisle-cms</groupId>
              <artifactId>dreamisle-cms-services</artifactId>
            </ejbModule>
            <webModule>
              <groupId>dreamisle-cms</groupId>
              <artifactId>dreamisle-cms-war</artifactId>
              <contextRoot>/dreamisle-cms</contextRoot>
            </webModule>
            
            <jarModule>
              <groupId>org.jboss.seam</groupId>
              <artifactId>jboss-seam</artifactId>
              <includeInApplicationXml>true</includeInApplicationXml>
            </jarModule>
            
            <jarModule>
              <groupId>org.jboss.el</groupId>
              <artifactId>jboss-el</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>org.jbpm</groupId>
              <artifactId>jbpm-jpdl</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>org.drools</groupId>
              <artifactId>drools-compiler</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>org.drools</groupId>
              <artifactId>drools-core</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>org.mvel</groupId>
              <artifactId>mvel</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>janino</groupId>
              <artifactId>janino</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>org.antlr</groupId>
              <artifactId>antlr-runtime</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>org.richfaces.framework</groupId>
              <artifactId>richfaces-api</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>net.sf.opencsv</groupId>
              <artifactId>opencsv</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>net.htmlparser.jericho</groupId>
              <artifactId>jericho-html</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>quartz</groupId>
              <artifactId>quartz</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>commons-math</groupId>
              <artifactId>commons-math</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
            <jarModule>
              <groupId>commons-lang</groupId>
              <artifactId>commons-lang</artifactId>
              <bundleDir>lib</bundleDir>
            </jarModule>
          </modules>
          <jboss>
            <version>4</version>
            <loader-repository>
              seam.jboss.org:loader=dreamisle-cms
            </loader-repository>
          </jboss>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy</id>
            <phase>install</phase>
            <goals>
              <goal>copy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <artifactItems>
            <artifactItem>
              <groupId>${project.groupId}</groupId>
              <artifactId>${project.artifactId}</artifactId>
              <version>${project.version}</version>
              <type>ear</type>
              <overWrite>true</overWrite>
              <outputDirectory>
                /home/user/jboss-version/server/nomserver/deploy/
              </outputDirectory>
              <destFileName>dreamisle-cms.ear</destFileName>
            </artifactItem>
          </artifactItems>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
Il est important de respecter l'ordre d'appel des modules, mais si vous connaissez maven, vous devez déjà le savoir.


III-C. Le pom du projet Entities

Celui ci est simple il ne contient que les dépendances du projet.
 
<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">
  <parent>
    <groupId>dreamisle-cms</groupId>
    <artifactId>dreamisle-cms</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>dreamisle-cms</groupId>
  <artifactId>dreamisle-cms-entities</artifactId>

  <name>dreamisle-cms-entities</name>
  <description>All dreamisle ejb entities classes</description>
  <inceptionYear>2009</inceptionYear>
  <organization>
    <name>Dreamisle</name>
    <url>http://www.dreamisle.net/</url>
  </organization>

<dependencies>
    <!-- JBoss Seam -->
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam</artifactId>
      <scope>provided</scope>
      <!--  type>ejb</type -->
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-ui</artifactId>
      <scope>provided</scope>
    </dependency>



    <!-- drools -->

    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
      <scope>provided</scope>
    </dependency>



    <!-- Jericho HTML parser -->

    <dependency>
      <groupId>net.htmlparser.jericho</groupId>
      <artifactId>jericho-html</artifactId>
      <scope>provided</scope>
    </dependency>



    <!-- Commons libraries -->
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <scope>provided</scope>

    </dependency>



    <!-- Hibernate validator -->

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>provided</scope>
    </dependency>



    <!-- JEE 5 -->

    <dependency>
      <groupId>javax.ejb</groupId>
      <artifactId>ejb-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>jsr250-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.xml.ws</groupId>
      <artifactId>jaxws-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.jws</groupId>
      <artifactId>jsr181-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.xml.soap</groupId>
      <artifactId>saaj-api</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>jms</artifactId>
      <scope>provided</scope>
    </dependency>




    <!-- Dependencies used for unit testing ONLY -->

    <dependency>
      <groupId>jboss</groupId>
      <artifactId>mail-plugin</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>javassist</groupId>
          <artifactId>javassist</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <scope>test</scope>
    </dependency>
    
  </dependencies>
  
</project>

III-D. Le pom du projet Services

Petite subtilité on commence par ajouter comme dépendance le projet entities, pour pouvoir utiliser les ejb entités qui y sont définis bien entendu.
 
<?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">
  <parent>
    <groupId>dreamisle-cms</groupId>
    <artifactId>dreamisle-cms</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>dreamisle-cms</groupId>
  <artifactId>dreamisle-cms-services</artifactId>

  <name>dreamisle-cms-services</name>
  <description>All dreamisle CMS classes and EJB.</description>
  <inceptionYear>2008</inceptionYear>
  <organization>
    <name>Dreamisle</name>
    <url>http://www.dreamisle.net/</url>
  </organization>

  <dependencies>
    <dependency>
      <groupId>dreamisle-cms</groupId>
      <artifactId>dreamisle-cms-entities</artifactId>
      <type>ejb</type>
      <version>${pom.version}</version>
    </dependency>
    <!-- JBoss Seam -->
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>javassist</groupId>
          <artifactId>javassist</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-ui</artifactId>
      <scope>provided</scope>
   </dependency>
       <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-remoting</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Quartz -->
    <dependency>
      <groupId>quartz</groupId>
      <artifactId>quartz</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- drools -->
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- OpenCSV -->
    <dependency>
      <groupId>net.sf.opencsv</groupId>
      <artifactId>opencsv</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Jericho HTML parser -->
    <dependency>
      <groupId>net.htmlparser.jericho</groupId>
      <artifactId>jericho-html</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Jakarta commons -->
    <dependency>
      <groupId>commons-math</groupId>
      <artifactId>commons-math</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>

    <!--  JFreeChart -->
    <dependency>
      <groupId>jfree</groupId>
      <artifactId>jfreechart</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jfree</groupId>
      <artifactId>jcommon</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Hibernate validator -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- JEE 5 -->
    <dependency>
      <groupId>javax.ejb</groupId>
      <artifactId>ejb-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.persistence</groupId>
      <artifactId>persistence-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>jsr250-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.transaction</groupId>
      <artifactId>jta</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.xml.ws</groupId>
      <artifactId>jaxws-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.jws</groupId>
      <artifactId>jsr181-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.xml.soap</groupId>
      <artifactId>saaj-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.jms</groupId>
      <artifactId>jms</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>

</project>

III-E. Le pom du projet War

Et enfin Le pom du war ici on ajoute une partie build en précisant d'utiliser le plugin de génération de war de maven (ce n'est ni un jar ni un ear...).

<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">
  <parent>
    <groupId>dreamisle-cms</groupId>
    <artifactId>dreamisle-cms</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>dreamisle-cms</groupId>
  <artifactId>dreamisle-cms-war</artifactId>
  <packaging>war</packaging>

  <name>dreamisle-cms-war</name>
  <description>Web project for dreamisle-cms.</description>
  <inceptionYear>2009</inceptionYear>
  <organization>
    <name>Dreamisle</name>
    <url>http://www.dreamisle.net/</url>
  </organization>

  <dependencies>

    <!-- JBoss Seam -->
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-ioc</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.el</groupId>
          <artifactId>jboss-el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-mail</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.el</groupId>
          <artifactId>jboss-el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-pdf</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.el</groupId>
          <artifactId>jboss-el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-remoting</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.el</groupId>
          <artifactId>jboss-el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-ui</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.el</groupId>
          <artifactId>jboss-el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam-debug</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.seam</groupId>
          <artifactId>jboss-seam</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jboss.el</groupId>
          <artifactId>jboss-el</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- RichFaces -->
    <dependency>
      <groupId>org.richfaces.framework</groupId>
      <artifactId>richfaces-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.richfaces.ui</groupId>
      <artifactId>richfaces-ui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.richfaces.framework</groupId>
      <artifactId>richfaces-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- iText -->
    <dependency>
      <groupId>com.lowagie</groupId>
      <artifactId>itext</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Jakarta commons -->
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
    </dependency>

    <!-- jee -->
    <dependency>
      <groupId>com.sun.facelets</groupId>
      <artifactId>jsf-facelets</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-impl</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
        <dependency>
      <groupId>jboss</groupId>
      <artifactId>jbossall-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jboss</groupId>
      <artifactId>jboss-ejb3x</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jboss</groupId>
      <artifactId>ejb3-persistence</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jboss</groupId>
      <artifactId>jboss-jaxws</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>
      </plugin>
    </plugins>
  </build>
</project>

IV. Conclusion

Et voilà vous avez vos projets et vos poms, vous n'avez plus qu'à adapter à vos besoins ! Cette méthode à un autre avantage, vous pouvez n'inclure que ce qui est strictement nécessaire contrairement à un projet seam-gen classique qui inclus tout ce que vous pourriez peut être avoir besoin, et oui il faut bien que seam-gen soit adapté à tous les projets possibles.
De plus, si vous souhaitez utiliser une autre librairie que celles d'origines, c'est très simple, il n'y a qu'à ajouter la dépendance, et maven vous récupérera la librairie tout seul. J'espère que ce billet, et les poms à disposition vous auront été utiles. Dernier conseil sinon, installez vous les jboss tools disponibles sur jboss.org dans download. Ce plugin eclipse, est vraiment génial lorsqu'on utilise Seam. Il permet d'intégrer les possibilités du seam gen (création de projet, création d'entity avec la liste la home et les pages de gestion crud de celles-ci, création d'ejb pré-annotés avec interface et classe de l'ejb, créations de composant seam) en quelques cliques via des assistants (wizard) eclipse habituels.



               Version PDF (Miroir)   Version hors-ligne (Miroir)

Valid XHTML 1.1!Valid CSS!

Les sources présentées sur cette page sont libres de droits et vous pouvez les utiliser à votre convenance. Par contre, la page de présentation constitue une œuvre intellectuelle protégée par les droits d'auteur. Copyright © 2009 Mikael Robert. Aucune reproduction, même partielle, ne peut être faite de ce site ni de l'ensemble de son contenu : textes, documents, images, etc. sans l'autorisation expresse de l'auteur. Sinon vous encourez selon la loi jusqu'à trois ans de prison et jusqu'à 300 000 € de dommages et intérêts.