Skip to content

Commit

Permalink
Publish fat jar to maven (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
hungj committed Feb 7, 2019
1 parent a60967f commit 6e0feca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
18 changes: 18 additions & 0 deletions build.gradle
Expand Up @@ -95,9 +95,24 @@ subprojects {
apply plugin: "idea"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: 'com.github.johnrengelman.shadow'

apply from: "$rootDir/gradle/version-info.gradle"

if (project.name.equals("tony-cli")) {
shadowJar {
mergeServiceFiles()
dependencies {
exclude(dependency('com.sun.jersey:'))
exclude(dependency('com.sun.jersey.contribs:'))
exclude(dependency('org.apache.hadoop:'))
}
zip64 true
}

build.dependsOn(shadowJar)
}

repositories {
mavenCentral()
}
Expand Down Expand Up @@ -135,6 +150,9 @@ subprojects {
artifactId = "${project.name}"
artifact sourcesJar
artifact javadocJar
if (project.name.equals("tony-cli")) {
artifact shadowJar
}
pom {
name = "${project.name}".toString()
description = "${project.name}".toString()
Expand Down
12 changes: 0 additions & 12 deletions tony-cli/build.gradle
@@ -1,20 +1,8 @@
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'

dependencies {
compile project(':tony-core')
compile project(':tony-proxy')
testCompile deps.external.mockito
}

shadowJar {
mergeServiceFiles()
dependencies {
exclude(dependency('com.sun.jersey:'))
exclude(dependency('com.sun.jersey.contribs:'))
exclude(dependency('org.apache.hadoop:'))
}
zip64 true
}

build.dependsOn(shadowJar)

0 comments on commit 6e0feca

Please sign in to comment.