-
Notifications
You must be signed in to change notification settings - Fork 29
Development Setup
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.
- Install the latest version of STS 3 (>=3.5 ) from SpringSource
- Install JDK/OpenJDK 7 and set JAVA_HOME appropriately if you are on OS X
- 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)
- File -> Import
- Select Maven -> Existing Maven Projects
- Open the pom.xml from the subdirectory
- Repeat for each project
- Open HomeController.java from the proxyui project, right click in the main method and run or debug as Spring Boot
- Setup the host editor instance (Optional for a development setup)
- In /hostsedit run: mvn assembly:single
- Run: sudo java -jar /hostsedit/target/hostsedit-jar-with-dependencies.jar
- Install IntelliJ 13+
- Install JDK/OpenJDK 7 and set JAVA_HOME appropriately if you are on OS X
- Open the project in IntelliJ by opening the POM file in the root of the repo
- Setup 3 run configurations as follows:
- Type: Maven, Name: Build, Working Directory: (repo root), Command line: install
- 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
- Type: Remote, Name: Debug, Defaults for the rest of the fields
- Run the Maven "Run" configuration and wait for Spring Boot to load the app
- Run the Remote "Debug" configuration to connect the debugger if needed