Search code examples
javaeclipsemavenapache-flinkflink-streaming

apache flink not able to resolve imports


Hi iam working on the flink introduction but iam not able to import properly

import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.walkthrough.common.sink.AlertSink;
import org.apache.flink.walkthrough.common.entity.Alert;
import org.apache.flink.walkthrough.common.entity.Transaction;
import org.apache.flink.walkthrough.common.source.TransactionSource;

these above packages are not able to import i have used from the following site link

in this link i have imported the project via mvn command

please help me resolve this


Solution

  • I just tried this myself, and found that in order to run the application in my IDE (IntelliJ) I had to select the option under Run / Edit Configurations to 'Include dependencies with "Provided" scope'. Once I did that, everything worked fine.

    enter image description here

    I was able to build the application from the command line (via "mvn clean package") without making any changes.