New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with Gradle 4.3+ #339

Closed
michel-lefranc opened this Issue Nov 10, 2017 · 9 comments

Comments

Projects
None yet
7 participants
@michel-lefranc

michel-lefranc commented Nov 10, 2017

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.

@michel-lefranc michel-lefranc changed the title from Issue with Gradle 4.3+ to Build fails with Gradle 4.3+ Nov 10, 2017

@johnrengelman johnrengelman added the bug label Nov 12, 2017

@wolfs

This comment has been minimized.

Show comment
Hide comment
@wolfs

wolfs Nov 13, 2017

This may be related to Gradle 4.3 automatically creating output directories/parent directories for output files added via the runtime API.

wolfs commented Nov 13, 2017

This may be related to Gradle 4.3 automatically creating output directories/parent directories for output files added via the runtime API.

@danielefranceschi

This comment has been minimized.

Show comment
Hide comment
@danielefranceschi

danielefranceschi Nov 15, 2017

+1 (gradle 4.3.*, lost half today trying to make (configurations.shadow and) publish task work)

danielefranceschi commented Nov 15, 2017

+1 (gradle 4.3.*, lost half today trying to make (configurations.shadow and) publish task work)

@r-tock

This comment has been minimized.

Show comment
Hide comment
@r-tock

r-tock Dec 7, 2017

Any plans of fixing this soon ?

r-tock commented Dec 7, 2017

Any plans of fixing this soon ?

@ldaley

This comment has been minimized.

Show comment
Hide comment
@ldaley

ldaley Dec 8, 2017

@wolfs are we tracking this on our end? Seems like a substantial breakage.

ldaley commented Dec 8, 2017

@wolfs are we tracking this on our end? Seems like a substantial breakage.

@wolfs

This comment has been minimized.

Show comment
Hide comment
@wolfs

wolfs Dec 9, 2017

@ldaley No, we didn't analyze this breakage, yet.

wolfs commented Dec 9, 2017

@ldaley No, we didn't analyze this breakage, yet.

@ldaley

This comment has been minimized.

Show comment
Hide comment
@ldaley

ldaley Dec 10, 2017

@wolfs @danhyun indicated to me that this is actually an issue with the shadow plugin and not Gradle itself. Can you share the details please @danhyun.

ldaley commented Dec 10, 2017

@wolfs @danhyun indicated to me that this is actually an issue with the shadow plugin and not Gradle itself. Can you share the details please @danhyun.

@danhyun

This comment has been minimized.

Show comment
Hide comment
@danhyun

danhyun commented Dec 11, 2017

@johnrengelman johnrengelman added this to the 2.0.2 milestone Dec 12, 2017

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman
Owner

johnrengelman commented Dec 12, 2017

Fixed in c185881

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Dec 12, 2017

Owner

2.0.2 is now available with this fix.

Owner

johnrengelman commented Dec 12, 2017

2.0.2 is now available with this fix.

timobaumann added a commit to timobaumann/dialogos that referenced this issue Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment