我的背景:如何通过Gradle将ojdbc7添加到Java Web应用程序?
- 我建立一个Java Web应用程序基于Spring引导 1.3.5.RELEASE什么。
- 我尝试将
ojdcb
添加到依赖项列表中,但未成功。 - 我知道,甲骨文有自己的Maven仓库处的
http://maven.oracle.com
这是我build.gradle
文件,让我们聚焦在4号线,5,6,36:
buildscript {
repositories {
mavenCentral()
maven {
url ("https://maven.oracle.com")
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE")
}
}
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'erp'
version = '1.0.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
//compile("org.springframework.boot:spring-boot-starter-security")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.hibernate:hibernate-core")
compile("com.oracle.jdbc:ojdbc7:12.1.0.2")
testCompile("junit:junit")
}
的IntelliJ IDEA 2016通知错误:
Warning:root project 'erp': Web Facets/Artifacts will not be configured properly Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':runtime'. Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.oracle.jdbc:ojdbc7:12.1.0.2. Required by: :erp:unspecified
(相关链接:http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9015 https://blogs.oracle.com/dev2dev/entry/how_to_get_oracle_jdbc https://blogs.oracle.com/dev2dev/entry/oracle_maven_repository_instructions_for )
帮我加摇篮到ojdbc
依存列表,谢谢!
谢谢蛋白石,但它不起作用。 –
什么不起作用?请注意,您需要授权才能访问存储库。以前,你甚至没有连接到它。 – Opal
我也认为它有授权问题.. –