Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter


(Mark Goodrich) #1

Just ran into this issue when trying to run Maven tests on one of our modules.

Looks like due to a bug in the latest Java OpenJDK release:

Following one of the suggests in the above post, I added this flag to the surefire configuration and it did appear to resolve the issue:

-Djdk.net.URLClassPath.disableClassPathURLCheck=true

for example, see:

fyi @dkayiwa it looks like you may have run into this with the REST module today.


(Daniel Kayiwa) #2

As you can see here: New Bamboo agent available for tests

We have been using this successfully to all modules: https://github.com/openmrs/openmrs-module-webservices.rest/commit/9f146c8f80878e00244921dcb1fb931dafb61072

But it turned out to introduce more test failures for the webservices rest module. So i have instead applied your fix and it worked: https://github.com/openmrs/openmrs-module-webservices.rest/commit/932ea5da9355faa1d9e87ec495356e53cf9f49c7

Thanks @mogoodrich :slight_smile:

cc @cintiadr