Assembling Lutece sites

Project layout

The specific packaging for Lutece sites is lutece-site :

<project>
        ...
        <groupId>com.mycompany</groupId>
        <artifactId>myLuteceSite</artifactId>
        <packaging>lutece-site</packaging>
        <version>1.0</version>

To create a Lutece site, you need a Lutece core and (optionnally) a set of plugins ; they are expressed as Maven dependencies:

<project>
        ...
        <dependencies>
                ...
                <dependency>
                        <groupId>fr.paris.lutece</groupId>
                        <artifactId>lutece-core</artifactId>
                        <version>2.0.0</version>
                        <type>lutece-core</type>
                </dependency>
                <dependency>
                        <groupId>fr.paris.lutece</groupId>
                        <artifactId>lutece-foobar-plugin</artifactId>
                        <version>1.0</version>
                        <type>lutece-plugin</type>
                </dependency>

Since no java development is required to assemble a site, the project only contains a webapp source directory, with all the files specific to your site: configuration files, skins, downloads, etc.

Testing

As with Lutece plugins, you can run the lutece:exploded goal to assemble an exploded webapp in target/lutece :

mvn lutece:exploded

The files copied in that directory will be, in that order:

  • the files from the lutece-core artifact;

  • the files from lutece-plugin artifacts;

  • the files from the project's webapp directory;

  • your local configuration, if available (see this page ).

Generate Lutece site distribution

When you are satisfied with your test webapp, you can generate the WAR file with the site-assembly phase. It is advised that you run clean before, to make sure the WAR does not contain any development-specific files:

mvn clean lutece:site-assembly

For sites, this phase is bound to the lutece:site-assembly mojo, which will generate the familiar Lutece WAR in the target directory.