8
我想要排除AMAuthN.properties
從內置罐子。該文件不斷顯示在編譯的jar的根文件夾中。該文件位於相對於項目文件夾根目錄的AMAuthN\src\main\resources\AMAuthN.properties
。謝謝!Gradle - 從包裝中刪除文件與罐子
apply plugin: 'java'
apply plugin: 'eclipse'
version = '1.0'
sourceCompatibility = 1.6
targetCompatibility = 1.6
test {
testLogging {
showStandardStreams = true
}
}
// Create a single Jar with all dependencies
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version,
'Main-Class': 'com.axa.openam'
}
baseName = project.name
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
// Get dependencies from Maven central repository
repositories {
mavenCentral()
}
// Project dependencies
dependencies {
compile 'com.google.code.gson:gson:2.5'
testCompile 'junit:junit:4.12'
}
排除一個物多用:'罐子{排除( 'thing1', 'thing2')}' –
好點,具有邏輯意義也是如此。 – SomeStudent