Hi, in our application JAR file we have a spring.schemas file in the META-INF directory. The spring.schemas file has been manually created by copying the contents of similar files in several Spring JAR dependencies. I thought it would be better to generate this file during the build e.g.
configurations {
springSchemas
springBeans
springContext
}
dependencies {
springSchemas 'org.springframework:spring-beans:3.2.2.RELEASE'
springSchemas 'org.springframework:spring-context:3.2.2.RELEASE'
springBeans ('org.springframework:spring-beans:3.2.2.RELEASE') {
transitive = false
}
springContext ('org.springframework:spring-context:3.2.2.RELEASE') {
transitive = false
}
}
jar {
from({ zipTree(configurations.springBeans.singleFile) }) {
include 'META-INF/spring.schemas'
}
from({ zipTree(configurations.springContext.singleFile) }) {
include 'META-INF/spring.schemas'
}
//from (zipTree (configurations.springSchemas.files { it.name.startsWith('spring') }) ){
// include '**/spring.schemas'
//}
}
This results in 2 spring.schemas files in my JAR. Is there any easy way I can merge these 2 files? Also I’d like to use a single configuration (see the commented out code) but I couldn’t get this to work.
Thanks.
FYI I’m running Gradle 1.5.