英文:
Spring Boot Maven project will not download the latest Oracle ojdbc8 .jar file when I add the newest <dependency>
问题
我无法将我的 Oracle ojdbc 驱动程序更新到最新版本,用于我的 Oracle 数据库。
我正在将我的 pom.xml 文件更新为我 19c 版本的 Oracle 数据库的最新版本,但在保存后,它不会将最新的 .jar 文件添加到我的 Maven 依赖项中。它会在 c:-temp-com-oracle 文件夹结构中创建文件夹,但没有 .jar 文件。
我对此有些陌生,不太确定我错过了什么。我的理解是,Spring Boot 应该根据 pom 文件自动下载正确的依赖项。
谢谢您的任何帮助。
信息
Java 版本 1.8
Oracle 19c 数据库
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
之前的版本(没有任何问题的版本)
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
英文:
I am unable to update my Oracle ojdbc driver to the newest version for my oracle database.
I am updating my pom.xml file to the newest version for my 19c oracle database and after its saved it does not add the newest .jar file to my maven dependencies. It creates the folder in the c:-temp-com-oracle folder structure but no .jar file
I am somewhat new to this and not sure what I am missing. My understanding is that spring boot should automatically download the correct dependencies according to the pom file.
Thank you for any assistance.
INFO
Java Version 1.8
Oracle 19c DB
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
Previous Version (that worked with no issues)
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
答案1
得分: 4
你的组ID有误,请使用正确的Maven Central依赖:https://search.maven.org/artifact/com.oracle.ojdbc/ojdbc8/19.3.0.0/jar
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
需要注意的是,从2019年9月开始,Oracle的ojdbc驱动现在在Maven Central仓库中发布:
https://medium.com/oracledevs/oracle-jdbc-drivers-on-maven-central-64fcf724d8b
英文:
You have a wrong group id, correct dependency on maven central: https://search.maven.org/artifact/com.oracle.ojdbc/ojdbc8/19.3.0.0/jar
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
Note that since september 2019, ojdbc drivers are now published on maven central repo by Oracle:
https://medium.com/oracledevs/oracle-jdbc-drivers-on-maven-central-64fcf724d8b
答案2
得分: 0
这实际上与我在远程工作时的代理设置有关。在我的settings.xml正确更新之后,我就没有任何问题了。我也更新了groupId,谢谢。
英文:
It actually had to do with my Proxy Settings while working remotely. After my settings.xml was updated correctly I had no issues. I did update the groupId as well, thanks
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论