DockerClient and Jersey Versioning Bug
Just wanted to start a tracker for this to report resultant fix:
Naively adding the 3.1.1 spotify-docker-client from Orbit to our target causes an error with HTTP posts during Moose real-time plot updating. This is because the docker client relies on JAX-RS 2.0, while ICE uses Jersey 1.17 for its HTTP server functionality. This clash causes the 2.0 javax.ws.rs bundle to get activated and used, leading to an AbstractMethodException on a URIBuilder invocation.
Turns out this didn't used to be an issue before spotify-docker-client 2.7.6, when the default jar was shaded, it had it's dependencies bundled into the main jar. The docker-client README states that if you use Jersey 1.x in your project, you need to depend on the shaded docker-client jar, in your POM you would have
<dependency> <groupId>com.spotify</groupId> <artifactId>docker-client</artifactId> <classifier>shaded</classifier> <version>3.1.1</version> </dependency>
<dependency> <groupId>com.spotify</groupId> <artifactId>docker-client</artifactId> <version>3.1.1</version> </dependency>
Unfortunately Orbit does not provide this shaded version of the plugins. Luckily, using a pretty cool project called p2-maven-plugin https://github.com/reficio/p2-maven-plugin, I have created a p2 update site for it, and put it on eclipseice.ornl.gov.
I can report that pointing our target to that p2 site, reloading the target, and running ICE, I can run the real-time updater in the Moose Item, with the docker-client plugin added to the run configuration.