我正在尝试使用 https://search.maven.org/artifact/com.oracle.oci.sdk/oci-java-sdk-bom/1.8.0/pom 中提供的实现"com.oracle.oci.sdk:oci-java-sdk-bom:1.8.0"为OCI Java SDK设置Gradle,并得到插件未找到错误。
如何为 OCI 正确设置 Gradle
下面是我的构建.gradle
plugins {
id 'java'
id 'com.oracle.oci.sdk' version '1.8.0'
}
group 'mysample'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'com.oracle.oci.sdk:oci-java-sdk-bom:1.8.0'
}
你可以使用Spring的依赖管理插件(https://docs.spring.io/dependency-management-plugin/docs/current-SNAPSHOT/reference/html/(。
例:
plugins {
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
}
dependencyManagement {
imports {
mavenBom 'com.oracle.oci.sdk:oci-java-sdk-bom:1.13.2'
}
}
dependencies {
implementation 'com.oracle.oci.sdk:oci-java-sdk-limits'
}
请参阅 OCI gradle 插件,网址为 https://github.com/aalmiray/oci-gradle-plugin