Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise Eclipse IDE support #27407

Closed
12 tasks done
sbrannen opened this issue Sep 15, 2021 · 1 comment
Closed
12 tasks done

Revise Eclipse IDE support #27407

sbrannen opened this issue Sep 15, 2021 · 1 comment
Assignees
Labels
type: task A general task
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Sep 15, 2021

Overview

After the upgrade to Gradle 7.2 (#26870), I noticed that we can likely greatly simplify our custom Gradle configuration for Eclipse IDE.

Example Warnings

> Task :spring-core:eclipseSettings
Execution optimizations have been disabled for task ':spring-core:eclipseSettings' to ensure correctness due to the following reasons:

  - Gradle detected a problem with the following location: '/spring-framework/spring-core/.settings'. Reason: Task ':spring-core:eclipseJdt' uses this output of task ':spring-core:eclipseSettings' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: '/spring-framework/spring-core/.settings'. Reason: Task ':spring-core:eclipseJdt' uses this output of task ':spring-core:eclipseSettings' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.2/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.

> Task :spring-core:eclipseWstComponentSettings
Execution optimizations have been disabled for task ':spring-core:eclipseWstComponentSettings' to ensure correctness due to the following reasons:

  - Gradle detected a problem with the following location: '/spring-framework/spring-core/.settings'. Reason: Task ':spring-core:eclipseJdt' uses this output of task ':spring-core:eclipseWstComponentSettings' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: '/spring-framework/spring-core/.settings'. Reason: Task ':spring-core:eclipseJdt' uses this output of task ':spring-core:eclipseWstComponentSettings' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.2/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.

Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

Deliverables

  • Fix deprecation warnings in the build for the eclipse Gradle task.
  • Simplify ide.gradle -- for example, by removing support for Eclipse web tools which we no longer need.
  • Update import-into-eclipse.md for 5.3.x
    • Verify Java support
    • Verify Groovy support
    • ❌ Verify Kotlin support
    • ❌ Verify AJDT support
  • Update import-into-eclipse.md for main (6.0)
    • Verify JDK 17 support
    • ❌ Verify Groovy support
    • ❌ Verify Kotlin support
    • ❌ Verify AJDT support
@sbrannen sbrannen added the type: task A general task label Sep 15, 2021
@sbrannen sbrannen added this to the 5.3.11 milestone Sep 15, 2021
@sbrannen sbrannen self-assigned this Sep 15, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Sep 21, 2021
In order to allow developers to execute TestNG tests in Eclipse IDE
without installing the TestNG plugin for Eclipse, this commit introduces
a JUnit Platform @suite class that can be executed within the IDE.

See spring-projectsgh-27407
sbrannen added a commit that referenced this issue Sep 21, 2021
This commit makes all test methods in our TestNG test classes public
due to the following bug in the TestNG engine for the JUnit Platform.

junit-team/testng-engine#16

See gh-27407
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Sep 21, 2021
sbrannen added a commit that referenced this issue Sep 21, 2021
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
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Sep 21, 2021
As documented, it's only required if you with to run Kotlin tests or
develop Kotlin extensions.

See spring-projectsgh-27407
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Sep 21, 2021
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Sep 22, 2021
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 spring-projectsgh-27407
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Oct 6, 2021
@sbrannen
Copy link
Member Author

The Groovy Development Tools currently do no work with Eclipse 20210-09 and Java 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant