2

I imported project in IntelliJ and then It downloaded all the dependency ,but it is still showing me red colour in pom.xml.

enter image description here

The red line it is showing me:

enter image description here

What is the problem in IntelliJ? How can I remove this red marker?

Ashwin Karki
  • 249
  • 4
  • 18

3 Answers3

1

In some cases, IntelliJ has this wired behavior. There are a few Solution to be taken

Execute following commands

mvn idea:clean
mvn idea:idea
mvn clean install

These 3 commands most probably solve dependency issues in IntelliJ. If it keeps failing clear Intellij Cache and restarts the application and try again with above commands

IsharaD
  • 322
  • 2
  • 4
  • 17
0

Actually Maven external libraries will be imported on Maven -> Reimport context command.

-1

You are using the wrong groupId for common-lang. Try this:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang</artifactId>
    <version>2.6</version>
</dependency>

But better use the lates common-lang3:

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.9</version>
</dependency>

You can check the lates versions in https://mvnrepository.com