Development Setup - groupon/odo GitHub Wiki

This section will go over how to setup STS (Spring Tool Suite)/IntelliJ 13 for proxy development. It assumes you have already checked the code out.

STS Setup

  1. Install the latest version of STS 3 (>=3.5 ) from SpringSource
  2. Install JDK/OpenJDK 7 and set JAVA_HOME appropriately if you are on OS X
  3. Import all maven projects individually into STS (it does not do well with aggregator POMs) - Each maven project is a subdirectory of the TestProxy directory (proxyui, proxylib, proxyserver, hostsedit, plugins, browsermob-proxy)
    1. File -> Import
    2. Select Maven -> Existing Maven Projects
    3. Open the pom.xml from the subdirectory
    4. Repeat for each project
  4. Open HomeController.java from the proxyui project, right click in the main method and run or debug as Spring Boot
  5. Setup the host editor instance (Optional for a development setup)
    1. In /hostsedit run: mvn assembly:single
    2. Run: sudo java -jar /hostsedit/target/hostsedit-jar-with-dependencies.jar

IntelliJ Setup (Community version)

  1. Install IntelliJ 13+. Ultimate version has Spring debugging support so remaining steps are necessary only for Community version
  2. Install JDK/OpenJDK 7 and set JAVA_HOME appropriately if you are on OS X
  3. Open the project in IntelliJ by selecting the repository directory
  4. Setup 2 run configurations as follows:
    • Build Config
      • Type: Gradle
      • Name: Build
      • Gradle project: odo (select the project root)
      • Tasks: bootWar
    • Run Config
      • Type: JAR Application
      • Path to JAR: [project root]/proxyui/build/libs/proxyui-[version].war (Fill in the brackets)
      • VM options: -Xmx1024m
      • Working directory: [project root] (Fill in the brackets)
      • JRE: Default (or manually set a different Java version if you're testing that)
  5. Run the Gradle "Build" configuration. Gradle should generate a .war file in ./proxyui/build/libs/
  6. Update the "Path to JAR" for the "Run" configuration after you build Odo.
⚠️ **GitHub.com Fallback** ⚠️