Skip to content
djrenfro edited this page Sep 28, 2015 · 8 revisions

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

  1. Install IntelliJ 13+
  2. Install JDK/OpenJDK 7 and set JAVA_HOME appropriately if you are on OS X
  3. Open the project in IntelliJ by opening the POM file in the root of the repo
  4. Setup 3 run configurations as follows:
    1. Type: Maven, Name: Build, Working Directory: (repo root), Command line: install
    2. Type: Maven, Name: Run, Working Directory: (repo root)/proxyui, Command line: spring-boot:run "-Drun.jvmArguments=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005", Before Launch: 'Another Configuration' - Build
    3. Type: Remote, Name: Debug, Defaults for the rest of the fields
  5. Run the Maven "Run" configuration and wait for Spring Boot to load the app
  6. Run the Remote "Debug" configuration to connect the debugger if needed
Clone this wiki locally