ajiniesta / flink-connector-mqtt

Connector to MQTT in Flink
Apache License 2.0
22 stars 9 forks source link

Unable to build and run the examples #1

Open IshayLevy opened 6 years ago

IshayLevy commented 6 years ago

Also tried with flink 1.4.2

ajiniesta commented 6 years ago

How did you try to build the project?

With a simple$ mvn clean install the project is built properly. Please ensure you have a proper maven installation.

And about to run the examples, you need to have a sample Mqtt Broker to run them, but with the samples and running this you should be able to run a sample program.

$ java -cp target/flink-connector-mqtt-0.1.jar com.iniesta.flink.connector.mqtt.MqttWordCount2Mqtt
USAGE:
MqttWordCount2Mqtt <hostname> <topic IN> <topic OUT>

Please feel free to modify and customize for your needs.

IshayLevy commented 6 years ago

Hi, Maven 3.5.2 on Windows. With "mvn clean install" I'm getting:

C:\flink-connector-mqtt>mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Flink Connector for mqtt 0.1 [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.apache.flink:flink-java:jar:1.3.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging f or more details [WARNING] The POM for org.apache.flink:flink-streaming-java_2.10:jar:1.3.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ flink-connector-mqtt --- [INFO] Deleting C:\flink-connector-mqtt\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ flink-connector-mqtt --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ flink-connector-mqtt --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 10 source files to C:\flink-connector-mqtt\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /C:/flink-connector-mqtt/src/main/java/com/iniesta/flink/connector/mqtt/MqttSink.java:[3,38] package org.apache.flink.configuration does not e xist [ERROR] /C:/flink-connector-mqtt/src/main/java/com/iniesta/flink/connector/mqtt/MqttSink.java:[9,8] cannot access org.apache.flink.api.common.function s.Function class file for org.apache.flink.api.common.functions.Function not found [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.986 s [INFO] Finished at: 2018-05-21T11:30:22+03:00 [INFO] Final Memory: 14M/46M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project flink-connector-mqtt: Compilati on failure: Compilation failure: [ERROR] /C:/flink-connector-mqtt/src/main/java/com/iniesta/flink/connector/mqtt/MqttSink.java:[3,38] package org.apache.flink.configuration does not e xist [ERROR] /C:/flink-connector-mqtt/src/main/java/com/iniesta/flink/connector/mqtt/MqttSink.java:[9,8] cannot access org.apache.flink.api.common.function s.Function [ERROR] class file for org.apache.flink.api.common.functions.Function not found [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException