2
우리는 불행하게도, 프로젝트 SDI - 웹 서버가 자신의 log4j 그렇게업스트림 프로젝트에서 jar 파일을 fileTree에서 제외시키는 방법?
project(':sdi-webserver') {
project.ext.genLibDir = file('lib')
dependencies {
compile project(':sdi-master')
compile fileTree(dir: '../webserver/lib', include: '*.jar')
compile fileTree(dir: '../webserver/play-1.2.4/framework/lib', include: '*.jar')
compile fileTree(dir: '../webserver/play-1.2.4/framework', include: 'play-*.jar')
}
같은 filetree에서 가져온 것있다
configurations {
//compile.exclude module: 'commons'
//all*.exclude group: 'org.gradle.test.excludes', module: 'reports'
all*.exclude module: 'log4j'
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.6'
compile group: 'org.slf4j', name: 'log4j-over-slf4j', version: '1.6.6'
compile group: 'com.google.inject', name: 'guice', version: '3.0'
compile group: 'com.google.protobuf',name: 'protobuf-java', version: '2.4.1'
//compile group: 'org.asteriskjava',name: 'asterisk-java', version: '1.0.0.M3'
//to be erased soon
compile group: 'commons-configuration',name:'commons-configuration',version: '1.8'
//compile group: 'org.bouncycastle', name: 'bcpg-jdk16', version: '1.46'
compile project(':sdi-master')
compile project(':sdi-webserver')
}
우리는 어떻게이 프로젝트의 다음과 같은 구성을 ... 제외 않는 한 jar 그래서 그것은 의존성의 일부가 아닙니다. 위의 내용은 우리가 저장소와 전이 종속성에 대해서만 작동하고 fileTree에는 작동하지 않는다는 것을 제외합니다. 그러나 우리는 여전히 일식 작업을 올바른 일 .classpath로 만들고자 할 때 jar 파일을 제외해야합니다. 복사 항아리, 등 등
덕분에, 딘
글쎄, 나는 모든 파일 트리에서 작동하는 일부 전역 제외를 작성할 수 없다는 것을 악취가 난다. 오 잘. –
Gradle에는'fileTree' 의존성에 대한 메타 데이터가 없으므로 보통 excludes는 작동하지 않습니다. 어쩌면 빌드 스크립트에 메타 데이터를 추가 할 수있는 방법을 제공 할 수 있습니다. 부담없이 기능 요청을하십시오. –