Skip to content
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
Closed

Build fails with Gradle 4.3+ #339

michel-lefranc opened this issue Nov 10, 2017 · 9 comments
Labels
Milestone

Comments

@michel-lefranc
Copy link

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 Issue with Gradle 4.3+ Build fails with Gradle 4.3+ Nov 10, 2017
@wolfs
Copy link
Contributor

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
Copy link

danielefranceschi commented Nov 15, 2017

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

@robin-anil
Copy link

Any plans of fixing this soon ?

@ldaley
Copy link

ldaley commented Dec 8, 2017

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

@wolfs
Copy link
Contributor

wolfs commented Dec 9, 2017

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

@ldaley
Copy link

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
Copy link

danhyun commented Dec 11, 2017

The details can be found in this PR from @rspieldenner https://github.com/johnrengelman/shadow/pull/351/files

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

Fixed in c185881

@johnrengelman
Copy link
Collaborator

2.0.2 is now available with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants