moderneinc / rewrite-recipe-starter

A forkable starter for building your own recipes and deploying them on the Moderne SaaS
26 stars 52 forks source link

gradle build results in this error #29

Closed nagkumar closed 12 months ago

nagkumar commented 12 months ago
\recipe-starter>gradle build

> Configure project :
Git repository not found at F:\nag\DWork\osource\experiments\java\nfrs\openrewrite\recipe-starter -- nebula-release tasks will not be available. Use the git.root Gradle property to specify a different directory.

> Task :licenseMain FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':licenseMain' (type 'LicenseCheck').
  - In plugin 'com.hierynomus.gradle.license.LicenseBasePlugin' type 'com.hierynomus.gradle.license.tasks.LicenseCheck' property 'header' specifies file 'F:\nag\DWork\osource\experiments\java\nfrs\openrewrite\recipe-starter\gradle\licenseHeader.txt' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.

    For more information, please refer to https://docs.gradle.org/8.4/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.

* 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.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.4/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 20s
9 actionable tasks: 1 executed, 8 up-to-date
timtebeek commented 12 months ago

Would it help if you run ./gradlew build instead? I notice you're on Windows; the problem you're having is with the gradle license plugin, unrelated to this project. I've checked again: the file is present, with a small update, and also works in CI. I also see "Git repository not found" in the output; which additionally suggests you're not using a full project checkout as expected. Could you try again with a clean git checkout instead?

nagkumar commented 11 months ago

which additionally suggests you're not using a full project checkout as expected

I have checkout completely.. however, removed .git and .gitrepo to see if everything works without any dependency with version control.

Then both gradle build and gradle publishToMavenLocal are failing..

I have also tried to commit the checkedout code in my new git repo, then also both tasks fail.

Can you explain how to make the build script work without git dependency and also in my own git copy repo please.