Skip to end of metadata
Go to start of metadata
Table of Contents

Setting up ehour in eclipse for development

Development Environment Assumptions

  • Eclipse 3.4+
  • MySQL 5.x
  • Tomcat 5.5+
  • Maven 2

Plugins for eclipse

Configuring Sysdeo plugin and Tomcat

  1. Download the zip file for version 3.2.1 of the plugin here.
  2. Extract its contents into your eclipse/plugins directory.
    • This will create the directory eclipse/plugins/com.sysdeo.eclipse.tomcat_3.2.1 in this directory you will find the DevLoader.zip file. Extracts its contents into Tomcat's server/classes directory.

Download the code from SVN repository (using subclipse)

  1. Create a new workspace in eclipse, for example "eHour"
  2. Open the "SVN Repostiroy Exploring" perspective.
  3. Add a new Repository location and give it the http://svn.te-con.nl/repos/ehour/trunk URL.
  4. Right click on the repository and select "Checkout..."
  5. Select the "Check out as project in workspace" radio button and give it a name. (For example ehour_09).

Setting up your development workspace

After the above is done switch the eclipse workspace to be where you just downloaded the source. For example .../eclipseProjects/eHour/ehour_09. When you do you should have an empty workspace with no projects.

Now we need to create separate java projects for the 5 projects:

  • eHour-audit
  • eHour-persistence-domain
  • eHour-service
  • eHour-web
  • eHour-wicketweb

Create a new Java Project, give it the name "eHour-audit".
Select the "Create project from existing source" radio button and navigate to the eHour-audit folder under your workspace directory, then click finish.

Do the same for all 5 projects.

Configure eHour-web project with the Sysdeo plugin

For the eHour-web project go to properties -> Tomcat

  • Check the "Is a Tomcat Project" box
  • Set the context name to "ehour"
  • Set the "Subdirectory to set as webapp root" to "/src/main/webapp"

Under the "DevLoader Classpath" tab check the "Activate DevLoader" box and include all but the following:

  • /eHour-audit/target/test-classes
  • /eHour-service/target/test-classes
  • /eHour-wicketweb/target/test-classes
  • /eHour-web/target/test-classes
  • /eHour-wicketweb/target/test-classes
  • servlet-api-2.3.jar
  • stax-api-1.0.1.jar
  • xercesImpl-2.8.1.jar
  • xml-apis-1.3.03.jar

Set up the Tomcat context file

Under the directory where you downloaded the SVN repository there is an etc folder and under that folder there is a ehour_dev_tomcat_context.xml file. (eHour\ehour_09\etc\ehour_dev_tomcat_context.xml for the example).

Open this file and change the docBase and workDir attributes of the Context tag to point the proper location on your machine the example looks something like:

Then change the username, password and url of the Resource tag to point to your MySQL instance.

When you have made all the changes save this file to \conf\Catalina\localhost directory of your Tomcat directory as ehour.xml.

When this is done you should be able to start Tomcat from eclipse using the plugin and see it work.

Labels: