2009-05-04 19:44:34 +02:00
|
|
|
* Database creation
|
|
|
|
|
-----------------
|
2009-04-14 17:51:03 +02:00
|
|
|
|
2009-06-11 18:54:29 +02:00
|
|
|
+ Current databases supported: PostgreSQL (default), MySQL, and
|
2009-05-04 21:13:22 +02:00
|
|
|
HSQLDB (In-Process/Standalone Mode).
|
2009-06-11 18:54:29 +02:00
|
|
|
|
2009-05-04 19:44:34 +02:00
|
|
|
+ For PostgreSQL and MySQL:
|
2009-06-11 18:54:29 +02:00
|
|
|
|
2009-05-04 19:44:34 +02:00
|
|
|
- Create a database with name "navaldev" (for development).
|
2009-06-11 18:54:29 +02:00
|
|
|
CREATE DATABASE navaldev;
|
|
|
|
|
- Create a database with name "navaldevtest" (for the test fase in
|
2009-05-04 19:44:34 +02:00
|
|
|
development).
|
2009-06-11 18:54:29 +02:00
|
|
|
CREATE DATABASE navaldevtest;
|
2009-05-04 19:44:34 +02:00
|
|
|
- Create user "naval" with password "naval" with necessary privileges for
|
2009-06-11 18:54:29 +02:00
|
|
|
accessing (creating tables, selecting data from tables, etc.) the
|
2009-05-04 19:44:34 +02:00
|
|
|
previous databases.
|
2009-06-16 15:49:45 +02:00
|
|
|
* PostgreSQL:
|
2009-06-11 18:54:29 +02:00
|
|
|
CREATE USER naval WITH PASSWORD 'naval';
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE navaldev TO naval;
|
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE navaldevtest TO naval;
|
2009-06-16 15:49:45 +02:00
|
|
|
* MySQL:
|
|
|
|
|
GRANT ALL ON navaldev.* to 'naval'@'localhost' identified by 'naval';
|
|
|
|
|
GRANT ALL ON navaldevtest.* to 'naval'@'localhost' identified by 'naval';
|
2009-06-11 18:54:29 +02:00
|
|
|
|
2009-05-04 21:13:22 +02:00
|
|
|
+ For HSQLDB. There is nothing to do.
|
2009-04-14 17:51:03 +02:00
|
|
|
|
|
|
|
|
* Compilation
|
|
|
|
|
-----------
|
|
|
|
|
|
|
|
|
|
+ Download Spring Framework 2.5.6.
|
|
|
|
|
|
|
|
|
|
+ mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta \
|
|
|
|
|
-Dversion=1.0.1B -Dpackaging=jar \
|
|
|
|
|
-Dfile=<<spring-framework-2.5.6>>/lib/j2ee/jta.jar
|
|
|
|
|
|
2009-06-18 18:21:04 +02:00
|
|
|
+ cd xestion-producion
|
2009-04-14 17:51:03 +02:00
|
|
|
|
|
|
|
|
+ mvn install
|
|
|
|
|
|
|
|
|
|
+ cd navalplanner-webapp
|
|
|
|
|
|
|
|
|
|
+ mvn jetty:run
|
|
|
|
|
|
|
|
|
|
+ Access to http://localhost:8080/navalplanner-webapp.
|
|
|
|
|
|
|
|
|
|
+ To install the web application in a web container, use the WAR file:
|
|
|
|
|
navalplanner-webapp/target/navalplanner-webapp.war
|
|
|
|
|
|
2009-05-04 21:13:22 +02:00
|
|
|
+ NOTES FOR USING OTHER DATABASES:
|
2009-06-11 18:54:29 +02:00
|
|
|
|
2009-05-04 21:13:22 +02:00
|
|
|
- MySQL:
|
|
|
|
|
|
|
|
|
|
* Remember to start MySQL with "--default-table-type=InnoDB" option for
|
|
|
|
|
enabling support for transactions.
|
|
|
|
|
|
|
|
|
|
* Use "mvn -Pdev,mysql <<goal|fase>>"
|
|
|
|
|
e.g. mvn -Pdev,mysql install
|
2009-06-11 18:54:29 +02:00
|
|
|
|
2009-05-04 21:13:22 +02:00
|
|
|
- HSQLDB:
|
|
|
|
|
|
|
|
|
|
* Use "mvn -Pdev,hsqldb <<goal|fase>>"
|
|
|
|
|
e.g. mvn -Pdev,hsqldb install
|
2009-04-14 17:51:03 +02:00
|
|
|
|
|
|
|
|
* Profiles
|
|
|
|
|
--------
|
2009-06-11 18:54:29 +02:00
|
|
|
|
2009-04-14 17:51:03 +02:00
|
|
|
Check <profiles> section in the root pom.xml to see the profile-based approach
|
|
|
|
|
used in the project. The default profiles (the one assumed by the above
|
2009-06-11 18:54:29 +02:00
|
|
|
instructions) are "dev" and "postgresql" (meaning "use PostgreSQL assuming a
|
2009-05-04 19:44:34 +02:00
|
|
|
development environment").
|