我正在使用 gradle-1.3 版本构建 FAT jar,并使用以下属性构建 FAT jar
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it)
}
依赖项如下
dependencies {
compile fileTree(dir:'/trunk/Solutions/Seismic/Source/Binaries/CommonFunctions/build/libs', include: '*.jar')
compile "org.apache.hadoop:hadoop-core:1.0.3"
compile "commons-collections:commons-collections:3.2.1"
compile "commons-configuration:commons-configuration:1.6"
compile "commons-discovery:commons-discovery:0.2"
compile "commons-lang:commons-lang:2.4"
compile "commons-logging:commons-logging:1.1.1"
compile "commons-logging:commons-logging:1.0.4"
compile "log4j:log4j:1.2.16"
compile "com.vividsolutions:jts:1.8"
compile "commons-net:commons-net:1.4.1"
compile "org.apache.hadoop:hadoop-core:1.0.3"
compile "commons-httpclient:commons-httpclient:3.0.1"
compile "org.mortbay.jetty:servlet-api:2.5-20081211"
compile "org.apache.hbase:hbase:0.94.0"
compile "org.apache.zookeeper:zookeeper:3.4.3"
}
但仍然由 jar 包含在以下 jar 中作为参考
杰伊,
jline,
jni,
jnr,
jruby,
junit,
junit3.8.1
但我不想包括这些罐子