Skip to content

Unable to start the API with ./gradlew run #1

@xaviibaez

Description

@xaviibaez

I'm using W11 with vscode and, following the README.mdI was unable to start the API.
Error:

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> No main class specified and classpath is not an executable jar.

* 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

BUILD FAILED in 1s
2 actionable tasks: 1 executed, 1 up-to-date

I found the solution executing ./gradlew bootRun instead of ./gradlew run. Maybe we can update the README.md adding ./gradlew bootRun command on the 6 step in case of error.
All the previous steps worked fine. :)

The main difference between ./gradlew bootRun and ./gradlew run is:

./gradlew bootRun : standard gradle'run' task with additional Spring Boot features. e.g. you can type: bootRun {addResources = false}check github.

./gradlew run: standard gradle 'run' task.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions