Getting import can not be resolved errors in maven project even though all the required dependencies have been added to the pom.xml. Here are the imports which are getting errored:
import org.apache.hadoop.fs.CreateFlag;
import org.apache.hadoop.fs.FileContext;
import org.apache.hadoop.fs.Options;
import org.apache.hadoop.fs.Options.CreateOpts;
And these are the dependencies that are there in pom.xml
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
Can someone please point out what could possibly be going wrong?
Thanks in advance!!
I tried all the possible options like removing old .m2 directory, update project, checked settings.xml etc but none of them seemed to help. So I finally installed the eclipse again and it worked! Seems like there was something wrong with the IDE but not sure what exactly was wrong.
Thanks everyone for responding with the possible options.