Reputation: 73
The title says it all really, my pom is shown below:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>CouncillorsApp</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.12.6</version>
</dependency>
</dependencies>
</project>
The following error is given:
"Dependency 'org.mongodb:mongodb-driver-sync:3.10.2' not found"
I'm using Java 14.0.2 and the latest version of IntelliJ
Upvotes: 1
Views: 8561
Reputation: 41
On the right side of the IDEA, click Maven
Click blue circled button
.
Then dependencies should throw no more errors.
Upvotes: 1
Reputation: 119
If you are working on VPN for different environments, please make sure it is connected to the environment of your data. This happened with me.
Upvotes: 0
Reputation: 73
So after restarting IntelliJ the above code seems to work fine. I'm unsure of where the issue was, but the dependency is being found now without any changes to the pom.
Upvotes: 1
Reputation: 560
please read installation
you can try this
<dependencies>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.12.6</version>
</dependency>
</dependencies>
Upvotes: 1