Client implementation having more then 100 transitive dependencies
I wrote a SiLA2 client for the LIMS LABS Suite connecting to a SILA2 Server with IP address endpoint
public static void operate(String endpoint, String ifc, String method,
List<JGtiInstrumentInformationType> informations,
List<JGtiInstrumentParameterType> parameters,
List<JGtiInstrumentOperationType> operations) throws InterruptedException {
Sila2GtiClient client = new Sila2GtiClient();
// start discovery
final Server server = ServerFinder
.filterBy(ServerFinder.Filter.host(endpoint))
.scanAndFindOne(Duration.ofMinutes(1))
.orElseThrow(() -> new RuntimeException("No Sila2Gti server found within time"));
final ManagedChannel serviceChannel = ChannelFactory.withEncryption(server);
try {
// Use the discovered channel
client.buildStub(serviceChannel);
client.operate(ifc, method, informations, parameters, operations);
System.out.println(String.format("processed on interface '%s' %d operation(s)", ifc, operations.size()));
} finally {
serviceChannel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
}
}
I needed to use the org.sila-standard.sila_java.library:manager dependency for Server, ServerFinder and ChannelFactory org.sila-standard.sila_java.library manager 0.0.3-SNAPSHOT org.projectlombok lombok 1.18.8 provided
this flooded my dependencies with more then 100 transitive dependencies