Gradle + Jar (FatJar) : “Could not copy zip entry” error message

This problem is caused by https://discuss.gradle.org/t/ziptree-unable-to-overwrite-temporary-read-only-files/2322/3 resp. https://issues.gradle.org/browse/GRADLE-2959

Solution is to add delete command which removes folder ./tmp/expandedArchives:

jar { 
    delete "$buildDir/tmp/expandedArchives" 
    
    from { 
        (configurations.runtime).collect { 
            it.isDirectory() ? it : zipTree(it) 
        } 
    } 
    
    manifest { 
        attributes("Main-Class": "com.test.Main" ) 
    } 
}
Tags:  Gradle  Java  FatJar 
Last blog articles:
Mým fuckupům
Ubuntu: Login loop
Leaving LinkedIn
LinkedIn: Odcházení
git gui: Add pull and stash commands

Tags:
Java Ubuntu česky Gradle personal Software-architecture DIY children React Eclipse DisplayLink AI Spring JavaScript AspectJ neuron SSH LXC JavaFX Immutables Gnome3 GIT FatJar Edison technologies startup science procrastination pokusy podnikání linux lambda kvas ellipsis destilace chemie alkohol VisualVM Upstart Tomcat Selenium REST PrimeFaces Log4j Jooq Jackson JSF Debug DI CSS

Last tweets: