Hi Sebastien,
You need to add the dependency under a “dependencies” section, like so:
…
Then it should be working.
I would also recommend using the Flink quickstart Maven templates [1], as they
already have a well defined Maven project skeleton for Flink jobs.
Cheers,
Gordon
[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.4/quickstart/java_api_quickstart.html
On 19 April 2018 at 10:17:11 PM, Lehuede sebastien (lehued...@gmail.com) wrote:
Hi Guys,
I have created a project with Maven to try to send data from Kafka to Flink.
But when i try to build the project i have the following error :
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on
project processing-app: Compilation failure: Compilation failure:
[ERROR]
/env/mvn/test-0.0.1/processing-app/src/main/java/com/test/alpha/ReadFromKafka.java:[24,51]
package org.apache.flink.streaming.connectors.kafka does not exist
[ERROR]
/env/mvn/test-0.0.1/processing-app/src/main/java/com/test/alpha/ReadFromKafka.java:[52,63]
cannot find symbol
[ERROR] symbol: class FlinkKafkaConsumer011
Here is my "pom.xml" configuration for Flink Kafka connector :
1.4.2
1.8
2.11
${java.version}
${java.version}
org.apache.flink
flink-connector-kafka-0.11_${scala.binary.version}
${flink.version}
And here is the import line in my java file :
import org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer011;
Can anyone could help me with this issue ?
Regards,
Sebastien