...
- Install Maven
- In a terminal go into the folder giles-{version}/giles-spring
- You need only one command to build Giles:
mvn clean package
. This will delete all previous built files and generate a war file. However, you need to specify the above listed properties for Giles to work correctly. - To specify a property when running Maven, the easiest way is to append
-D{property_name}={property_value}
. For example, if your database user is called "giles", then you would append-Ddb.user=giles
to the Maven command. The complete command would look like this:mvn clean package -Ddb.user=giles
. Append each property to the command like described in step 4. You complete command string will look something like this:
mvn clean package -Ddb_files=/path/to/db/files -Dadmin.password=GilesPassword -Dgithub.clientId=githubClientId -Dgithub.secret=githubClientSecret -Ddb.driver=com.mysql.jdbc.Driver -Ddb.database.url=jdbc:mysql://localhost:3306/giles -Ddb.user=giles -Ddb.password=GilesDbPassword -Ddigilib.url=http://myserver.org/digilib/servlet/Scaler -DdigilibBaseDir=/path/to/digilib/images -Djars.url=http://myserver.org/jars -Dgiles.base.url=http://myserver.org/giles
Maven will create a new folder in giles-spring called
target
. Inside this folder If Maven ran successfully you will find a find a file calledgiles.war
if Maven ran successfully inside this folder.- Simply put
giles.war
into your Tomcat's webapp directory and you should be good to go!
...