The IntelliJ cannot find the mysql-connector-java
dependency and hits error "unknown was not found"?
pom.xml
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
Terminal
mysql:mysql-connector-java:jar:unknown was not found in https://repo.maven.apache.org/maven2
during a previous attempt.
This failure was cached in the local repository and resolution is not reattempted until the
update interval of central has elapsed or updates are forced
Solution
Replace the old MySQL JDBC mysql-connector-java
dependency with this mysql-connector-j
dependency.
pom.xml
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
References
- MySQL Connector/J 8.1 Developer Guide
- Github mysql-connector-j
- Spring Boot + Spring data JPA + MySQL example
The post mysql-connector-java: unknown was not found appeared first on Mkyong.com.