8
के साथ पैक किए जाने से बाहर निकालें, मैं AMAuthN.properties
को निर्मित जार से बाहर करना चाहता हूं। यह फ़ाइल संकलित जार के रूट फ़ोल्डर में दिखती रहती है। फ़ाइल प्रोजेक्ट फ़ोल्डर रूट के सापेक्ष AMAuthN\src\main\resources\AMAuthN.properties
पर स्थित है। धन्यवाद!ग्रैडल - फ़ाइल को जार
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