Error message after run of Gradle 9 project in VSNetBeans
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 27 latest release candidate
### What happened
When testing Gradle 9 project loading from @mbien PR https://github.com/apache/netbeans/pull/8703 and its code base I've realized that project is loaded, can be run using F5 or code lense, but at the end Gradle prints error message to output which is ugly and hides that project was run OK.
Steps:
1. Build VSNetBeans from `mbien:gradle9-fixes` as stated in [PR 8703](https://github.com/apache/netbeans/pull/8703)
2. Run it in VSCode, create new Gradle Java project using command `Java: New project ...` command. It is the created as Gradle 9 project in gradle-wrapper.properties.
3. Project si opened and loaded OK.
4. Try to run it using F5 or Code Lense in VS Code. Project is run and right after its output, it prints Gradle error which can hide the fact project Run/Debug completed OK.
```
JAVA_HOME="/Users/mbalin/.sdkman/candidates/java/21.0.6-graal"
cd /Users/mbalin/development/gr-test2/app; ../gradlew --configure-on-demand -PrunClassName=org.yourcompany.yourproject.App -s '-PrunJvmArgs=-Dvisualvm.display.name=gr-test2%PID -Dvisualvm.id=1754321487125 -Dfile.encoding=UTF-8' -x check run
Configuration on demand is an incubating feature.
Calculating task graph as no cached configuration is available for tasks: run
> Task :app:compileJava UP-TO-DATE
> Task :app:processResources NO-SOURCE
> Task :app:classes UP-TO-DATE
> Task :app:run
Hello World!
[Incubating] Problems report is available at: file:///Users/mbalin/development/gr-test2/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Configuration cache problems found in this build.
1 problem was found storing the configuration cache.
- Task `:app:run` of type `org.gradle.api.tasks.JavaExec`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
See the complete report at file:///Users/mbalin/development/gr-test2/build/reports/configuration-cache/bxnd0w8qtt4bcmeafim2dypss/60ha2871aj6t91ergssn1d5rh/configuration-cache-report.html
```
You can see there is message from simple hello world
```
> Task :app:run
Hello World!
```
followed by Gradle error.
Should be fixed.
### Language / Project Type / NetBeans Component
Java Gradle project based
### How to reproduce
See above for steps
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
macOS 15.5
### JDK
JDK 21.0.6 GraalVM
### Apache NetBeans packaging
Apache VSNetBeans for VSCode
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Assessment
This issue has not been assessed yet.