Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run 'war' command in Grails 5.0.0 (rest-api) #12132

Closed
fernando88to opened this issue Oct 12, 2021 · 1 comment · Fixed by grails/grails-views#325
Closed

Failed to run 'war' command in Grails 5.0.0 (rest-api) #12132

fernando88to opened this issue Oct 12, 2021 · 1 comment · Fixed by grails/grails-views#325
Assignees
Milestone

Comments

@fernando88to
Copy link

Steps to Reproduce

| Grails Version: 5.0.0
| JVM Version: 11.0.11


grails create-app myApp -profile rest-api
grails war


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

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

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

CONFIGURE SUCCESSFUL in 1s

> Task :compileGsonViews FAILED
Execution optimizations have been disabled for task ':compileGsonViews' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/home/fernando/IdeaProjects/versoes_grails/5.0.0/myApp/build/gson-classes/main'. Reason: Task ':bootWarMainClassName' uses this output of task ':compileGsonViews' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
<========-----> 63% EXECUTING [2s]
> IDLE

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':compileGsonViews' (type 'JsonViewCompilerTask').
  - In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'compileOptions.encoding' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'compileOptions.forkOptions' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'compilerName' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'fileExtension' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'org.grails.plugins.views-json' type 'grails.views.gradle.json.JsonViewCompilerTask' property 'scriptBaseName' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.

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

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

See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
5 actionable tasks: 5 executed
| Error Command [war] error: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'. (Use --stacktrace to see the full trace)

Expected Behaviour

That the .war file was generated

Actual Behaviour

An exception is thrown

Environment Information

  • Operating System: Ubuntu 20.04.3 LTS
  • Grails Version: 5.0.0
  • JDK Version: openjdk version "11.0.11" 2021-04-20
puneetbehl pushed a commit to grails/grails-views that referenced this issue Oct 12, 2021
Correctly define @input annotation on Task input
Fixes grails/grails-core#12132
@puneetbehl
Copy link
Contributor

It seems that "org.grails.plugins.views-json" is not supported with Gradle 7. As a workaround you could downgrade to Gradle 6.9. This will be fixed in next minor release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants