Skip to content

Build fails with Gradle 4.3+ #339

@michel-lefranc

Description

@michel-lefranc

Build fails with:

FAILURE: Build failed with an exception.

When used with Gradle 4.3+
Same build works like a charm with Gradle 4.2.1.

Shadow Version

2.0.1

Gradle Version

4.3

Expected Behavior

A successful build

Actual Behavior

$ rm -Rf build ; gradle installShadowDist
[...]
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':***********:installShadowDist'.
> The specified installation directory '/**********/build/install/********-shadow' is neither empty nor does it contain an installation for '*********'.
  If you really want to install to this directory, delete it and run the install task again.
  Alternatively, choose a different installation directory.

Gradle Build Script(s)

plugins {
	id 'java'
	id 'groovy'
	id 'application'
	id 'com.github.johnrengelman.shadow' version '2.0.1' // variable cannot be used here!
}

repositories {
	jcenter()
	maven {
		url "https://oss.sonatype.org/content/repositories/snapshots"
	}
}

sourceCompatibility = '1.8'

dependencies {
	compile group: 'org.codehaus.groovy', name: 'groovy-all', version: versions.groovy
	compile project('*****INTERNAL DEPENDENCY*******')
	compile project('*****INTERNAL DEPENDENCY*******')
	compile "io.vertx:vertx-core:${versions.vertx}"
	compile "io.vertx:vertx-rx-java:${versions.vertx}"
	compile "io.vertx:vertx-lang-groovy:${versions.vertx}"
	compile "io.vertx:vertx-rx-groovy:${versions.vertx}"
	compile "com.julienviet:childprocess-vertx-ext:${versions.childprocess_vertx_ext}"   // Child Process extension for Vert.x ; see https://github.com/vietj/childprocess-vertx-ext
}

mainClassName = "*******************.Main"
applicationDefaultJvmArgs = ["-Dvertx.cacheDirBase=/tmp/vertx-cache"]	// so that a .vertx/ directory is NOT created in $CWD

shadowJar {
	mergeGroovyExtensionModules()
	classifier = 'fat'
	mergeServiceFiles {
		include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
	}
}

Content of Shadow JAR (jar tf <jar file> - post link to GIST if too long)

Not created... Build fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions