I'm trying to exclude a dependency in a multi-project build but it doesn't
seem to be working. I've tried setting the exclude on the configuration
(using all*. or runtime)
and I've also tried setting the exlude in the dependencies section.
If I exclude a JAR in the configuration or dependency section, why does it
still appear in sourceSets.main.runtimeClasspath and configurations.compile?
I'm using the runtimeClasspath to generate the classpath for the MANIFEST
file in a JAR. However the exluded JAR is still appearing in the MANIFEST
classpath.
At the moment I filter the list of JARs myself but I wanted to use
exclusions instead as I'm starting to introduce Ivy to my project and won't
always no the full name of the JAR
(which I'm using in my hard-coded list of JARs I'm filtering against)
Hope this makes sense.
configurations {
all*.exclude module: ":ProgressOE10openedge"
clientRbem
}
dependencies {
compile project(':uwm/xml'),
project(':uwm/EDR'), project(':uwm/wfmc'),
project(':uwm/expression'),
project(':uwm/expressioncg'), project(':uwm/CM'),
project(':uwm/jobscheduler'),
project(':uwm/timer')
}
//manifestInclusions = ['acegi-security.jar', 'aspectjrt.jar',
'aspectjweaver.jar', 'backport-util-concurrent.jar', 'cglib-nodep.jar',
// 'commons-codec.jar', 'commons-collections.jar', 'commons-dbcp.jar',
'commons-httpclient.jar', 'commons-io.jar', 'commons-logging.jar',
// 'commons-pool.jar', 'commons-fileupload.jar', 'connector.jar',
'core_client.jar', 'dom4j-full.jar', 'edr_client.jar', 'ehcache.jar',
// 'expression.jar', 'expressioncg.jar', 'hessian.jar',
'isorelax.jar', 'jms.jar', 'jobscheduler.jar', 'jsr107cache.jar', 'jta.jar',
// 'log4j.jar', 'mail.jar', 'msv.jar', 'oisServerUtils.jar',
'persistence.jar', 'rbem_client.jar', 'relaxngDatatype.jar',
'servlet-api.jar',
// 'spring-webmvc.jar', 'spring.jar', 'xsdlib.jar', 'xml_utils.jar']
jar.doFirst {
manifest {
attributes(
//"Class-Path": sourceSets.main.runtimeClasspath.filter {
it.isFile() && it.getName() in manifestInclusions } { File file -> file.name
}.sort().join(' ') )
"Class-Path": sourceSets.main.runtimeClasspath.collect { File
file -> file.name }.sort().join(' ') )
//I've also tried using configurations.compile.collect instead
of
sourceSets.main.runtimeClasspath but excluded JAR still getting included
}
}
I'm running Gradle 1.0-milestone-3.
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Need-to-exclude-transitive-dependencies-for-manifest-classpath-tp4773575p4773575.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email