Commit Graph

170 Commits

Author SHA1 Message Date
Juergen Hoeller b3a5473bc7 Merge branch '6.2.x'
# Conflicts:
#	framework-docs/modules/ROOT/pages/data-access/orm/hibernate.adoc
#	spring-orm/src/main/java/org/springframework/orm/hibernate5/package-info.java
#	spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaDialect.java
#	spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java
2025-06-25 19:08:30 +02:00
Juergen Hoeller 61474cc34c Upgrade to Checkstyle 10.26 2025-06-25 19:00:45 +02:00
Sam Brannen 7606a929c9 Fail build for JUnit discovery issues
JUnit 5.13 introduced support for Discovery Issues which typically
indicate configuration errors in tests that may result in unexpected
behavior.

Furthermore, discovery issues that are currently reported at INFO level
may later be reported at WARNING or ERROR level -- for example, in
JUnit 6.

In order to ensure that our test suite does not suffer from such
potential errors, this commit sets the
junit.platform.discovery.issue.severity.critical JVM system property to
INFO (instead of leaving it with the default ERROR configuration).

Doing so aligns with our build configuration which fails the build for
selected warnings in Java source code and Javadoc.

If we later determine that INFO causes unnecessary issues for us, we
can switch to WARNING.

This commit also removes two "intentionally invalid" test cases from
AutowiredConfigurationErrorsIntegrationTests, since those test cases
are now reported as invalid as of JUnit 5.13.

Closes gh-35107
2025-06-25 11:25:29 +02:00
Sébastien Deleuze ba9bef6bbf Upgrade to Kotlin 2.2.0
Kotlin 2.2 is the new baseline for Spring Framework 7.0.

-Xannotation-default-target=param-property is specified to avoid
warnings when compiling tests or documentation snippets. It is
expected to become the default behavior in an upcoming version
of Kotlin, see https://youtrack.jetbrains.com/issue/KT-73255 for
more details.

Closes gh-34453
2025-06-23 18:11:06 +02:00
Spring Builds 16edf9867a Update copyright headers in source files
This commit updates Java, Kotlin, and Groovy source files to use the
"<year>-present" pattern in copyright headers.

Closes gh-35070
2025-06-17 16:23:50 +02:00
Sam Brannen 41f35ef6b3 Update configuration for copyright headers to use "<year>-present" pattern
Historically, we have used `<introduction year>-<modification year>` as
the pattern for copyright headers.

For example: `Copyright 2002-2025 the original author or authors.`

However, we have been encouraged to use `present` as the modification
year.

In light of that, this commit updates the following to enforce the new
pattern.

- The patterns in our SpringHeaderCheck Checkstyle rules
- The `Copyright 2002-${year}` template in org.eclipse.jdt.ui.prefs
- The update_copyright_headers.sh script

See gh-35070
2025-06-17 16:20:46 +02:00
Spring Builds aee29b7f30 Update copyright headers in source files
This commit updates Java, Kotlin, and Groovy source files to use the
"<year>-present" pattern in copyright headers.

Closes gh-35070
2025-06-17 15:54:58 +02:00
Sam Brannen 89140789b9 Update configuration for copyright headers to use "<year>-present" pattern
Historically, we have used `<introduction year>-<modification year>` as
the pattern for copyright headers.

For example: `Copyright 2002-2025 the original author or authors.`

However, we have been encouraged to use `present` as the modification
year.

In light of that, this commit updates the following to enforce the new
pattern.

- The patterns in our SpringHeaderCheck Checkstyle rules
- The `Copyright 2002-${year}` template in org.eclipse.jdt.ui.prefs
- The update_copyright_headers.sh script

See gh-35070
2025-06-17 15:54:36 +02:00
Brian Clozel f111858055 Relax Java 24 toolchain requirements
While we choose our GitHub action to use Bellsoft Liberica, we should
relax that vendor requirement and ensure that contributors can build the
project with any Java 24 distribution.

Closes gh-35043
2025-06-13 00:49:05 +02:00
Juergen Hoeller 8d17afc28b Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-06-06 09:25:25 +02:00
Juergen Hoeller 9f76ea13e3 Upgrade to Groovy 4.0.27, Mockito 5.18, Checkstyle 10.25 2025-06-06 09:21:37 +02:00
Juergen Hoeller 254a55d217 Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-05-13 16:31:05 +02:00
Juergen Hoeller 4d296fb4ca Upgrade to Micrometer 1.14.7
Includes Jackson 2.18.4, Jetty 12.0.21, Netty 4.1.121, Apache HttpClient 5.4.4, Checkstyle 10.23.1

