Reputation: 5106
I try to add the following dependency in my pom.xml
file:
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
However, the <version>
tag's content gets highlighted in red and the Dependency org.json:json:20180813 not found
error pops up:
Why does this happen and how to fix it?
Upvotes: 2
Views: 10715
Reputation: 41
I have made some test, and on my computer with fresh repositorys it is working, on the old one not.
In intellij go to settings (ctrl alt s) -> Build,execution,deployment -> Build Tools -> Maven -> Repositorys
Click on maven -> and update on the right corner.
Upvotes: 3
Reputation: 5106
cloud1's answer helped me out:
Try pressing 'Reimport All Maven Projects' button. It's the first button at Maven Projects tab (blue circle). Looks like this dependency wasn't downloaded from Internet yet.
Upvotes: 5