Gradle + Eclipse adds to many libraries?

(gradle) #1

Below my config, when I import this into Eclipse using the gradle plugin or using the eclipse tasks my final war when I deploy to a glassfish container using Eclipse always seems to contain commons-logging-1.0.3.jar, commons-lang-2.4.jar and slf4j-api-1.6.0.jar files.

When I specify providedCompile, shouldn’t the eclipse plugin not tell Eclipse also that it’s included during compile, but not added during deployment?

Would it be better to create a deploy task?

apply plugin: ‘war’ apply plugin: ‘eclipse’ apply plugin: ‘eclipse-wtp’ version = 0.1

repositories {

mavenCentral() }

dependencies {

providedCompile ‘javax.servlet:servlet-api:2.5’

providedCompile ‘org.slf4j:slf4j-api:1.6.0’

providedCompile ‘commons-lang:commons-lang:2.4’

providedCompile ‘commons-logging:commons-logging:1.0.4’

compile ‘commons-io:commons-io:1.4’

compile ‘commons-fileupload:commons-fileupload:1.2.1’

compile ‘commons-httpclient:commons-httpclient:3.0.1’

compile ‘org.im4java:im4java:1.2.0’ }

task explodedWar(type: Sync) {

into “$buildDir/app_get.war”

with war }