Closed yuyu414 closed 3 years ago
I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.
Have you followed the instructions the following documents?
I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.
yes,Thank you. That's what I need
Have you followed the instructions the following documents?
I'll try。 building spring-framework-5.3.2 ,Is it related to gradle version or jdk version?
building spring-framework-5.3.2 ,
If you are building from the master
branch, you are actually building 5.3.3 snapshots.
Is it related to gradle version or jdk version?
As stated in the Build from Source page:
To build you will need Git and JDK 8 update 262 or later. Update 262 or later is required due to the dependency on Java Flight Recorder (JFR) types. Note, however, that Oracle JDKs do not include the JFR types. Thus, we recommend an AdoptOpenJDK distribution or similar that includes the JFR types.
The version of Gradle is managed automatically via the Gradle Wrapper. That's why you need to use ./gradlew
to execute Gradle instead of ./gradle
.
execute gradlew build
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Task :spring-tx:compileKotlin
Could not perform incremental compilation: Could not connect to Kotlin compile daemon
Could not connect to kotlin daemon. Using fallback strategy.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jetbrains.kotlin.com.intellij.util.ReflectionUtil (file:/C:/Users/vaio/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-e
mbeddable/1.4.21/87db94500aaf883536ae8c8efdee76bdc839d582/kotlin-compiler-embeddable-1.4.21.jar) to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of org.jetbrains.kotlin.com.intellij.util.ReflectionUtil
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
> Task :spring-tx:compileJava
Could not load entry 7bf6fd88d2901ffe21dd5328a3673e85 from remote build cache: Read timed out
> Task :spring-beans:test
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
> Task :spring-core:test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/C:/Users/vaio/Desktop/learn-spring-framework/spring-core/build/classes/java/main/) to constructor ja
va.util.AbstractList()
WARNING: Please consider reporting this to the maintainers of org.springframework.util.ReflectionUtils
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
> Task :spring-expression:compileTestJava
> Task :spring-core:test
StopWatchTests > validUsage() FAILED
java.lang.AssertionError at StopWatchTests.java:107
3324 tests completed, 1 failed, 13 skipped
> Task :spring-core:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-core:test'.
> There were failing tests. See the report at: file:///C:/Users/vaio/Desktop/learn-spring-framework/spring-core/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.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 17m 1s
174 actionable tasks: 145 executed, 29 from cache
The remote build cache was disabled during the build due to errors.
building spring-framework-5.3.2 ,
If you are building from the
master
branch, you are actually building 5.3.3 snapshots.Is it related to gradle version or jdk version?
As stated in the Build from Source page:
To build you will need Git and JDK 8 update 262 or later. Update 262 or later is required due to the dependency on Java Flight Recorder (JFR) types. Note, however, that Oracle JDKs do not include the JFR types. Thus, we recommend an AdoptOpenJDK distribution or similar that includes the JFR types.
The version of Gradle is managed automatically via the Gradle Wrapper. That's why you need to use
./gradlew
to execute Gradle instead of./gradle
.
OK,I used tags:v5.3.2
StopWatchTests > validUsage() FAILED java.lang.AssertionError at StopWatchTests.java:107
Line 107 in StopWatchTests
performs an assertion based on timing which may have failed due to load on your machine.
Execute the build again via ./gradlew build
to see if it passes.
StopWatchTests > validUsage() FAILED java.lang.AssertionError at StopWatchTests.java:107
Line 107 in
StopWatchTests
performs an assertion based on timing which may have failed due to load on your machine.Execute the build again via
./gradlew build
to see if it passes.
After many attempts, the problem remains the same。
@yuyu414
I just imported the project with v5.3.2
tag to IntelliJ.
"Build Project" and "Rebuild Project" on IDE works as expected.
Here is how I did:
> git clone https://github.com/spring-projects/spring-framework.git
> cd spring-framework
> git checkout v5.3.2
> sdk use java 11.0.5-zulu
> ./gradlew build -x test
After successful build, import to intellij
Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
Configure IDE to match with JDK version
- Project SDK
- Project language level
- Project bytecode version
IntelliJ: 2020.3
& 2020.3.1
.
I don't think building on IDE runs any tests. So, where are you getting the error?
If it is from command line gradlew
, then it is not related to IDE.
Also, you can simply skip test in order to import the project to IntelliJ. Passing tests is not a requirement to import into IntelliJ.
@yuyu414 I just imported the project with
v5.3.2
tag to IntelliJ. "Build Project" and "Rebuild Project" on IDE works as expected.Here is how I did:
> git clone https://github.com/spring-projects/spring-framework.git > cd spring-framework > git checkout v5.3.2 > sdk use java 11.0.5-zulu > ./gradlew build -x test After successful build, import to intellij Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle) Configure IDE to match with JDK version - Project SDK - Project language level - Project bytecode version
IntelliJ:
2020.3
&2020.3.1
.I don't think building on IDE runs any tests. So, where are you getting the error? If it is from command line
gradlew
, then it is not related to IDE.Also, you can simply skip test in order to import the project to IntelliJ. Passing tests is not a requirement to import into IntelliJ.
I did the same thing,it is from command line gradlew. I live in China,Maybe I can't use gradle properly because of the blocking policy of the government's overseas network!
I'll take care of this. Thank you (ttddyy and sbrannen). I'm going to close it。
Import the project into IDEA, and this is the result of Gradle's compilation.