Menu

Dev Environment Setup

Jack Liu
  1. Download all prerequisite software

  2. Install MySQL 5.x database, and then change "root" user's password to "passw0rd"

  3. Install Java 1.6 into any directory e.g. C:\ide\jdk1.6.0_27

  4. Extract Maven 2.2.1 to any directory e.g. C:\ide\apache-maven-2.2.1.

  5. Set environment variables

    • Set a new environment variable JAVA_HOME and the value is C:\ide\jdk1.6.0_27 in this example .
    • Update PATH environment variable to include C:\ide\jdk1.6.0_27\bin and C:\ide\apache-maven-2.2.1\bin.
  6. Install Git on Windows

  7. Clone all sources files into a working directory by running the command below in Git bash.
    git clone ssh://bjliujie@git.code.sf.net/p/dsvalid/mycode dsvalid-mycode

  8. Change jdbc properties at the bottom of pom.xml and make sure mysql root account and password match.

  9. Place webdefault.xml in C:. This is the customized configuration file for Jetty.

  10. Run "mvn jetty:run" and view the application at http://localhost:8080.

Import the project as an existing eclipse project

  1. Entering the project directory, like C:\sources\dsvalid-mycode

  2. Run the command below to change the current project an eclipse project. Two new files .classpath and .project will be generated after running the command.
    mvn eclipse:eclipse

  3. From Eclipse IDE, Click File - Import... , the Import Wizard dialog window will show up. Then select
    General - Existing Project into Workspace. Next, select your project root directory, Finish.

  4. Click Eclipse menu, Window - Preferences, then Java - Build Path - Classpath Variables
    . Add a new classpath variable named "M2_REPO" and point it to your Maven local repository, like "C:\Users\YOUR_LOGIN_NAME\.m2\repository" (it's a hidden directory so please make sure you have chosen to show all files on your Windows folder option)