Search code examples
gradlebuildjetty

How to fix "plugin with id 'jetty' not found" error?


java 1.7 gradle version 7.4.2

When I import gradle project to sts, it gives me an error:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\test\build.gradle' line: 4

* What went wrong:
A problem occurred evaluating root project 'test'.
> Plugin with id 'jetty' not found.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

CONFIGURE FAILED in 121ms

enter image description here

I tried to change line number 4 apply plugin: 'jetty' to apply plugin: 'org.gretty' or apply plugin: 'com.dsvdsv.gradle.plugin' or apply plugin: 'org.akhikhl.gretty'

but it didn't work.

How should I fix this?


Solution

  • Try

    plugins {
      id("org.gretty") version "4.0.3"
    }