-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathbuild_instructions.txt
33 lines (24 loc) · 1.7 KB
/
build_instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Locanda Build Guide (with Maven)
-Clone the project from GitHub (https://github.com/labos/locanda)
-In the project root, there are three .properties file to be customized:
-global.properties -> resources paths
-h2.properties -> H2 connection parameters (default)
-mysql.properties -> mySQL connection parameters
-To deploy the webapp, in the shell from the project directory type:
-mvn clean install to create the build in Locanda_Target folder
-mvn clean tomcat7:deploy to create the build in Locanda_Target folder and deploy it in a running Tomcat7 server
-To accomplish the latter task, you need to:
-configure your Tomcat server in ${tomcat.home}/conf/tomcat-users.xml by adding a user with the roles "manager-script" and "manager-gui"
-edit the Maven user config file (${user.home}/.m2/settings.xml) uncommenting the "server" tag and putting "tomcat_server" as id and your manager username and password, like this:
<server>
<id>tomcat_server</id>
<username>tomcat</username>
<password>tomcat</password>
</server>
-When using the default H2 database, you can:
-allow the webapp to automatically create an empty H2 DB at the startup, according to the name and path defined in pom.xml, and then use the locanda.hsql dump file to populate it
-copy the already populated DB file (h2/locanda.h2.db) in the path defined in pom.xml (the db name must be "locanda" in this case)
-If you wish to use the MySQL db, you can deploy Locanda using the MySQL profile. Just run Maven with the command:
-mvn clean tomcat7:deploy -Pmysql
...and the config files will be set with the proper MySQL parameters from mysql.properties.
You need a running MySQL server with a populated locanda DB.