gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.77k stars 352 forks source link

Improve Mockserver dependency setup #2951

Closed GCHQDeveloper314 closed 1 year ago

GCHQDeveloper314 commented 1 year ago

Describe the new feature you'd like Fix use of the Mockserver dependency to either use the latest version (by changing to a different kind of dependency) or by removing the dependency itself. groupId:org.mock-server artifactId:mockserver-netty

Why do you want this feature? It is used only by a single test class in store (GetFromEndpointHandlerTest.java) and the version used is very old. This version can't be upgraded directly because all newer versions cause conflicts with Guava. Another dependency we are already using might provide the functionality required for this test class.

Describe alternatives you've considered Upgrading version of this dependency, which does not work.

Additional context I discovered this when trying #2950.

GCHQDeveloper314 commented 1 year ago

Another problem which appears to be caused by this dependency is this message seen when running the Spring REST.

Found multiple occurrences of org.json.JSONObject on the class path:

    jar:file:/home/runner/.m2/repository/org/json/json/20211205/json-20211205.jar!/org/json/JSONObject.class
    jar:file:/home/runner/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class
GCHQDeveloper314 commented 1 year ago

The Spring REST problem above is not caused by this dependency. A separate issues has been raised for that.

The easier fix is to change the mockserver dependency type, this then allows the latest version to be used. Original comment amended to clarify that it doesn't need to be removed.