-
Templating and Integration Guide
- Part 1: Concepts
- Part 2: Modules
- Part 3: Templates and Studio
- Part 4: Content Definitions and Views
- Part 5: Advanced Techniques
- Part 6: Setting up an integration environment
- Part 7: Step by step integration
- Further reading and resources
Maven External Configuration
Here is the configuration using profiles.xml with maven 2.
You should first activate your maven profiles. Here is an example of how to set your conf/settings.xml
<settings>
<localRepository>C:/package/m2_repo</localRepository>
<activeProfiles>
<activeProfile>jahia6</activeProfile>
<activeProfile>configure</activeProfile>
<!-- <activeProfile>artifactory</activeProfile>-->
</activeProfiles>
<pluginGroups>
<pluginGroup>org.jahia.server</pluginGroup>
</pluginGroups>
</settings>
<localRepository>C:/package/m2_repo</localRepository>
<activeProfiles>
<activeProfile>jahia6</activeProfile>
<activeProfile>configure</activeProfile>
<!-- <activeProfile>artifactory</activeProfile>-->
</activeProfiles>
<pluginGroups>
<pluginGroup>org.jahia.server</pluginGroup>
</pluginGroups>
</settings>
Once your profiles activated, you need to define them in a profiles.xml file. This profiles.xml needs to be created in the root folder of your maven Project (template set or module).
Here is an example of profiles.xml:
<profilesXml>
<profiles>
<profile>
<id>configure</id>
<properties>
<jahia.configure.active>true</jahia.configure.active>
<jahia.configure.databaseType>mysql</jahia.configure.databaseType>
<jahia.configure.databaseUrl>jdbc:mysql://localhost/jahia?useUnicode=true&characterEncoding=UTF-8&useServerPrepStmts=false</jahia.configure.databaseUrl>
<jahia.configure.databaseUsername>root</jahia.configure.databaseUsername>
<jahia.configure.databasePassword>password</jahia.configure.databasePassword>
<jahia.configure.localIp>127.0.0.1</jahia.configure.localIp>
<jahia.configure.developmentMode>true</jahia.configure.developmentMode>
<jahia.configure.outputContainerCacheActivated>false</jahia.configure.outputContainerCacheActivated>
<jahia.deploy.processingServer>true</jahia.deploy.processingServer>
</properties>
</profile>
<profile>
<id>jahia65</id>
<properties>
<jahia.deploy.targetServerType>tomcat</jahia.deploy.targetServerType>
<jahia.deploy.targetServerVersion>6</jahia.deploy.targetServerVersion>
<jahia.deploy.targetServerDirectory>/usr/local/package/jahia_install_dir/tomcat</jahia.deploy.targetServerDirectory>
<jahia.deploy.war.dirName>ROOT</jahia.deploy.war.dirName>
<jahia.deploy.war.contextPath>/</jahia.deploy.war.contextPath>
<jahia.deploy.war.servletPath>/cms</jahia.deploy.war.servletPath>
<jahia.debug.address>socket:hostname=localhost,port=5005</jahia.debug.address>
<jahia.test.url>http://localhost:8080</jahia.test.url>
</properties>
</profile>
</profiles>
</profilesXml>
<profiles>
<profile>
<id>configure</id>
<properties>
<jahia.configure.active>true</jahia.configure.active>
<jahia.configure.databaseType>mysql</jahia.configure.databaseType>
<jahia.configure.databaseUrl>jdbc:mysql://localhost/jahia?useUnicode=true&characterEncoding=UTF-8&useServerPrepStmts=false</jahia.configure.databaseUrl>
<jahia.configure.databaseUsername>root</jahia.configure.databaseUsername>
<jahia.configure.databasePassword>password</jahia.configure.databasePassword>
<jahia.configure.localIp>127.0.0.1</jahia.configure.localIp>
<jahia.configure.developmentMode>true</jahia.configure.developmentMode>
<jahia.configure.outputContainerCacheActivated>false</jahia.configure.outputContainerCacheActivated>
<jahia.deploy.processingServer>true</jahia.deploy.processingServer>
</properties>
</profile>
<profile>
<id>jahia65</id>
<properties>
<jahia.deploy.targetServerType>tomcat</jahia.deploy.targetServerType>
<jahia.deploy.targetServerVersion>6</jahia.deploy.targetServerVersion>
<jahia.deploy.targetServerDirectory>/usr/local/package/jahia_install_dir/tomcat</jahia.deploy.targetServerDirectory>
<jahia.deploy.war.dirName>ROOT</jahia.deploy.war.dirName>
<jahia.deploy.war.contextPath>/</jahia.deploy.war.contextPath>
<jahia.deploy.war.servletPath>/cms</jahia.deploy.war.servletPath>
<jahia.debug.address>socket:hostname=localhost,port=5005</jahia.debug.address>
<jahia.test.url>http://localhost:8080</jahia.test.url>
</properties>
</profile>
</profiles>
</profilesXml>
Detailled informations can be found on http://maven.apache.org/guides/introduction/introduction-to-profiles.html

