vert-x/vertx-gradle-template

fatJar is not working properly with gradle 1.12

Opened this issue · 2 comments

with gradle 1.12, fatJar builds successfully, but it does not contain necessary 'lib' and 'org' directories:

gradle 1.11 fat jar content:

META-INF
lib
mods
org

gradle 1.12 fat jar content:

META-INF
mods

gradle 1.12 changed internal classloader structure and DefaultPlatformManager.locateJars does not work properly anymore. And it seems to me that it searching for jars in that way is no longer possible with gradle class loaders....

Discover the same problem today, solved with this task in vertx.gradle

task fatJar(dependsOn: modZip, type: JavaExec, description: 'Creates a fat executable jar which   contains everything needed to run the module' ) {
  main = "org.vertx.java.platform.impl.cli.Starter"
  classpath = buildscript.configurations.classpath
  args = ['fatjar', moduleName, '-d', 'build/libs']
  systemProperties = ["vertx.clusterManagerFactory":"org.vertx.java.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory","vertx.mods":"build/mods"]
}