The Hibernate STK makes use of two of the profiles generated by AndroMDA within the top-level pom.xml : the default profile and the validation (val) profile. The default profile should contain all of the connection details for your main database, while the validation profile should contain all of the details for your unit testing and general testing database.
In this way, you don't have to constantly be changing the values in your pom.xml when you are switching between a testing environment and your normal environment. This page shows you how to set the values for each of these profiles.
The default profile is identified within the pom.xml with the term "local" and the default activation setting:
[...] <profiles> <profile> <id>local</id> <activation> <activeByDefault>true</activeByDefault> </activation> [...]
The testing profile is identified within the pom.xml with the term "validation" (short name "val"):
[...] <profile> <id>validation</id> <activation> <property> <name>env</name> <value>val</value> </property> </activation> [...]
By default, no unit tests will be performed when the default (local) profile is in use. If you plan to run the unit tests, then please make both a default and a test database using the steps below.
If you wish to use any of the other two available profiles, then please do. Currently, the STK makes no use of them.
Create a database inside your chosen DBMS entitled, for example, "fuge". You will also need to have access to a database user that is the owner of this database, e.g create a new user called "fuge" that you use specifically for accessing and modifying the metadata database. Modify the following elements in the top-level pom.xml located at your-checkout/trunk/pom.xml for the profile with the "local" id. This will change the jdbc connection details to a value suitable for your database connection, and also provide the STK with your database username and password:
<jdbc.url> </jdbc.url> <jdbc.username></jdbc.username> <jdbc.password></jdbc.password>
Modify the following elements in the top-level pom.xml located at your-checkout/trunk/pom.xml for the profile with the "local" id. This will ensure that the STK is pointed at the appropriate location for your jdbc jar and the appropriate class name for your jdbc driver:
<jdbc.driver> </jdbc.driver> <jdbc.driver.jar> </jdbc.driver.jar>
The values of these elements will depend on what database type you've chosen to use. For example, the value of jdbc.driver would be org.postgresql.Driver for PostgreSQL, and com.mysql.jdbc.Driver for MySQL.