When using global (per configuration) exclusion of certain dependencies, this is not reflected in produced ivy.xml descriptior file. The legacy method using uploadArchives task does this part correctly. Bellow is a sample project showing the problem
group = 'test'
version = '1.0'
apply plugin: 'java'
apply plugin: 'ivy-publish'
repositories {
jcenter()
}
publishing {
publications {
ivy(IvyPublication) {
from components.java
}
}
repositories {
ivy {
url "file://${buildDir}/repo"
}
}
}
configurations.all {
exclude group: 'commons-logging', module: 'commons-logging'
}
dependencies {
compile "org.springframework:spring-core:4.2.6.RELEASE"
}
It’s expected for the above file to produce ivy.xml with the following entry for every configuration published in section.
<exclude org="commons-logging" module="commons-logging" artifact="*" type="*" ext="*" conf="<CONFNAME>" matcher="exact"/>
where will be replaced with a proper conf. name
Gradle Version: 3.0
Operating System and JVM version: OSX 10.11.6, JVM v,1.8.0_65-b17
Is this a regression? no, it looks like it never workded, tested on gradle 2.9 with the same result
Sample project: https://github.com/jotel/gradle-ivy-publish-issue