Skip to content

Commit 01d82ef

Browse files
committed
Merge branch '5.3.x'
2 parents 070d087 + a37dde9 commit 01d82ef

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

gradle/ide.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ task eclipseJdtSettings(type: Copy) {
8787
outputs.upToDateWhen { false }
8888
}
8989

90-
task eclipseBuildship {
91-
dependsOn eclipseSettings, eclipseJdtSettings
92-
}
93-
9490
task eclipseWstComponentSettings(type: Copy) {
9591
from rootProject.files('src/eclipse/org.eclipse.wst.common.component')
9692
into project.file('.settings/')

import-into-eclipse.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ projects into Eclipse or the Spring Tool Suite (_STS_). It is recommended that y
55
have a recent version of Eclipse. As a bare minimum you will need Eclipse with full Java
66
8 support, Eclipse Buildship, the Kotlin plugin, and the Groovy plugin.
77

8-
The following instructions have been tested against [STS](https://spring.io/tools) 4.3.2
9-
([download](https://github.com/spring-projects/sts4/wiki/Previous-Versions#spring-tools-432-changelog))
10-
(based on Eclipse 4.12) with [Eclipse Buildship](https://projects.eclipse.org/projects/tools.buildship).
8+
The following instructions have been tested against [STS](https://spring.io/tools) 4.12.0
9+
([download](https://github.com/spring-projects/sts4/wiki/Previous-Versions#spring-tools-4120-changelog))
10+
(based on Eclipse 4.21) with [Eclipse Buildship](https://projects.eclipse.org/projects/tools.buildship).
1111
The instructions should work with the latest Eclipse distribution as long as you install
1212
[Buildship](https://marketplace.eclipse.org/content/buildship-gradle-integration). Note
1313
that STS 4 comes with Buildship preinstalled.
@@ -16,28 +16,30 @@ that STS 4 comes with Buildship preinstalled.
1616

1717
_When instructed to execute `./gradlew` from the command line, be sure to execute it within your locally cloned `spring-framework` working directory._
1818

19-
1. Ensure that Eclipse launches with JDK 8.
20-
- For example, on Mac OS this can be configured in the `Info.plist` file located in the `Contents` folder of the installed Eclipse or STS application (e.g., the `Eclipse.app` file).
21-
1. Install the [Kotlin Plugin for Eclipse](https://marketplace.eclipse.org/content/kotlin-plugin-eclipse) in Eclipse.
22-
1. Install the [Eclipse Groovy Development Tools](https://github.com/groovy/groovy-eclipse/wiki) in Eclipse.
23-
1. Switch to Groovy 2.5 (Preferences -> Groovy -> Compiler -> Switch to 2.5...) in Eclipse.
24-
1. Change the _Forbidden reference (access rule)_ in Eclipse from Error to Warning
25-
(Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rule)).
19+
1. Install the [Groovy Development Tools](https://marketplace.eclipse.org/content/groovy-development-tools).
20+
1. Switch to Groovy 3.0 in Eclipse (Preferences → Groovy → Compiler → Switch to 3.0...).
21+
- If you encounter build errors stating something similar to _"Groovy: compiler mismatch: project level is 2.5, workspace level is 3.0"_, change the Groovy compiler version to 3.0 for each affected project.
22+
1. Ensure that the _Forbidden reference (access rule)_ in Eclipse is set to `Info`
23+
(Preferences → Java → Compiler → Errors/Warnings → Deprecated and restricted API → Forbidden reference (access rule)).
24+
1. Optionally install the [Kotlin Plugin for Eclipse](https://marketplace.eclipse.org/content/kotlin-plugin-eclipse) if you need to execute Kotlin-based tests or develop Kotlin extensions.
2625
1. Optionally install the [AspectJ Development Tools](https://marketplace.eclipse.org/content/aspectj-development-tools) (_AJDT_) if you need to work with the `spring-aspects` project. The AspectJ Development Tools available in the Eclipse Marketplace have been tested with these instructions using STS 4.5 (Eclipse 4.14).
27-
1. Optionally install the [TestNG plugin](https://testng.org/doc/eclipse.html) in Eclipse if you need to execute TestNG tests in the `spring-test` module.
26+
1. Optionally install the [TestNG plugin](https://testng.org/doc/eclipse.html) in Eclipse if you need to execute individual TestNG test classes or tests in the `spring-test` module.
27+
- As an alternative to installing the TestNG plugin, you can execute the `org.springframework.test.context.testng.TestNGTestSuite` class as a "JUnit 5" test class in Eclipse.
2828
1. Build `spring-oxm` from the command line with `./gradlew :spring-oxm:check`.
29-
1. To apply project specific settings, run `./gradlew eclipseBuildship` from the command line.
30-
1. Import into Eclipse (File -> Import -> Gradle -> Existing Gradle Project -> Navigate to the locally cloned `spring-framework` directory -> Select Finish).
29+
1. To apply Spring Framework specific settings, run `./gradlew cleanEclipse eclipse` from the command line.
30+
1. Import all projects into Eclipse (File → Import → Gradle → Existing Gradle Project → Navigate to the locally cloned `spring-framework` directory → Select Finish).
3131
- If you have not installed AJDT, exclude the `spring-aspects` project from the import, if prompted, or close it after the import.
32-
- If you run into errors during the import, you may need to set the _Java home_ for Gradle Buildship to the location of your JDK 8 installation in Eclipse (Preferences -> Gradle -> Java home).
33-
1. If you need to execute JAXB-related tests in the `spring-oxm` project and wish to have the generated sources available, add the `build/generated-sources/jaxb` folder to the build path (right click on the `jaxb` folder and select `Build Path -> Use as Source Folder`).
34-
- If you do not see the `build` folder in the `spring-oxm` project, ensure that the "Gradle build folder" is not filtered out from the view. This setting is available under "Filters" in the configuration of the Package Explorer (available by clicking on the small downward facing arrow in the upper right corner of the Package Explorer).
32+
- If you run into errors during the import, you may need to set the _Java home_ for Gradle Buildship to the location of your JDK 8 installation in Eclipse (Preferences → Gradle → Java home).
33+
1. If you need to execute JAXB-related tests in the `spring-oxm` project and wish to have the generated sources available, add the `build/generated-sources/jaxb` folder to the build path (right click on the `jaxb` folder and select "Build Path → Use as Source Folder").
34+
- If you do not see the `build` folder in the `spring-oxm` project, ensure that the "Gradle build folder" is not filtered out from the view. This setting is available under "Filters" in the configuration of the Package Explorer (available by clicking on the _three vertical dots_ in the upper right corner of the Package Explorer).
3535
1. Code away!
3636

3737
## Known Issues
3838

39-
1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
40-
- See `*RepackJar` tasks in the build.
39+
1. `spring-core` should be pre-compiled due to repackaged dependencies.
40+
- See `*RepackJar` tasks in the `spring-core.gradle` build file.
41+
1. `spring-oxm` should be pre-compiled due to JAXB types generated for tests.
42+
- Note that executing `./gradlew :spring-oxm:check` as explained in the _Steps_ above will compile `spring-core` and generate JAXB types for `spring-oxm`.
4143
1. `spring-aspects` does not compile due to references to aspect types unknown to Eclipse.
4244
- If you installed _AJDT_ into Eclipse it should work.
4345
1. While JUnit tests pass from the command line with Gradle, some may fail when run from

0 commit comments

Comments
 (0)