-
Notifications
You must be signed in to change notification settings - Fork 29
Development Setup
Garfie Chiu edited this page Feb 3, 2021
·
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+. Ultimate version has Spring debugging support so remaining steps are necessary only for Community version
- Install JDK/OpenJDK 7 and set JAVA_HOME appropriately if you are on OS X
- Open the project in IntelliJ by selecting the repository directory
- 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)
- Build Config
- Run the Gradle "Build" configuration. Gradle should generate a
.war
file in./proxyui/build/libs/
- Update the "Path to JAR" for the "Run" configuration after you build Odo.