I need to exclude all transitive compile dependencies from going into my WEB-INF/lib since these will available in the OSGi classpath already.
I found this similar feature but it appears that this has been removed in later versions of Gradle:
http://issues.gradle.org/browse/GRADLE-725
war { libExcludeConfigurations(‘groovy’)
}
I tried setting the war.classpath property but it didn’t appear to have any affect. My goal is to only include the main sourceSet in WEB-INF/classes and leave WEB-INF/lib blank
After reading the latest DSL docs:
FileCollection classpath
The classpath to include in the WAR archive. Any JAR or ZIP files in this classpath are included in the WEB-INF/lib directory. Any directories in this classpath are included in the WEB-INF/classes directory.
I tried
war.classpath = fileTree('sourceSets.main.output.classesDir')
but my WEB-INF/lib path is still being populated.
Any ideas?
Thanks