Skip to content

Installation procedure for Windows

Alexis Miara edited this page Apr 11, 2014 · 3 revisions

Requirements

Install required products as explain in their documentation.

Development environment

  • Git version control system
  • JDK 1.7
  • Apache Maven
  • ​Apache Ant

Runtime Environment

  • ​Tomcat 7.0

Set the following Environement Variables related to the previous installation:

JAVA_HOME
TOMCAT_HOME
CATALINA_HOME (should be the same value as TOMCAT_HOME)
CATALINA_OPTS with value : -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

Source Code download

Launch a command-line interpreter and type the following command to download the source code:

git clone https://github.com/GTN-Quebec/oeaf.git

An oeaf folder will be created with all the source code in your current location. This oeaf directory will be referenced as $OEAF_SRC.

Build the application

  • Generate the main config file with the following commands:
cd $OEAF_SRC 
ant sample-config
  • Adjust the config

Edit $OEAF_SRC/src/main/core.properties file and adjust values with your own settings.

PS: In Windows, catalina.home and catalina.base have the same value.

  • Build it

Before compiling the whole project or a specific module, it's recommended to stop Tomcat. Failing to do can make a Tomcat contexts to disappear.

Type the command:

mvn clean package

Deploy the application

There are many ways to deploy the web applications within Tomcat. The 2 most popular are either by deploying the war files into Tomcat's webapps directory or by defining Tomcat context files pointing to the target directories that are built by Maven.

  • If you choose the first option, the location of the webapps directory is TOMCAT_HOME/webapps. Drop the generated war file ($OEAF_SRC/target/proeaf-VERSION.war) into it. Rename it simply proeaf.war for easier use.

  • For development, the second option is more convenient. You can create the context file by typing the command:

ant deploy-proeaf

Start the application

Start the Tomcat server and try the link:

http://localhost:8080/proeaf