This page is under construction.
Download and install Maven.
Don't forget to add the ${MAVEN_HOME}/bin directory to your system path.
Create the database.
mysql> create database mindoro;
Create an account with sufficient privileges.
mysql> grant all on mindoro.* to 'mindoro'@'localhost' identified by 'mindoro';
Set up the Tomcat manager account. You'll need to edit the build.properties file to reflect your local tomcat manager username and password.
Set up the Tomcat datasource. You'll need to edit your $TOMCAT_HOME/conf/server.xml file and add the following resource context:
<!-- JDBC Datasource to Mindoro database --> <Context path="/mindoro" docBase="mindoro" debug="5" reloadable="true" crossContext="true"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_mindoro_log." suffix=".txt" timestamp="true"/> <Resource name="jdbc/mindoroDb" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/mindoroDb"> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <!-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. --> <parameter> <name>maxActive</name> <value>20</value> </parameter> <!-- Maximum number of idle dB connections to retain in pool. Set to -1 for no limit. See also the DBCP documentation on this and the minEvictableIdleTimeMillis configuration parameter. --> <parameter> <name>maxIdle</name> <value>10</value> </parameter> <!-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. --> <parameter> <name>maxWait</name> <value>10000</value> </parameter> <!-- MySQL dB username and password for dB connections --> <parameter> <name>username</name> <value>mindoro</value> </parameter> <parameter> <name>password</name> <value>mindoro</value> </parameter> <!-- Class name for the official MySQL Connector/J driver --> <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> </parameter> <!-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. --> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/mindoro?autoReconnect=true</value> </parameter> </ResourceParams> </Context>
Copy the Java Transaction API (JTA) jar and the MySQL JDBC connector jar into $TOMCAT_HOME/common/lib.
Startup Tomcat.
Edit build.properties file to reflect your Tomcat manager username and password:
maven.repo.remote=http://www.ibiblio.org/maven,http://xdoclet.sourceforge.net/repository,http://www.codeczar.com/maven maven.tomcat.username=manager maven.tomcat.password=manager
Install the Maven Hibernate plugin:
maven plugin:download -DgroupId=maven -DartifactId=maven-hibernate-plugin -Dversion=1.3
Install the Maven XDoclet plugin:
maven plugin:download -DartifactId=maven-xdoclet-plugin -DgroupId=xdoclet -Dversion=1.2.1
Install the Maven Tomcat Deployment plugin:
maven -DartifactId=maven-tomcat-plugin -DgroupId=codeczar-tomcat -Dversion=1.1 plugin:download
Hibernate requires the Java Transaction API or JTA. Due to licensing restrictions, the JTA can't be distributed through the ibiblio Maven repository. Instead, you'll have to download the JTA reference implementation directly from Sun and install it into your local Maven repository manually.