Upgrade to gradle 4.3.1 breaks shadowJar?

what does this mean:

The specified installation directory '/home/thufir/NetBeansProjects/gradleHelloWorld/build/install/gradleHelloWorld-shadow' is neither empty nor does it contain an installation for 'gradleHelloWorld'.
  If you really want to install to this directory, delete it and run the install task again.
  Alternatively, choose a different installation directory.

when I run clean that directory gets removed. Notably, the JAR built from assembleShadowDist is fine. Yet gradle cannot execute shadowJar – it crashes as above.

Not related to the build file (I think):


could you provide a little more context about your project? IIUC, something is in the /home/thufir/NetBeansProjects/gradleHelloWorld/build/install/gradleHelloWorld-shadow directory, which doesn’t seem to be an old application. It may be an empty directory, could you check?
I checked the shadow plugin, and it seems that there is already an issue open: https://github.com/johnrengelman/shadow/issues/339.


1 Like

yup, that looks like it.

No, it’s not an old application. I made it specifically to see if it’s a bug.

The directory is empty – at least when the build finishes.

running clean will remove the problem directory. Notably, shadowJar makes the JAR fine, it’s runnable, etc. It’s just this one task, runShadow which triggers bug 339.

As for the project, it’s a simple as they get:

thufir@dur:~/NetBeansProjects/gradleHelloWorld$ tree
β”œβ”€β”€ build.gradle
β”œβ”€β”€ gradle
β”‚   └── wrapper
β”‚       β”œβ”€β”€ gradle-wrapper.jar
β”‚       └── gradle-wrapper.properties
β”œβ”€β”€ gradlew
β”œβ”€β”€ gradlew.bat
β”œβ”€β”€ settings.gradle
└── src
    β”œβ”€β”€ main
    β”‚   └── java
    β”‚       β”œβ”€β”€ dur
    β”‚       └── net
    β”‚           └── bounceme
    β”‚               └── dur
    β”‚                   └── gradle
    β”‚                       └── hello
    β”‚                           └── App.java
    └── test
        └── java

13 directories, 7 files

All App.java does is print β€œhellooo” to the console.