Issue
As shown in following screenshot a maven library is marked as red - even though it does exist in local maven repo
/Users/steve/.m2/repository/com/typesafe/akka/akka-remote_2.10/2.2.3/akka-remote_2.10-2.2.3.jar
src="https://i.stack.imgur.com/4kirj.png" alt="enter image description here">
But that file does exist on the local filesystem: Here it is on the local file system
21:43:12/scaladem:35 $ls -l /Users/steve/.m2/repository/com/typesafe/akka/akka-remote_2.10/2.2.3/akka-remote_2.10-2.2.3.jar
-rw-r--r-- 1 steve staff 1277288 Feb 21 21:42 /Users/steve/.m2/repository/com/typesafe/akka/akka-remote_2.10/2.2.3/akka-remote_2.10-2.2.3.jar
Here are maven entries in pom.xml
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.10</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote_2.10</artifactId>
<version>2.2.3</version>
</dependency>
Note also:
mvn package
works fine from the command line
Solution
It just happened to me. Re-import didn't work. I solved it by
- Remove your dependency from the POM
- Save the POM (assume you have "Enable Auto-Import", if not, check "Import Maven projects automatically" from settings)
- Add the dependency back
It is basically re-import, but it does the magic for me. Good luck.
Answered By - Man Coding
Answer Checked By - Mildred Charles (JavaFixing Admin)