"No value has been specified for property 'archiveFile'" in Java 11 project


for a project that is based on Java 11, I included a subproject (‘splitjars’) for processing of third party JARs to fight the ‘split jar’ problem. The subproject has its own build.gradle.kts:

val xercesVersion = "2.11.0"
val ueberjars = configurations.create("ueberjars")

dependencies {
    ueberjars("com.github.jnr", "jnr-enxio", "0.1.9")
    ueberjars("com.github.jnr", "jnr-unixsocket", "0.21")
    ueberjars("xerces", "xercesImpl", xercesVersion)

tasks {
    val copyJarsForUeberJars = task("copyJarsForUeberJars", Copy::class) {
        val ueberBaseFiles = configurations.get("ueberjars").resolvedConfiguration.files
        println("ueberBaseFiles: " + ueberBaseFiles)
        from(ueberBaseFiles) {
            rename("([a-zA-Z_]+)-([\\d\\.]+(.*)).jar", "$1.jar")

    val unzipXerces = task("unzipXerces", Copy::class) {
        from(zipTree(file("lib/tmp/xercesImpl.jar"))) {

    val rezipStrippedXerces = task("rezipStrippedXerces", Jar::class) {
        baseName = "xerces-stripped"
        from(files("./lib/tmp/xercesImpl")) {

The idea is to remove some files from xercesImpl.jar that are problematic for Java 11, and to depend on the subproject in the main project and use the (modified) xercesImpl.jar as dependency there:

dependencies {
    api("", "xerces-stripped", "")
tasks.named("compileJava") {

However, I always get this mysterious error:

* What went wrong:
A problem was found with the configuration of task ':splitjars:rezipStrippedXerces'.
> No value has been specified for property 'archiveFile'.

I would be glad if someone could explain the error message to me or suggest another way to depend on a (modified) jar as dependency.

The complete project is at https://github.com/aanno/db-toolchain , branch ‘feature/splitjar-subproject’. You need to run ./script/bootstrap.sh after checkout.

Well, I have now solved the problem on myself, and I want to share the solution for anybody who gets the same error message.

The problem seems to be that the Jar Task is only possible if you include some kind of java plugin. If I include the following lines at the beginning of my splitjars subproject, it works without any error message:

plugins {

repositories {

    // Use jcenter for resolving your dependenes.
    // You can declare any Maven/Ivy/file repository here.