druid-io / tranquility

Tranquility helps you send real-time event streams to Druid and handles partitioning, replication, service discovery, and schema rollover, seamlessly and without downtime.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jar doesn't work with tranquility dependency

tekjar opened this issue · comments

Hi. Here is my gradle build script

plugins {
    id 'java'
}

group 'hello'
version '1.0-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'application'

mainClassName = "HelloWorld"

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'io.druid:tranquility-core_2.11:0.8.2'
}

jar {
    zip64 true

    destinationDir = file('build/')
    from {
        (configurations.runtime).collect {
            it.isDirectory() ? it : zipTree(it)
        }
    }
    manifest {
        attributes("Main-Class": "HelloWorld" )
    }
}

My hello world example works with out tranquility but gives this error with it

java -jar build/hello-1.0-SNAPSHOT.jar
Error: Could not find or load main class HelloWorld

What's the reason for this?

gradle run also works