hi,

i'm struggling with a gradle build in attempt to build a fatjar.
following some examples i've found, i created the following gradle.build:

import 
com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer

apply plugin: "java"
apply plugin: "scala"
apply plugin: "com.github.johnrengelman.shadow"

sourceCompatibility = 1.8
version = '0.0.1'

if (!JavaVersion.current().java8Compatible) {
    throw new IllegalStateException("Java 8 is mandatory for building this 
project")
}

repositories {
    mavenCentral()
    jcenter()
}

buildscript {
    repositories {
        jcenter {
            url "http://jcenter.bintray.com/";
        }
    }
    dependencies {
        classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
    }
}

dependencies {

    compile("com.typesafe.akka:akka-actor_2.11:2.4.1")
    compile("com.typesafe.akka:akka-cluster_2.11:2.4.1")
    compile("com.typesafe.akka:akka-cluster-tools_2.11:2.4.1")
    compile("com.typesafe.akka:akka-http-experimental_2.11:2.0.1")
    compile("com.typesafe.akka:akka-http-core-experimental_2.11:2.0.1")
    compile("org.scala-lang:scala-library:2.11.7")

    testCompile("junit:junit:4.11")
}

tasks.withType(ScalaCompile) {
    scalaCompileOptions.useAnt = false
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.9'
}
jar {
    manifest {
        attributes "Main-Class": "com.whatever.Main"
        attributes "Build-Version": version 
    }
    from {
        configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
    }
    archiveName 'fat.jar'
}

shadowJar {
    transform(AppendingTransformer) {
        resource = 'reference.conf'
    }
}


 unfortunately, i still fail to run created jar due to the following error:

Exception in thread "main" com.typesafe.config.ConfigException$Missing: No 
configuration setting found for key 'akka.version'

does anyone have an idea what do i miss here?

thanks!

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to