Works with Eclipse 2019-06
How To Run the Testbed in Eclipse with Jetty 9.4
Install Jetty (download and unpack
The version of Jetty should match the
jetty.versionproperty in the testbed POM (
The Jetty installation directory should be set as the
jetty.homesystem property in the Eclipse Launcher when running the testbed's Main.java, see Program Arguments below.
java-idp-jetty-basesource code repositories as peers in the same directory :
Optionally, clone additional source code repositories :
Import projects into Eclipse :
File > Import > Maven > Existing Maven Projects
Assemble third party dependencies by building the IdP WAR and removing IdP JARs :
Optionally remove additional JARs :
Download logging and testbed dependencies and add to the Jetty server classpath :
Run the testbed in Eclipse as a Java Application :
idp-testbedproject, right-click on
idp-testbed-jetty-9.4.launch > Run As > Java Application
- Go to the testbed webapp :
You will probably want to change the root logging level from
Why is Jetty 9.4 different than 9.3 ?
Running the IdP testbed in Eclipse with Jetty version 9.4 requires classpath changes.
I believe this is because :
The code that was changed in 9.4, is that we no long look to load classes/resources from the same classloader that loader jetty. That was really just encouraged code to not properly set the thread context classloader.
For this method to work for you, then the class you are looking for needs to either be on the system classpath or visible to a Classloader that is set as the current thread context classloader. If executed from within a webapp, you will have a classloader that is able to see WEB-INF classes, but jetty and some system classes are hidden from it.
This is a deliberate change, which I think is the correct way to go. However, we are open to understand your use-case of why we may need to search a bit harder for classes, so please describe your classloader setup and classpath.
Example Eclipse Launcher
To create an Eclipse Launcher manually :
Use Eclipse Launcher "Program arguments" not "VM arguments"
Main.java > Run As > Java Application
Eclipse Launcher program arguments :
Eclipse Launcher working directory :
Example Eclipse Launcher :