Closes gh-34889
2025-05-13 16:08:31 +02:00
Sam Brannen d0af5146e0 Add note regarding aggregated Javadoc toolchain configuration
In commit 49ef150c5d, I stated that the common javadoc task used by all
spring-* modules would be addressed in a separate commit. However,
after further investigation I determined that the spring-test Javadoc
JAR was published successfully, including links to JUnit 5 Javadoc
(which was not previously the case).

https://repo1.maven.org/maven2/org/springframework/spring-test/7.0.0-M4/spring-test-7.0.0-M4-javadoc.jar

This commit therefore only adds a note in JavaConventions to remind us
that the aggregated Javadoc toolchain configuration needs to stay in
sync with the configuration in JavaConventions.

See gh-27497
Closes gh-34774
2025-04-27 17:41:42 +02:00
Sam Brannen 5d3170448a Import junit-bom in buildSrc 2025-04-27 17:22:03 +02:00
Sam Brannen d8c7c250e3 Upgrade to JUnit Jupiter 5.12.2 in buildSrc 2025-04-27 17:03:01 +02:00
Sam Brannen 5bdec756b9 Merge branch '6.2.x' 2025-04-27 16:55:39 +02:00
Sam Brannen 9cd7b6a91e Upgrade spring-javaformat-gradle-plugin to version 0.0.43 2025-04-27 16:51:47 +02:00
Sam Brannen 98cdae6444 Merge branch '6.2.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-04-25 13:45:10 +02:00
Sam Brannen 44500cf868 Revise TestConventions to retain existing JUnit Platform options
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
This commit revises the implementation of TestConventions so that
existing JUnit Platform options from a pre-configured `test` task are
copied instead of overridden.

Closes gh-34827
2025-04-25 13:38:18 +02:00
Juergen Hoeller 8bc99fa662 Merge branch '6.2.x' 2025-04-07 22:42:52 +02:00
Juergen Hoeller ffd15155ee Upgrade to Mockito 5.17 and Checkstyle 10.23 2025-04-07 22:41:45 +02:00
Juergen Hoeller 533283a23e Merge branch '6.2.x'
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-04-01 23:44:04 +02:00
Juergen Hoeller c4e25a1162 Upgrade to Jetty 12.0.18, Apache HttpClient 5.4.3, Protobuf 4.30.2, Checkstyle 10.22
Backport Bot / build (push) Waiting to run Details
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:ubuntu-latest name:Linux]) (push) Waiting to run Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
2025-04-01 23:24:25 +02:00
Brian Clozel b8b279d3e0 Use Java 24 to build Spring Framework
This commit also adapts tests for a Java 24 runtime.

Closes gh-34639
2025-03-24 09:51:19 +01:00
Juergen Hoeller 15b251dcd6 Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-03-10 11:04:14 +01:00
Juergen Hoeller 70a1b2fae3 Upgrade to Checkstyle 10.21.4 2025-03-10 11:00:53 +01:00
Brian Clozel 84a57861d1 Merge branch '6.2.x' 2025-03-03 11:24:09 +01:00
Brian Clozel 1633ad24f3 Ignore nohttp check on buildSrc/build 2025-03-03 11:23:21 +01:00
Brian Clozel 68e9460e9b Revisit compiler configuration in project build
This commit revisit the build configuration to enforce the following:

* A single Java toolchain is used consistently with a recent Java
  version (here, Java 23) and language level
* the main source is compiled with the Java 17 "-release" target
* Multi-Release classes are compiled with their respective "-release"
  target. For now, only "spring-core" ships Java 21 variants.

Closes gh-34507
2025-02-27 14:39:43 +01:00
Vincent Potucek 67d2635947 Sync checkstyle on buildSrc
Closes gh-34434
Signed-off-by: Vincent Potucek <vincent.potucek@sap.com>
2025-02-18 21:29:31 +01:00
Juergen Hoeller dce3f71b7d Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-02-11 22:11:45 +01:00
Juergen Hoeller 2df90e32c0 Upgrade to Netty 4.1.118 and Checkstyle 10.21.2 2025-02-11 22:10:15 +01:00
rstoyanchev e9d16da633 Remove Netty 5 support
Closes gh-34345
2025-02-11 12:27:33 +00:00
Brian Clozel 11a1858e79 Merge branch '6.2.x' 2025-02-08 16:20:38 +01:00
Daeho Kwon 3548e872b9 Fix deprecation warnings in RuntimeHintsAgentPlugin
Closes gh-34390

