In gradle, when i am trying to build each modules, I need the external dependency also packaged inside Jar as Jar.
Below is few dependencies listed out:
dependencies {
compile group: 'org.springframework.integration', name: 'spring-integration-xml', version:'4.1.6.RELEASE'
compile group: 'org.springframework', name: 'spring-oxm', version:'3.0.0.RELEASE'
....
}
jar {
manifest{
attributes 'Main-Class':'com.MyfirstClass'
}
}
At the end, when we tried to view Jar it should contain dependent Jars inside lib as shown below
jar tvf build/libs/test.jar
META-INF/
META-INF/MANIFEST.MF
lib/
lib/spring-integration-xml.4.1.6.jar
.....
Thanks in Advance!