Java gradle依赖项文件构建gradle
我有一个build.gradle文件,我为ola4j添加了依赖项,但我不知道如何添加它。 我在maven central的存储库中看到了,但我没有看到这个罐子 我如何建立这种依赖关系 这是我现在的代码:Java gradle依赖项文件构建gradle,java,eclipse,spring,maven,gradle,Java,Eclipse,Spring,Maven,Gradle,我有一个build.gradle文件,我为ola4j添加了依赖项,但我不知道如何添加它。 我在maven central的存储库中看到了,但我没有看到这个罐子 我如何建立这种依赖关系 这是我现在的代码: apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' jar { baseName = 'gs-relational-data-access'
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'
}
是可以找到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'
}