A lot of jars file from dependencies into war

I’m new with gradle and I’m trying to build a war file. But every time that I run the gradle build it produce a war very large (1GB) containing a lot of jar that became from the dependencies that I declared for compile the project. Can someone tell me where is the error into my gradle.build or how I can exclude those jars from my war?

Follow my gradel.build.
Thank you.

apply plugin: 'java’
apply plugin: 'war’
apply plugin: 'application’
apply plugin: 'checkstyle’
apply plugin: ‘findbugs’

dependencies {
compile fileTree(dir: ‘war/WEB-INF/lib’).include(’/*.jar’)
compile fileTree(dir: ‘src’).include(’
/’), webSphere
compile fileTree(new File(‘C:/Program Files (x86)/IBM/WebSphere8.5/AppServer_1’)).include(’**/
.jar’)
}

buildscript {
repositories {
jcenter()
}
dependencies {
classpath “at.bxm.gradleplugins:gradle-svntools-plugin:latest.release”
}
}
apply plugin: “at.bxm.svntools”

//Java version compatibility to use when compiling Java source.
sourceCompatibility = 1.7
//Java version to generate classes for.
targetCompatibility = 1.7

svntools {
username = svnUser
password = svnPass
}

task argumentReading(type: JavaExec){
description ‘Read commang line arguments and set them to local variable’
}

task svnCheck(type: at.bxm.gradleplugins.svntools.tasks.SvnCheckout){
svnUrl = svnTrunk
workspaceDir = checkOutDir
}

task prepareProject(type: War){
manifest{
attributes ‘Build-Number’: new Date().format(‘yyyyMMddHHmmss’)
}

war.execute()
ant.checksum file: it.archivePath

}

All dependencies from the compile scope are added to your war. If you need some dependencies for compilation only, which are provided by your container at runtime, use the providedCompile scope.

@st_oehme thank you so much.

You should also consider whether you need ALL of the jars required for WebSphere to run. Most likely, if anything, you’re only using PUBLIC apis from WebSphere, which will likely be provided in a very small number of jars, the names of which should be available in the WebSphere documentation. And, if you’re not even using PUBLIC apis from WebSphere, as you’re only intending to deploy this to a WebSphere server, then you can remove that entire entry.