Hello Every one, Can you help me in gradle build jar with all dependency jar(another project) and my project log4j2.xml file under src/main/java,
i was tried jar is getting but log4j2.xml file not there in that jar,
Hello Every one, Can you help me in gradle build jar with all dependency jar(another project) and my project log4j2.xml file under src/main/java,
i was tried jar is getting but log4j2.xml file not there in that jar,
log4j2.xml should be in src/main/resources.
Can you explain more about what you want to do with the dependency jar? Do you want to make a fat/shadow/shaded jar?
Yes,It working fine but i faces two Issues last one week in gradle ,
please Let me know,you have any idea,
As Chris told you, log4j2.xml is a resource. I’ve never seen the error messages you described. But I just can tell you that I use the “shadow” plugin to build “executable jars” with all dependencies embedded in a fat jar.
Here’s a snippet from a gradle file
buildscript {
repositories {
…
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2'
}
}
shadowJar {
archiveName = ‘myJar.jar’
classifier = ‘’
}
Hope this helps
Okay Thank you siaspa,