我已经用Java 8开发了一个项目,并在使用Java 8开发该项目时在Maven中安装了ojdbc jar。现在我正在将项目转换为Java 7。在这样做时,我遇到了在pom.xml中的ojdbc.jar依赖项的问题。它显示:
缺少com.oracle:ojdbc7:jar:12.1.0
在oracle依赖标签中。当我尝试运行ojdbc jar的mvn install时,也会出现错误。
[ERROR] Failed to execute goal on project SlotBookingAvailability: Could not resolve dependencies for project org.logicInfo.oms:SlotBookingAvailability:war:0.0. 1-SNAPSHOT: Failure to find com.oracle:ojdbc7:jar:12.1.0 in https://repo.maven.a pache.org/maven2 was cached in the local repository, resolution will not be reat tempted until the update interval of central has elapsed or updates are forced.
pom.xml
<?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.logicInfo.oms</groupId>
<artifactId>SlotBookingAvailability</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>SlotBookingAvailability</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<start-class>org.logicInfo.oms.SlotBookingAvailability.SlotBookingAvailabilityApplication</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
有人能帮我解决这个问题吗?