Core Setup Instructions - struct-by-lightning/wpi-suite GitHub Wiki

Note: your repository should be checked out to some directory that's not inside your eclipse workspace (e.g. ~/MQP/wpisuite). If your repository IS in your workspace, you're gonna have a bad time, since eclipse uses that directory for some config stuff and storage of any other projects you may have. You might accidentally commit things you shouldn't, or delete files that eclipse needs, which is bad.

Prerequisites (from Eclipse Classic Indigo)

  • Install Java 7 if you haven't already (sudo apt-get install openjdk-7-jdk)
  • You may need to tell Eclipse where Java 7 is: Window > Preferences > Java > Installed JREs > Add > Standard VM > type in JRE home (mine is /usr/lib/jvm/java-7-openjdk-amd64)
  • sudo apt-get install tomcat7
  • In Eclipse: Help > Install New Software > choose whatever eclipse update site you're using > Install:
    • Eclipse Java EE Developer Tools
    • Java Web Developer Tools
    • JST Server Adapters
    • JST Server Adapters Extensions
    • (I'm not entirely sure if these are all necessary, but it's what I ended up with)
  • Restart Eclipse

Checking out the new project layout from git

  • Make sure you have anything committed that you don't want to be blown away
  • git fetch or git pull, depending on your philosophical leanings
  • Check out locally whatever branch has the new layout on it (e.g. git checkout -b core-exemplar-integration-test origin/core-exemplar-integration-test)
  • Delete all of the projects from Eclipse
  • git clean -fd
  • Git Repository Explorer view > Right click repo > Import projects (this might require EGit)
  • Import all of the projects (make sure there is no "Core" project, just the projects within the core folder)

Configuring Tomcat stuff

Follow certain steps from here: http://lackovic.wordpress.com/2012/05/31/set-up-eclipse-and-tomcat-7-on-ubuntu-12-04-to-create-java-restful-web-services-with-jersey/ . Note that the install directory may be different on your system.

  • Do step 4 (make sure you're using a Java 7 jre).
  • If on Ubuntu 12.04, do steps 6, 7, 8, 9, 10, or else everything will be very broken.
  • Do steps 11, 12, and 13 (or whatever the equivalent is on your OS).

If you left everything else as default, the WPISuite project should be pointing to the server thing you just added, and there shouldn't be any errors in the project.

To Run The Server

  • Right click WPISuite project > Run as... > Run on Server
  • Select "Choose an existing server"
  • Select "Tomcat v7.0 Server on localhost"
  • You'll probably want to check off "Always use this server"
  • Click Next
  • Click the Add button to move WPISuite over to the configured side
  • Click finish

This should bring up the temp admin console at localhost:8080/WPISuite. Running the server to test it should now be super easy :)

⚠️ **GitHub.com Fallback** ⚠️