Hi,
Gradle 2.0 Java 8u5
I have a requirement to publish a JAR that has an associated POM stripped of all dependencies. I’ve tried something like this:
publishing {
publications {
core(MavenPublication) {
artifactId 'core'
from components.java
artifacts = [coreJar, coreSourcesJar]
}
model(MavenPublication) {
artifactId 'model'
from components.java
artifacts = [modelJar]
pom.withXml {
asNode().dependencies.'*'.findAll() {
println it
//it.remove()
}
}
}
}
repositories {
maven {
url "${repositoryUrl}/libs-${project.version.endsWith('-SNAPSHOT') ? 'snapshot' : 'release'}-local"
}
}
}
But it fails Is there a way to do this in Gradle 2.0 (perhaps using a configuration)? I suppose as an extension to this, is there also a way to only include certain JARS (perhaps a custom configuration?)
Thank you.
-=david=-