When developing on a Lutece project, you will handle two sets of configuration files:
the default configuration files: these are example files, which will be bundled in Lutece artifacts. They should not contain any value specific to your environment.
The default path to these files is src/conf/default .
the local configuration files: these files are used for your test webapps, they contain values specific to your development environment. These files must not be used outside your environment, and therefore are not included in Lutece artifacts.
The default path to these files is ${user.home}/lutece/conf/${project.artifactId} .
Hint - if you are not sure where that is, the absolute path is output when you run Maven :
[INFO] Local configuration directory is D:\Documents and Settings\YOUR_NAME\lute ce\conf\plugin-links
Both directories must use a directory structure similar to that of the webapp.
For instance, src/conf/default/WEB-INF/conf/db.properties will be copied in the webapp's WEB-INF/conf directory.
As stated before, configuration files will not be handled the same way between development mode and packaging. The following tables describe, for each project type, when and how each configuration is used :
lutece-core :
Goal | Default configuration | Local configuration |
---|---|---|
lutece:inplace | Copied to test webapp | Copied to test webapp |
package | Included in artifact | Ignored |
lutece-plugin :
Goal | Default configuration | Local configuration |
---|---|---|
lutece:exploded | Copied to test webapp | Copied to test webapp |
package | Included in artifact | Ignored |
lutece-site : a site project is targeted at a specific production site. Therefore, the configuration files are not generic and, as such, are placed directly in the webapp directory; there is no src/conf/default directory.
The local configuration mechanism is maintained for testing the site on a local machine.
Goal | Default configuration | Local configuration |
---|---|---|
lutece:exploded | Not applicable | Copied to test webapp |
package | Not applicable | Ignored |
Note : whenever both configurations are copied, the default configuration is copied first and then overwritten with the local configuration, therefore the local files take precedence.