When attempting to build the gradle project in Intelij, the build fails as JavadocApiPluginITest.groovy throws an exception at line 44. I thought maybe it was a local change I made by accident, but I cloned the project from this repo into a completely new file and the build still failed.
I'll include the gradle output below:
22:14:34: Executing task 'build'...
Task :buildSrc:checkApolloVersions UP-TO-DATE Task :buildSrc:generateMainServiceApolloSources UP-TO-DATE Task :buildSrc:checkMainServiceApolloDuplicates UP-TO-DATE Task :buildSrc:generateTestServiceApolloSources NO-SOURCE Task :buildSrc:checkTestServiceApolloDuplicates UP-TO-DATE Task :buildSrc:compileJava UP-TO-DATE Task :buildSrc:compileGroovy UP-TO-DATE Task :buildSrc:pluginDescriptors UP-TO-DATE Task :buildSrc:processResources UP-TO-DATE Task :buildSrc:classes UP-TO-DATE Task :buildSrc:jar UP-TO-DATE Task :buildSrc:assemble UP-TO-DATE Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE Task :buildSrc:compileTestJava UP-TO-DATE Task :buildSrc:compileTestGroovy UP-TO-DATE Task :buildSrc:processTestResources UP-TO-DATE Task :buildSrc:testClasses UP-TO-DATE
Task :buildSrc:test WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/Users/bensiegler/.gradle/wrapper/dists/gradle-6.8.3-bin/7ykxq50lst7lb7wx1nijpicxn/gradle-6.8.3/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize() WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
io.spring.gradle.convention.JavadocApiPluginITest > multimodule api FAILED org.spockframework.runtime.ConditionFailedWithExceptionError at JavadocApiPluginITest.groovy:44 Caused by: java.io.FileNotFoundException at JavadocApiPluginITest.groovy:44
io.spring.gradle.convention.JacocoPluginITest > check with java plugin FAILED org.gradle.testkit.runner.UnexpectedBuildFailure at JacocoPluginITest.groovy:30
io.spring.gradle.convention.ShowcaseITest > build FAILED org.gradle.testkit.runner.UnexpectedBuildFailure at ShowcaseITest.groovy:31
47 tests completed, 3 failed
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':buildSrc:test'.
There were failing tests. See the report at: ........
-
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 54s
Task :buildSrc:test FAILED
A build scan was not published as you have not authenticated with server 'ge.spring.io'. 22:15:29: Task execution finished 'build'.
Comment From: jzheaux
@bensiegler are you still seeing build failures? If so, what are your OS and JDK version so I can try to reproduce?
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: tt4g
I am encountering this problem when running Gradle task in Intellij IDEA.
OS: Windows 10
$ ver
Microsoft Windows [Version 10.0.19042.985]
JDK: AdoptOpenJDK-11.0.11+9
$ <OATH_TO_JAVA>\java.exe -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
Gradle outputs
> Task :buildSrc:test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/<OMIT>/.gradle/wrapper/dists/gradle-6.9-bin/2ecsmyp3bolyybemj56vfn4mt/gradle-6.9/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
An illegal reflective access operation has occurred
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/<OMIT>/.gradle/wrapper/dists/gradle-6.9-bin/2ecsmyp3bolyybemj56vfn4mt/gradle-6.9/lib/groovy-all-1.3-2.5.12.jar) to method java.lang.Object.finalize()
Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: All illegal access operations will be denied in a future release
Use --illegal-access=warn to enable warnings of further illegal reflective access operations
All illegal access operations will be denied in a future release
io.spring.gradle.convention.JavadocApiPluginITest > multimodule api FAILED
org.spockframework.runtime.ConditionFailedWithExceptionError at JavadocApiPluginITest.groovy:44
Caused by: java.io.FileNotFoundException at JavadocApiPluginITest.groovy:44
Caused by: java.io.FileNotFoundException at JavadocApiPluginITest.groovy:44
63 tests completed, 1 failed
> Task :buildSrc:test FAILED
Execution failed for task ':buildSrc:test'.
> There were failing tests. See the report at: file:///<OMIT>/workspace/github/tt4g/spring-security/buildSrc/build/reports/tests/test/index.html
* 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.
My machine has multiple JDKs installed, and when the problem occurred, the JAVA_HOME showed the path to AdoptOpenJDK 16.
After changing JAVA_HOME to AdoptOpenJDK 11, this problem no longer occurs.
Comment From: jzheaux
@tt4g, Gradle 7 adds support for JDK 16, so we can look at building against 16 once https://github.com/spring-projects/spring-security/issues/9615 is complete.
In the absence of other reports, I'm going to close this issue.
Comment From: lmagyar89
On my side it was because in the "IDEA built in JDK" path has space character, that's why processbuilder thrown an exception. Solution was: download the required JDK, put it some path without space character, use this JDK as Gradle JVM.