You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2020/05/05 21:07:48 UTC
[incubator-streampipes-extensions] 01/01: Fix dependencies of new
connect package structure
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
commit 4a424c6cbfa7fab451ccd16c32d8d0655ec64c7a
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Tue May 5 23:06:55 2020 +0200
Fix dependencies of new connect package structure
---
pom.xml | 222 ++++++++++++++++++++-
streampipes-connect-adapters/pom.xml | 53 -----
streampipes-sinks-databases-jvm/pom.xml | 4 +-
.../sinks/databases/jvm/opcua/OpcUa.java | 18 +-
4 files changed, 227 insertions(+), 70 deletions(-)
diff --git a/pom.xml b/pom.xml
index 863a623..760e567 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,19 +64,30 @@
<streampipes.version>0.67.0-SNAPSHOT</streampipes.version>
<amqp-client.version>4.1.0</amqp-client.version>
+ <animal-sniffer-annotations.version>1.17</animal-sniffer-annotations.version>
<boofcv.version>0.33</boofcv.version>
+ <bcprov.version>1.61</bcprov.version>
<classindex.version>3.9</classindex.version>
+ <checker-qual.version>2.5.2</checker-qual.version>
<commons-math3.version>3.6.1</commons-math3.version>
+ <commons-compress.version>1.18</commons-compress.version>
+ <commons-text.version>1.4</commons-text.version>
<ditto-client.version>1.0.0</ditto-client.version>
<data-generator.version>1.4.1</data-generator.version>
<ddogleg.version>0.16</ddogleg.version>
+ <errorprone-annotations.version>2.2.0</errorprone-annotations.version>
<google-maps-services.version>0.10.0</google-maps-services.version>
<iotdb.version>0.8.0</iotdb.version>
+ <jackson.version>2.10.0</jackson.version>
+ <java-websocket.version>1.4.0</java-websocket.version>
+ <javax-validation.version>2.0.1.Final</javax-validation.version>
+ <javax-websocket-client-api.version>1.1</javax-websocket-client-api.version>
+ <jsrosbridge.version>0.2.0</jsrosbridge.version>
+
<language-detector.version>0.6</language-detector.version>
<log4j-to-slf4j.version>2.8.2</log4j-to-slf4j.version>
<mailapi.version>1.4.3</mailapi.version>
<metrics-core.version>3.1.2</metrics-core.version>
- <milo.version>2.22.1</milo.version>
<nekohtml.version>1.9.13</nekohtml.version>
<okhttp.version>3.13.1</okhttp.version>
<opennlp.version>1.9.0</opennlp.version>
@@ -92,10 +103,213 @@
<hawtbuf.version>1.11</hawtbuf.version>
<maven-shade-plugin.version>3.0.0</maven-shade-plugin.version>
+
+ <!-- Connect Dependencies-->
+ <animal-sniffer-annotations.version>1.17</animal-sniffer-annotations.version>
+ <bcprov.version>1.61</bcprov.version>
+ <checker-qual.version>2.5.2</checker-qual.version>
+ <commons-compress.version>1.18</commons-compress.version>
+ <commons-text.version>1.4</commons-text.version>
+ <errorprone-annotations.version>2.2.0</errorprone-annotations.version>
+ <java-websocket.version>1.4.0</java-websocket.version>
+ <javax-validation.version>2.0.1.Final</javax-validation.version>
+ <javax-websocket-client-api.version>1.1</javax-websocket-client-api.version>
+ <jsrosbridge.version>0.2.0</jsrosbridge.version>
+ <influxdb.java.version>2.14</influxdb.java.version>
+ <hadoop.version>3.2.1</hadoop.version>
+ <eclipse.milo.version>0.4.0</eclipse.milo.version>
+ <mysql-binlog-connector.version>0.18.1</mysql-binlog-connector.version>
+ <mysql-connector-java.version>8.0.15</mysql-connector-java.version>
+ <netty.version>4.1.39.Final</netty.version>
+ <nimbus-jose-jwt.version>4.41.1</nimbus-jose-jwt.version>
+ <opencsv.version>4.6</opencsv.version>
+ <plc4x.version>0.6.0</plc4x.version>
+ <protobuf.version>3.6.1</protobuf.version>
+ <pulsar.version>2.5.1</pulsar.version>
+ <slack.version>1.2.0</slack.version>
</properties>
<dependencyManagement>
<dependencies>
+ <!-- External Connect dependencies -->
+ <dependency>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-annotations</artifactId>
+ <version>${animal-sniffer-annotations.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ <version>${bcprov.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker-qual</artifactId>
+ <version>${checker-qual.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>${commons-compress.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-text</artifactId>
+ <version>${commons-text.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.java-websocket</groupId>
+ <artifactId>Java-WebSocket</artifactId>
+ <version>${java-websocket.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.websocket</groupId>
+ <artifactId>javax.websocket-api</artifactId>
+ <version>${javax-websocket-client-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>edu.wpi.rail</groupId>
+ <artifactId>jrosbridge</artifactId>
+ <version>${jsrosbridge.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.influxdb</groupId>
+ <artifactId>influxdb-java</artifactId>
+ <version>${influxdb.java.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-client</artifactId>
+ <version>${hadoop.version}</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jetty-server</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jetty-servlet</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jetty-servlets</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jetty-webapp</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jetty-util</artifactId>
+ <groupId>org.eclipse.jetty</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.milo</groupId>
+ <artifactId>sdk-client</artifactId>
+ <version>${eclipse.milo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.github.shyiko</groupId>
+ <artifactId>mysql-binlog-connector-java</artifactId>
+ <version>${mysql-binlog-connector.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>${mysql-connector-java.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-buffer</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-codec</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-common</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-transport</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.nimbusds</groupId>
+ <artifactId>nimbus-jose-jwt</artifactId>
+ <version>${nimbus-jose-jwt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.opencsv</groupId>
+ <artifactId>opencsv</artifactId>
+ <version>${opencsv.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.plc4x</groupId>
+ <artifactId>plc4j-api</artifactId>
+ <version>${plc4x.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.plc4x</groupId>
+ <artifactId>plc4j-driver-s7</artifactId>
+ <version>${plc4x.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>${protobuf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.pulsar</groupId>
+ <artifactId>pulsar-client</artifactId>
+ <version>${pulsar.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ullink.slack</groupId>
+ <artifactId>simpleslackapi</artifactId>
+ <version>${slack.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.errorprone</groupId>
+ <artifactId>error_prone_annotations</artifactId>
+ <version>${errorprone-annotations.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-sse</artifactId>
+ <version>${jersey.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!-- StreamPipes dependencies -->
<dependency>
<groupId>org.apache.streampipes</groupId>
@@ -235,11 +449,6 @@
<version>${nekohtml.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-milo</artifactId>
- <version>${milo.version}</version>
- </dependency>
- <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>${commons-math3.version}</version>
@@ -347,6 +556,7 @@
+
<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
diff --git a/streampipes-connect-adapters/pom.xml b/streampipes-connect-adapters/pom.xml
index b7f79c5..8c50250 100644
--- a/streampipes-connect-adapters/pom.xml
+++ b/streampipes-connect-adapters/pom.xml
@@ -30,31 +30,6 @@
<packaging>pom</packaging>
- <properties>
- <animal-sniffer-annotations.version>1.17</animal-sniffer-annotations.version>
- <bcprov.version>1.61</bcprov.version>
- <checker-qual.version>2.5.2</checker-qual.version>
- <commons-compress.version>1.18</commons-compress.version>
- <commons-text.version>1.4</commons-text.version>
- <errorprone-annotations.version>2.2.0</errorprone-annotations.version>
- <java-websocket.version>1.4.0</java-websocket.version>
- <javax-validation.version>2.0.1.Final</javax-validation.version>
- <javax-websocket-client-api.version>1.1</javax-websocket-client-api.version>
- <jsrosbridge.version>0.2.0</jsrosbridge.version>
- <influxdb.java.version>2.14</influxdb.java.version>
- <hadoop.version>3.2.1</hadoop.version>
- <milo.version>0.4.0</milo.version>
- <mysql-binlog-connector.version>0.18.1</mysql-binlog-connector.version>
- <mysql-connector-java.version>8.0.15</mysql-connector-java.version>
- <netty.version>4.1.39.Final</netty.version>
- <nimbus-jose-jwt.version>4.41.1</nimbus-jose-jwt.version>
- <okio.version>1.15.0</okio.version>
- <opencsv.version>4.6</opencsv.version>
- <plc4x.version>0.6.0</plc4x.version>
- <protobuf.version>3.6.1</protobuf.version>
- <pulsar.version>2.5.1</pulsar.version>
- <slack.version>1.2.0</slack.version>
- </properties>
<dependencies>
<!-- StreamPipes dependencies -->
@@ -68,67 +43,54 @@
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
- <version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.github.shyiko</groupId>
<artifactId>mysql-binlog-connector-java</artifactId>
- <version>${mysql-binlog-connector.version}</version>
</dependency>
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
- <version>${influxdb.java.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
- <version>${errorprone-annotations.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
- <version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
- <version>${nimbus-jose-jwt.version}</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
- <version>${opencsv.version}</version>
</dependency>
<dependency>
<groupId>com.ullink.slack</groupId>
<artifactId>simpleslackapi</artifactId>
- <version>${slack.version}</version>
</dependency>
<dependency>
<groupId>edu.wpi.rail</groupId>
<artifactId>jrosbridge</artifactId>
- <version>${jsrosbridge.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
- <version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
- <version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
- <version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
- <version>${netty.version}</version>
</dependency>
<dependency>
<groupId>org.fusesource.mqtt-client</groupId>
@@ -137,12 +99,10 @@
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
- <version>${javax-websocket-client-api.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
- <version>${mysql-connector-java.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@@ -151,17 +111,14 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
- <version>${commons-compress.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
- <version>${commons-text.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
- <version>${hadoop.version}</version>
<exclusions>
<exclusion>
<artifactId>jetty-server</artifactId>
@@ -200,43 +157,35 @@
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-api</artifactId>
- <version>${plc4x.version}</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-s7</artifactId>
- <version>${plc4x.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client</artifactId>
- <version>${pulsar.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
- <version>${bcprov.version}</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
- <version>${checker-qual.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
- <version>${animal-sniffer-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.milo</groupId>
<artifactId>sdk-client</artifactId>
- <version>${milo.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-sse</artifactId>
- <version>${jersey.version}</version>
<exclusions>
<exclusion>
<groupId>org.glassfish.jersey.core</groupId>
@@ -247,14 +196,12 @@
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
- <version>${java-websocket.version}</version>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
- <version>${wiremock.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
diff --git a/streampipes-sinks-databases-jvm/pom.xml b/streampipes-sinks-databases-jvm/pom.xml
index 6631d1b..6e911b0 100644
--- a/streampipes-sinks-databases-jvm/pom.xml
+++ b/streampipes-sinks-databases-jvm/pom.xml
@@ -88,8 +88,8 @@
<artifactId>iotdb-jdbc</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-milo</artifactId>
+ <groupId>org.eclipse.milo</groupId>
+ <artifactId>sdk-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.ditto</groupId>
diff --git a/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/opcua/OpcUa.java b/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/opcua/OpcUa.java
index 871a6fb..e7db8cf 100644
--- a/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/opcua/OpcUa.java
+++ b/streampipes-sinks-databases-jvm/src/main/java/org/apache/streampipes/sinks/databases/jvm/opcua/OpcUa.java
@@ -20,7 +20,7 @@ package org.apache.streampipes.sinks.databases.jvm.opcua;
import org.eclipse.milo.opcua.sdk.client.OpcUaClient;
import org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfig;
-import org.eclipse.milo.opcua.stack.client.UaTcpStackClient;
+import org.eclipse.milo.opcua.stack.client.DiscoveryClient;
import org.eclipse.milo.opcua.stack.core.security.SecurityPolicy;
import org.eclipse.milo.opcua.stack.core.types.builtin.*;
import org.eclipse.milo.opcua.stack.core.types.structured.EndpointDescription;
@@ -33,6 +33,7 @@ import org.apache.streampipes.wrapper.context.EventSinkRuntimeContext;
import org.apache.streampipes.wrapper.runtime.EventSink;
import java.util.Arrays;
+import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
@@ -61,15 +62,15 @@ public class OpcUa implements EventSink<OpcUaParameters> {
this.params = parameters;
- EndpointDescription[] endpoints;
+ List<EndpointDescription> endpoints;
try {
- endpoints = UaTcpStackClient.getEndpoints(serverUrl).get();
+// endpoints = UaTcpStackClient.getEndpoints(serverUrl).get();
+ endpoints = DiscoveryClient.getEndpoints(serverUrl).get();
- EndpointDescription endpoint = null;
-
- endpoint = Arrays.stream(endpoints)
- .filter(e -> e.getSecurityPolicyUri().equals(SecurityPolicy.None.getSecurityPolicyUri()))
+ EndpointDescription endpoint = endpoints
+ .stream()
+ .filter(e -> e.getSecurityPolicyUri().equals(SecurityPolicy.None.getUri()))
.findFirst().orElseThrow(() -> new Exception("no desired endpoints returned"));
OpcUaClientConfig config = OpcUaClientConfig.builder()
@@ -78,8 +79,7 @@ public class OpcUa implements EventSink<OpcUaParameters> {
.setEndpoint(endpoint)
.build();
- new OpcUaClient(config);
- opcUaClient = new OpcUaClient(config);
+ opcUaClient = OpcUaClient.create(config);
opcUaClient.connect().get();
} catch (Exception e) {