I am building the FAT jar using gradle-1.3 version and building the
FAT jar using this below properties
jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it)
}
Dependencies AS FOLLOWS
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"
}
But still by jar is included with following jar as reference
jay,
jline,
jni,
jnr,
jruby,
junit,
junit3.8.1
But i don’t want to include these jars
You can exclude the dependencies by adding this to the bottom of your build:
This will iterate over the dependencies of all configurations and exclude the modules that you don’t want to include.
If you want to exclude all transitive dependencies, it is easier to set the transitivity to false for the compile configuration: