Skip to content
Snippets Groups Projects
Commit 3ae5dce1 authored by Vincent Massol's avatar Vincent Massol
Browse files

XWIKI-1393: SVN reorganization to take into account the different XWiki products

* Factored the xwiki hibernate configuration file in a single place. This is done by generating a xwiki config resources jar and injecting it in the module that require it, using the Maven Remote Resources plugin.

* Next step: Do the same for xwiki.cfg

git-svn-id: https://svn.xwiki.org/svnroot/xwiki/xwiki-platform/xwiki-tools/trunk/xwiki-configuration-resources@3872 f329d543-caf0-0310-9063-dda96c69346f
parent 529bdc63
No related merge requests found
......@@ -27,14 +27,29 @@
<parent>
<groupId>com.xpn.xwiki.platform</groupId>
<artifactId>xwiki-tools</artifactId>
<version>1.2-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>
</parent>
<artifactId>xwiki-jetty-resources</artifactId>
<name>XWiki Platform - Tools - Jetty Configuration Resources</name>
<artifactId>xwiki-configuration-resources</artifactId>
<name>XWiki Platform - Tools - XWiki Configuration Resources</name>
<packaging>jar</packaging>
<description>
Packages a Jetty installation. This module is used to generate a valid Jetty installation.
In the future we should rather use Cargo for doing this (but some work has to be done on
Cargo before it's ready to be used).
Common XWiki resources for configuring XWiki. Contains config files like Hibernate
configuration, XWiki cfg file, etc. This module is meant to be used with the
Maven Remote Resources plugin in other build modules to inject a XWiki configuration.
</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Template for hibernate configuration. processing by maven using profiles.
Replace original src/main/webapp/WEB-INF/hibernate.cfg.xml -->
<hibernate-configuration>
<session-factory>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxActive">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWait">30000</property>
<property name="dbcp.whenExhaustedAction">1</property>
<property name="dbcp.ps.whenExhaustedAction">1</property>
<property name="dbcp.ps.maxActive">20</property>
<property name="dbcp.ps.maxWait">120000</property>
<property name="dbcp.ps.maxIdle">20</property>
<!-- Please refer to the installation guide on
http://www.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
database -->
<property name="connection.url">$xwikiDbConnectionUrl</property>
<property name="connection.username">$xwikiDbConnectionUsername</property>
<property name="connection.password">$!xwikiDbConnectionPassword</property>
<property name="connection.driver_class">$xwikiDbConnectionDriverClass</property>
<property name="dialect">$xwikiDbDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<!-- Mapping files -->
<mapping resource="$xwikiDbHbmXwiki"/>
<mapping resource="$xwikiDbHbmFeeds"/>
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database configurations.
Note that the database will be created automatically if it doesn't already exist.
<property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
-->
<!-- HSQLDB configuration.
Uncomment if you want to use HSQLDB and comment out other database configurations.
Note that the database will be created automatically if it doesn't already exist.
<property name="connection.url">jdbc:hsqldb:file:/some/path/xwikidb;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
-->
<!-- Oracle configuration.
Uncomment if you want to use Oracle and comment out other database configurations.
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.oracle.hbm.xml"/>
<mapping resource="feeds.oracle.hbm.xml"/>
-->
<!-- Derby configuration.
Uncomment if you want to use Derby and comment out other database configurations.
Note that the database will be created automatically if it doesn't already exist.
<property name="connection.url">jdbc:derby:/some/path/xwikidb;create=true</property>
<property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.derby.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
-->
</session-factory>
</hibernate-configuration>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment