Commit Graph

276 Commits

Author SHA1 Message Date
Brian Clozel e9ada8d15c Upgrade JMH build plugins
This commit upgrades the Gradle JMH plugin to 0.6.8 and the companion
JMH version to 1.36.
2022-12-05 13:02:11 +01:00
Sam Brannen 902f8dd1d8 Upgrade Gradle wrapper
See gh-29583
2022-11-25 23:12:08 +01:00
Juergen Hoeller 22f8ea61fb Upgrade to Gradle 7.6
Closes gh-29583
2022-11-25 22:33:09 +01:00
Brian Clozel acd9016fc3 Create framework-docs module
This commit creates a new "framework-docs" module, which is dedicated to
documentation generation (reference and API docs).
This commit refactors the build configuration and moves the asciidoc
files to a separate location, but does not change the name nor the
nature of published artifacts.

Closes gh-29417
2022-11-02 10:59:12 +01:00
Brian Clozel 6b0f6e9f27 Apply Gradle Test Retry plugin
The plugin is configured to detect flaky tests and retry them 3 times
when running on the CI, but still reports failures. This will provide a
standard way to detect flaky tests as failures and successful attempts
are shown in the tests report.
2022-10-06 13:54:28 +02:00
Brian Clozel 8e24797d37 Merge branch '5.3.x' 2022-09-30 14:42:00 +02:00
Brian Clozel 777caef4f7 Upgrade to Gradle 7.5.1 2022-09-30 14:35:31 +02:00
Sam Brannen 2872282d75 Ensure Kotlin JMH folder is imported as test folder in Eclipse
Commit 9a180d1811 introduced Kotlin-based
JMH benchmarks which prevent spring-beans from being imported into the
Eclipse IDE.

This commit ensures that src/jmh/kotlin is imported in Eclipse with the
"test" attribute set.

See gh-24104
2022-09-26 14:21:49 +02:00
Brian Clozel 3e41d7f23e Remove extra asciidoctor configuration
See gh-29162
2022-09-19 13:00:42 +02:00
Jay Bryant 2bf8eeb120 Switch to spring-asciidoctor-backends
This commit uses the new AsciiDoctor backend.

Closes gh-29162
2022-09-19 11:02:21 +02:00
Sam Brannen b87d48b99b Merge branch '5.3.x' 2022-09-14 17:18:00 +02:00
Marc Wrobel ce49068ff9 Fix links in Javadoc and reference docs
- Fix broken links (by using a new URL, an alternative URL, or a
  Wayback Machine link)

- Use HTTPS where possible

- Remove https://issuetracker.springsource.com/browse/EBR-349: this
  link is dead and is also mentioned in
  https://jira.spring.io/browse/SPR-8093

- Clean up nohttp allowlist.lines

Closes gh-28876
2022-09-14 17:00:11 +02:00
Juergen Hoeller 7fa5b8dcb5 Turn CGLIB patch into full CGLIB fork in spring-core
Closes gh-28955
2022-08-12 11:38:43 +02:00
Brian Clozel 10e4965f99 Guard against new Spring modules in ApiDiff task
Prior to this commit, the ApiDiff Gradle task would be configured for
all submodules of the Spring Framework project and would assume that
they all existed for the baseline version considered for the API diff.

This would cause issues when:
* the sub-project is not published as it's not an official "spring-*"
  module
* the "spring-*" module is new and did not exist for the baseline
  version

This commit ensures that only "spring-*" modules are considered for this
task and that we trigger an early resolution of the baseline version -
if the version doesn't exist, a warn message is logged and we assume
that this is a new module, to be compared with an empty configuration.

This commit also renames the "spring-core-graalvm" project to
"graalvm-feature", since this sub-project is not an official module
published to Maven Central, but rather an internal dependency.

Fixes gh-28818
2022-07-28 10:51:53 +02:00
Sébastien Deleuze 22a750f378 Replace build-time initialization by constant fields
This commit leverages a subset of @philwebb initial experimentation
to compute at build time the value of specific boolean static fields
in native images. This enhancement is implemented for now as a
GraalVM feature.

The goal here is to keep an optimized footprint via build time code
removal without leveraging build-time class initialization which is known
for the blocking compatibility issues it introduces due to its viral nature.

For now, the static fields initialized at build time with native are:
 - NativeDetector#imageCode
 - Fields with a name ending by "Present" in "org.springframework" package
   typically used for classpath check with ClassUtils#isPresent

Closes gh-28624
2022-06-24 13:54:20 +02:00
Sam Brannen a1f14e8eeb Merge branch '5.3.x' 2022-06-16 16:14:05 +02:00
Sam Brannen bdf91ac435 Set default encoding for Eclipse projects to UTF-8
This change aligns with Java 18 support in recent versions of Eclipse.
2022-06-16 16:13:35 +02:00
Sam Brannen bd4ce3ec16 Upgrade to Gradle 7.4.2 2022-05-05 16:35:52 +02:00
Sam Brannen dd30da1282 Upgrade to Gradle 7.4.1 2022-03-20 11:24:02 +01:00
Brian Clozel 4c410cbe54 Remove toolchain configuration for Kotlin
Kotlin currently only supports JDK17 language level, which is our
minimum requirement so far.
This commit simplifies the toolchain setup until this is needed again.

See 303e363adf
2022-02-14 13:04:09 +01:00
Brian Clozel 303e363adf Configure Gradle JVM toolchain for Kotlin tasks 2022-02-14 11:47:16 +01:00
Brian Clozel 6c42bcfaec Upgrade to Kotlin 1.6.20-M1
This commit upgrades the Kotlin dependencies to 1.6.20-M1 and configures
the build to generate Java 17 bytecode for Kotlin classes.

Closes gh-27814
2022-02-11 11:39:32 +01:00
Brian Clozel 2019e176ee Upgrade to AspectJ 1.9.8
This commit also upgades the dedicated Gradle plugin for AspectJ build
integration.

Closes gh-27416
2022-02-11 11:13:52 +01:00
Sam Brannen 5c60a721a7 Upgrade to Gradle 7.4
Closes gh-28020
2022-02-08 16:26:37 +01:00
Sam Brannen 1dee80e750 Upgrade to Gradle 7.3.3 2022-01-03 15:59:37 +01:00
xixingya 5593e1e406
Fix javax.servlet doc to jakarta.servlet (#27692) 2021-11-17 11:29:54 +01:00
Brian Clozel ac694eeac8 Upgrade to Gradle 7.3 2021-11-10 19:40:39 +01:00
Sam Brannen 8e245e4410 Remove commented-out custom stylesheet for Javadoc
The team has decided to use the default Javadoc stylesheet with JDK 17.

Closes gh-27496
2021-10-20 13:07:45 +02:00
Sam Brannen f78d9cdf22 Remove configuration of obsolete html5 javadoc option 2021-10-19 16:58:36 +02:00
Sam Brannen aa5a2a8600 Disable custom stylesheet for Javadoc
The custom stylesheet used with JDK 8 no longer works with JDK 17.

Thus in order to make the generated Javadoc usable, we are disabling
the custom stylesheet for the time being.

See gh-27496
2021-10-19 16:42:22 +02:00
Sam Brannen 887ecffaa9 Merge branch '5.3.x' 2021-10-13 20:05:18 +02:00
Sam Brannen fcf4315e02 Indent with tabs instead of spaces 2021-10-13 20:04:40 +02:00
Sam Brannen c25aefdb2b Merge branch '5.3.x' 2021-10-05 15:24:11 +02:00
Sam Brannen 0e83466023 Reference Hamcrest Javadoc via javadoc.io
Due to an SSL/TLS issue with hamcrest.org, the Dokka task fails with the
following.

> Failed to download package-list from https://hamcrest.org/JavaHamcrest/javadoc/2.1/package-list,
> this might suggest that remote resource is not available, module is
> empty or dokka output got corrupted

See: https://github.com/hamcrest/JavaHamcrest/issues/280

As a workaround, this commit switches to javadoc.io to reference the
Hamcrest Javadoc APIs.
2021-10-05 15:23:44 +02:00
Sam Brannen 030ba52805 Merge branch '5.3.x' 2021-09-29 16:56:33 +02:00
Sam Brannen 96e4d3a530 Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the
`Xwerror` flag for the `javadoc` tool. In addition, we now use
`Xdoclint:syntax` instead of `Xdoclint:none` in order to validate
syntax within our Javadoc.

This commit fixes all resulting Javadoc errors and warnings.

This commit also upgrades to Undertow 2.2.12.Final and fixes the
artifact names for exclusions for the Servlet and annotations APIs.

The incorrect exclusion of the Servlet API resulted in the Servlet API
being on the classpath twice for the javadoc task, which resulted in the
following warnings in previous builds.

javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation"

Closes gh-27480
2021-09-29 14:02:37 +02:00
Sam Brannen a247b83cd9 Ensure projects can be imported into Eclipse IDE with JDK 17
Prior to this commit, the Spring Framework projects could not be
imported into Eclipse IDE when using JDK 17 to build the projects.

The primary obstacle is the fact that Eclipse enforces a strict
"no split packages between the unnamed module and a system module" rule
when building with a "modular JDK" (such as JDK 17).

Resources:

- https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928
- https://bugs.openjdk.java.net/browse/JDK-8215739
- http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-December/014077.html
- https://stackoverflow.com/questions/51094274/eclipse-cant-find-xml-related-classes-after-switching-build-path-to-jdk-10/53824670#53824670

Since the bug (JDK-8215739) has not been fixed in OpenJDK, the strict
"no split packages" rule does not apply to the Java compiler used in
Spring Framework's Gradle build or the compiler in IntelliJ IDEA. Hence,
this issue only arrises when building the framework in Eclipse IDE.

This commit addresses this issue in the following affected projects.

- spring-oxm: removal of the dependency on XPP3 which publishes
    javax.xml.namespace.QName as part of the JAR. The QName type is
    also published by the java.xml JDK 17 system module. To make the
    tests pass, we have switched to using the DomDriver instead of the
    XppDriver in our XStream tests.

- spring-test: HtmlUnit has a transitive dependency on xml-apis which
    publishes several packages also published by java.xml JDK 17 system
    module. Thus, we have explicitly excluded the transitive dependency
    on xml-apis for our `optional` configuration.

See gh-27407
2021-09-22 16:22:27 +02:00
Sam Brannen d6570fa2ac Merge branch '5.3.x' 2021-09-21 12:39:38 +02:00
Sam Brannen b0dceb484a Remove Eclipse Web Tools Platform (WTP) configuration
Since the team no longer needs the ability to treat Eclipse projects as
WTP modules, this commit removes the obsolete custom WTP configuration
for importing projects into Eclipse IDE.

See gh-27407
2021-09-21 12:37:51 +02:00
Sam Brannen 01d82ef0c6 Merge branch '5.3.x' 2021-09-21 12:11:52 +02:00
Sam Brannen a37dde9a1c Revise Eclipse/STS Project Import Guide based on status quo
See gh-27407
2021-09-21 12:11:27 +02:00
Juergen Hoeller 0640da74bc Upgrade to Checkstyle 9.0, Groovy 3.0.9, Hibernate ORM 5.5.7
Includes downgrade of Kotlin language level to 1.8 (for KotlinScriptTemplateTests)
2021-09-15 15:26:13 +02:00
Brian Clozel c0e479460e Switch CI pipeline to a JDK17 baseline
This commit introduces a new `spring-framework-6.0.x` CI pipeline with
JDK 17 baseline.

Note that Kotlin still uses a JDK11 baseline for now, this will be
addressed in gh-27413.

Closes gh-27409
2021-09-15 12:37:10 +02:00
Sam Brannen 2d65bce18e Polish Eclipse IDE support 2021-09-14 21:59:32 +02:00
Sam Brannen 4322ee1944 Polish Eclipse IDE support 2021-09-14 21:42:00 +02:00
Sam Brannen 3faf445603 Re-enable import into Eclipse IDE
The migration to Gradle 7.2 resulted in a regression for our Eclipse
IDE support: several projects ended up with recursive classpath entries
in their generated .classpath files which prevent those projects from
being built within Eclipse.

This commit addresses this issue with a solution that may well be a
"hack". Nonetheless, a working hack is better than not being able to
import into Eclipse at all.

See gh-26870
2021-09-14 21:05:57 +02:00
Sam Brannen 9e986c031b Polish ide.gradle 2021-09-14 20:51:59 +02:00
Brian Clozel c02ae7bcb8 Fix noHttp failure 2021-09-13 10:14:58 +02:00
Brian Clozel ca34d0cce8 Polish Gradle upgrade
Closes gh-26870
2021-09-13 10:06:27 +02:00
Sébastien Deleuze ab41db474e Update dokka to 1.5.0
See gh-26870
2021-09-13 09:40:32 +02:00