The multi project Maven Lutece layout it presents in the following way :
lutece-multi-projet +- core | +- src | +- webapp | +- pom.xml +- plugins | +- module-xxx | | +- src | | +- webapp | | +- pom.xml | +- module-xxx | +- plugin-xxx | | +- src | | +- webapp | | +- pom.xml | +- plugin-xxx | +- ... | +- pom.xml +- pom.xml
The only specificities lie in the POM :
the project packaging is set to pom :
<project>
...
<modelVersion>4.0.0</modelVersion>
<groupId>fr.paris.lutece</groupId>
<artifactId>lutece-parent-pom</artifactId>
<name>Lutece default Project</name>
<url>http://dev.lutece.paris.fr/</url>
<packaging>pom</packaging>
<version>2.9-SNAPSHOT</version>The modules of multi-project are declared in the section modules , in the following way :
<project>
...
<profiles>
...
<profile>
<id>multi-project</id>
<modules>
<module>core</module>
<module>plugins/plugin-formengine</module>
<module>plugins/module-formengine-etatcivil</module>
<module>plugins/plugin-document</module>
<module>plugins/plugin-library</module>
...
</modules>
</profile>
...
</profiles>Like the Lutece plugins, the Lutece multi-project provides an exploded deployment goal :
mvn lutece:exploded -P multi-project
This will:
retrieve the lutece-core artifact from the Maven repository;
install an exploded version of the core in target/lutece of multi-project;
install an exploded version of all plugins in target/lutece of multi-project;
copy any specified configuration files (see this page ).
In the end, target/lutece contains a Lutece instance with the core and all plugins installed. You can configure a Tomcat context on this directory to begin testing.
To provide to erase and to redeploy a multi-project in only one maven commands, Contrary to a classic project we can't use the enchainement of following maven command:
mvn clean lutece:exploded -P multi-project
Because this enchainement, deploy all modules and finish to erase the directory target of multi-project. We use the enchainement of following maven command:
mvn lutece:clean lutece:exploded -P multi-project
To avoid recompiling and redeploying all the modules of multi-project, we have the possibility of making it only on a single module. For that purpose, to place it directly in the directory of the module at the level of its pom.xml and to throwlaunch the following maven command:
mvn Lutece:exploded -DtestWebappDirectory="../../target/lutece"
for plugins.
mvn Lutece:exploded -DtestWebappDirectory="../target/lutece"
for core.