Signed-off-by: Daeho Kwon <trewq231@naver.com>
2025-02-08 16:19:26 +01:00
Sam Brannen 36cd069c6e Exclude spring-jcl from nohttp check on main branch
The spring-jcl module no longer exists on main, but it still exists on
the 6.2.x branch and previous branches and can cause build failures when
switching between branches.
2025-01-27 15:33:43 +01:00
Brian Clozel 309f5bebdb Fixing Kotlin annotations architecture rule
See gh-34276
2025-01-17 17:57:25 +01:00
Brian Clozel 1bd9848d42 Add ArchUnit architecture checks
This commit adds a new custom build Plugin, the `ArchitecturePlugin`.
This plugin is using ArchUnit to enforce several rules in the main
sources of the project:

* All "package-info" should be `@NullMarked`
* Classes should not import forbidden types (like "reactor.core.support.Assert"
* Java Classes should not import "org.jetbrains.annotations.*" annotations
* Classes should not call "toLowerCase"/"toUpperCase" without a Locale
* There should not be any package tangle

Duplicate rules were removed from checkstyle as a result.
Note, these checks only consider the "main" source sets, so test
fixtures and tests are not considered. Repackaged sources like JavaPoet,
CGLib and ASM are also excluded from the analysis.

Closes gh-34276
2025-01-17 17:21:10 +01:00
Juergen Hoeller 38a41b6d01 Merge branch '6.2.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2025-01-15 18:29:30 +01:00
Juergen Hoeller 7d844274dc Upgrade to Jetty 12.0.16, Netty 4.1.117, Protobuf 4.29.3, Checkstyle 10.21.1 2025-01-15 18:27:49 +01:00
Sébastien Deleuze 19f647ab8c Set -Xjdk-release=17 for Kotlin build
Needed due to https://youtrack.jetbrains.com/issue/KT-49746.

See gh-34220
2025-01-14 12:35:54 +01:00
Sébastien Deleuze b85a76f983 Configure the Gradle toolchain to use Java 23
In order to be able to fix gh-34140 which requires using at least a
Java 22 compiler, this commit intends to change the configuration of
the Gradle toolchain to use Java 23, while setting the Java release to
Java 17 (or other versions when using MRJARs) when relevant in order to
keep the current Java 17 baseline.

See gh-34220
2025-01-09 15:59:34 +01:00
Juergen Hoeller 429833cae6 Merge branch '6.2.x'
# Conflicts:
#	spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java
2024-12-11 17:55:36 +01:00
Juergen Hoeller 63af572ce8 Upgrade to Jackson 2.18.2, RxJava 3.1.10, Checkstyle 10.20.2 2024-12-11 17:34:53 +01:00
Sébastien Deleuze 75e57475ca Upgrade to Kotlin 2.1.0
Spring Framework 7.0 will use a Kotlin 2 baseline, using the latest 2.x
release at the time of the release.

This commit upgrades Kotlin to 2.1.0, and Kotlin Serialization and
Coroutines accordingly.

Closes gh-33629
2024-12-05 11:42:00 +01:00
Brian Clozel 28273b9309 Add build DSL extension to enable Java preview features
This commit adds a DSL Gradle extension for optionally enabling Java
preview features in a specific project module. The "--enable-preview"
JVM flag will be configured automatically for compile and test tasks
where this is applied:

```
springFramework {
	enableJavaPreviewFeatures = true
}
```

See gh-33616
2024-11-28 16:29:47 +01:00
Juergen Hoeller 4ca596b7bc Upgrade to Micrometer 1.14.0 and Reactor 2024.0.0
Includes Netty 4.1.114, Jetty 12.0.15, Jetty Reactive HttpClient 4.0.8, RxJava 3.1.9, RSocket 1.1.4, HSQLDB 2.7.4, H2 2.3.232, SnakeYAML 2.3, Groovy 4.0.24, JRuby 9.4.9, Jackson 2.18.1, Gson 2.11, Protobuf 4.28.3, XStream 1.4.21, Woodstox 6.7, TestNG 7.10.2, Selenium 4.26, HtmlUnit 4.6, XMLUnit 2.10, Checkstyle 10.20.1

Closes gh-33876
Closes gh-33878
2024-11-13 13:34:43 +01:00
Juergen Hoeller 4e49f67ec5 Upgrade to SLF4J 2.0.16, Tomcat 10.1.29, Jetty 12.0.13, Netty 4.1.113, Undertow 2.3.17, AssertJ 3.26.3, Checkstyle 10.18.1 2024-09-11 17:16:14 +02:00
Sam Brannen 1e97b2137b Disable class data sharing (CDS) for tests
Prior to this commit, the Gradle build output the following warning
multiple times.

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Since we don't need CDS enabled for our tests, I've added `-Xshare:off`
as a JVM argument for our tests to disable CDS.

(cherry picked from commit 27985b1439)
2024-08-07 18:08:03 +03:00