【发布时间】:2018-07-30 13:58:29
【问题描述】:
我有两个 jars 在本地 $projectDir/lib/a.jar, b.jar 中,我需要在我的 gradle 构建中添加这两个 jars,其中还包括 a 和 b jar 的传递依赖
我的 gradle build.gradle 文件
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.test.c'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url = file('lib')
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter')
compile('org.projectlombok:lombok')
compile('com.test.a:a:0.0.1-SNAPSHOT')
compile('com.test.b:b:0.0.1-SNAPSHOT')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
【问题讨论】:
标签: spring-boot gradle