我有一个build.gradle文件,我为ola4j添加了依赖项,但我不知道如何添加它。 我在maven central的存储库中看到了,但我没有这个罐子。
我如何做出这种依赖?
这是我现在的代码:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'gs-relational-data-access'
version = '0.1.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/libs-release" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework:spring-jdbc")
compile("org.olap4j:olap4j:1.1.0")
compile("com.h2database:h2")
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
答案 0 :(得分:1)
Here是可以找到olap4j
的存储库。完成下面的build.gradle
:
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/libs-release" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.2.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'gs-relational-data-access'
version = '0.1.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "http://repository.pentaho.org/artifactory/repo/" }
maven { url "https://repo.spring.io/libs-release" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework:spring-jdbc")
compile("org.olap4j:olap4j:1.1.0")
compile("com.h2database:h2")
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '1.11'
}
task copyDeps(type: Copy) {
from configurations.compile
into 'deps'
}