O
O
opopsel_86x642021-11-27 20:37:34
Java
opopsel_86x64, 2021-11-27 20:37:34

How to fix 'distribution' task group startup error in gradle?

I created a javafx project using gradle. I manage to create an executable image and run it. But when I run any task from the "distribution" group, I get an error, how can I fix it?

build.gradle

plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.10'
    id 'org.beryx.jlink' version '2.24.4'
}

repositories {
    mavenCentral()
}

application {
    mainModule = 'pigletmodule'
    mainClass = 'piglet.Main'
}

javafx {
    version = "17.0.1"
    modules = ['javafx.controls']
}

jlink {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
        name = 'piglet'
    }
}


Mistake
> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :startScripts FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':startScripts'.
> Couldn't replace placeholder in C:\Users\insec\Desktop\piglet\build\scripts\piglet

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question