Commit Graph

33 Commits

Author SHA1 Message Date
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
Juergen Hoeller 7fa5b8dcb5 Turn CGLIB patch into full CGLIB fork in spring-core
Closes gh-28955
2022-08-12 11:38:43 +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 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 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 a37dde9a1c Revise Eclipse/STS Project Import Guide based on status quo
See gh-27407
2021-09-21 12:11:27 +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
Sam Brannen 4152ebc2f3 Remove Eclipse resource filter for 'build' folder
Commit 3eec27a723 introduced a custom resource filter for projects
imported into Eclipse IDE. However, commit 85eb589c2e introduced
generated source files within the Gradle 'build' folder, and the filter
prevents Eclipse from seeing the generated sources, resulting in build
errors within the spring-oxm project in Eclipse.

This commit therefore effectively reverts 3eec27a723 by removing the
resource filter.

See gh-25787
2021-05-04 11:36:21 +02:00
Sam Brannen 6ea39fd122 Upgrade to Gradle 6.8
Closes gh-26368
2021-01-12 10:42:07 +01:00
Sam Brannen fd70a9e95d Fix comment
See gh-26140
2020-11-23 17:42:49 +01:00
Sam Brannen 298cb22bfe Ensure that projects can be imported into Eclipse IDE
Recently the Spring Framework projects could no longer be imported into
Eclipse IDE without compilation errors in JMH sources.

This commit addresses this issue by applying workarounds for bugs in
Gradle and the JMH plugin for Gradle.

Gradle bug: https://github.com/gradle/gradle/issues/14932

JMH plugin bug: https://github.com/melix/jmh-gradle-plugin/issues/157

The Gradle bug has already been fixed in Gradle 6.8 RC1; however, the
issue for the JMH plugin bug seems not to have been triaged yet.

Closes gh-26140
2020-11-23 17:24:57 +01:00
Brian Clozel 561af5f8f9 Replace propdeps plugin with custom plugin
Prior to this commit, the Spring Framework build would be using the
propdeps Gradle plugin to introduce two new configurations to the build:
"optional" and "provided". This would also configure related conventions
for IDEs, adding those configurations to published POMs.

This commit removes the need for this plugin and creates instead a
custom plugin for an "optional" configuration. While the Eclipse IDE
support is still supported, there is no need for specific conventions
for IntelliJ IDEA anymore.
This new plugin does not introduce the "provided" scope, as
"compileOnly" and "testCompileOnly" are here for that.

Also as of this commit, optional/provided dependencies are not published
with the Spring Framework modules POMs annymore.
Generally, these dependencies do not provide actionable information to
the developers reading / tools consuming the published POMs.

Optional/Provided dependencies are **not**:
* dependencies you can add to enable some supported feature
* dependencies versions that you can use to figure out CVEs or bugs
* dependencies that might be missing in existing Spring applications

In the context of Spring Framework, optional dependencies are just
libraries are Spring is compiling against for various technical reasons.
With that in mind, we are not publishing that information anymore.

See gh-23282
2019-08-13 18:19:37 +02:00
Spring Operator 5938742afd URL Cleanup (#22515)
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were fixed successfully.

* http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ migrated to:
  https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/ ([https](https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/) result 200).
* http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ migrated to:
  https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/ ([https](https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/) result 200).
* http://docs.oracle.com/javaee/7/api/ migrated to:
  https://docs.oracle.com/javaee/7/api/ ([https](https://docs.oracle.com/javaee/7/api/) result 200).
* http://docs.oracle.com/javase/8/docs/api/ migrated to:
  https://docs.oracle.com/javase/8/docs/api/ ([https](https://docs.oracle.com/javase/8/docs/api/) result 200).
* http://fasterxml.github.io/jackson-core/javadoc/2.9/ migrated to:
  https://fasterxml.github.io/jackson-core/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-core/javadoc/2.9/) result 200).
* http://fasterxml.github.io/jackson-databind/javadoc/2.9/ migrated to:
  https://fasterxml.github.io/jackson-databind/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-databind/javadoc/2.9/) result 200).
* http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ migrated to:
  https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/ ([https](https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/) result 200).
* http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ migrated to:
  https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/ ([https](https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/) result 200).
* http://issues.gradle.org/browse/GRADLE-1116 migrated to:
  https://issues.gradle.org/browse/GRADLE-1116 ([https](https://issues.gradle.org/browse/GRADLE-1116) result 200).
* http://projectreactor.io/docs/core/release/api/ migrated to:
  https://projectreactor.io/docs/core/release/api/ ([https](https://projectreactor.io/docs/core/release/api/) result 200).
* http://tiles.apache.org/framework/apidocs/ migrated to:
  https://tiles.apache.org/framework/apidocs/ ([https](https://tiles.apache.org/framework/apidocs/) result 200).
* http://tiles.apache.org/tiles-request/apidocs/ migrated to:
  https://tiles.apache.org/tiles-request/apidocs/ ([https](https://tiles.apache.org/tiles-request/apidocs/) result 200).
* http://www.apache.org/licenses/LICENSE-2.0 migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ migrated to:
  https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/ ([https](https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/) result 200).
* http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ migrated to:
  https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/ ([https](https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/) result 200).
* http://docs.spring.io/spring-framework/docs migrated to:
  https://docs.spring.io/spring-framework/docs ([https](https://docs.spring.io/spring-framework/docs) result 301).
* http://glassfish.java.net/nonav/docs/v3/api/ migrated to:
  https://glassfish.java.net/nonav/docs/v3/api/ ([https](https://glassfish.java.net/nonav/docs/v3/api/) result 301).
* http://projects.spring.io/spring-framework migrated to:
  https://projects.spring.io/spring-framework ([https](https://projects.spring.io/spring-framework) result 301).
* http://springframework.org/schema migrated to:
  https://springframework.org/schema ([https](https://springframework.org/schema) result 301).
* http://ehcache.org/apidocs/2.10.4 (301) migrated to:
  https://www.ehcache.org/apidocs/2.10.4 ([https](https://ehcache.org/apidocs/2.10.4) result 301).
2019-03-05 23:21:36 +01:00
Phillip Webb 9477915dbf Update eclipse setting and instructions
Refine project specific eclipse settings and update the
instructions with details of how they can be applied.
2018-06-25 17:56:53 -07:00
Sam Brannen 1cb96f47c8 Fix Eclipse support in Gradle build
The upgrade to Gradle 4.0 broke the custom Eclipse support in the
Spring Framework build.

This commit includes the following changes which re-enable support for
Eclipse in the build.

- Switched to ProjectDependency(String) constructor

- Updated regular expression that matches against project output
  dependencies to include more than one subdirectory between "build"
  and "main"|"test".

Issue: SPR-15862
2017-08-22 22:16:34 +01:00
Sam Brannen e9e5149001 Fix cleanEclipseJdtUi task in the Gradle build 2015-01-08 18:32:12 +01:00
Sam Brannen 431aed3b01 Fix typo in ide.gradle 2014-12-13 14:37:50 +01:00
Sam Brannen 987806f7c2 Polishing 2014-05-30 14:35:01 +02:00
Sam Brannen 8ee94a4392 Eclipse project deps come after third-party libs
Prior to this commit, the ordering of classpath entries in the
generated Eclipse .classpath files did not align with the intended
dependency management configured in the Gradle build. Specifically,
project dependencies often came before dependencies on third-party
libraries required for the given project, causing the project not to
compile in Eclipse.

This commit fixes this issue by introducing new functionality in the
ide.gradle script that moves all project dependencies to the end of the
generated classpath.

Issue: SPR-11836
2014-05-30 13:31:02 +02:00
Sam Brannen d46b29e71f Upgrade Eclipse project settings for Java 8
- Set the eclipse.jdt source and target compatibility to 1.8 in
   ide.gradle.

 - Updated the instructions in import-into-eclipse.sh to reflect minimum
   requirements for building Spring Framework 4.1 against Java 8 with
   Eclipse and STS

Issue: SPR-11831
2014-05-29 17:26:25 +02:00
Phillip Webb 84e4244793 Use source 1.7 until eclipse supports JDK 8
Specifically set the source level in generated eclipse projects to 1.7
rather than 1.8. Allows the current eclipse milestone (4.3 M6) in
combination with JDK 8.0 to be used for Spring 4.0 development.
2013-05-06 15:21:24 -07:00
Phillip Webb a99a4ed9b5 Tweak gradle generated eclipse meta-data
- Change output folders to /bin/main and /bin/test. This prevents
   'gradle clean' from breaking eclipse.

 - Update copyright header for new files to '2002-2013'
2013-01-24 09:44:25 -08:00
Phillip Webb 3eec27a723 Filter build folder resources in eclipse
Apply eclipse project 'filter' to hide generated build artifacts from
the workspace.
2013-01-22 14:36:38 -08:00
Phillip Webb 8bb67149a7 Fix eclipse .settings generation
Fix issues where gradle would not regenerate .settings files due to
the task being considered UP-TO-DATE.
2013-01-14 11:42:12 -08:00
Phillip Webb f57c24cd8c Allow 'gradle eclipse' without 'cleanEclipse'
Allow eclipse projects to be regenerated without first requiring the
'gradle cleanEclipse' task to be executed.
2013-01-14 10:25:33 -08:00
Phillip Webb 2db7a12288 Generate eclipse project settings from gradle
Update gradle to generate the following project specific eclipse
settings:

- Java formatting
- Cleanup options
- Warning settings
- Code template with copyright header
- WTP module meta-data

In addition this commit changes the eclipse project .classpath file
to output test and main classes to different folders. This is required
to prevent eclipse WTP from packaging test classes into /WEB-INF/lib
jar files.

Issue: SPR-9518
2013-01-11 12:43:16 -08:00
Phillip Webb 0751b2cbeb Convert Gradle build to use new propdeps-plugin
Replace existing 'optional' and 'provided' Spring specific build
extensions with a new Gradle propdeps-plugin. Optional and Provided
dependencies are now defined use dependency configurations.

The new plugin does not currently support the notion of optional
runtime dependencies. All optional dependencies are implicitly
part of the 'compile' scope. This is an intentional design decision
that aims to keep both the plugin and the build simple. Since optional
dependencies are non-transitive this restriction should not cause
any real problems for existing users. The only existing dependency
affected is 'commons-io' in the 'spring-beans' project, however, this
was an optional compile scope dependency in the previous Spring 3.1
release.

Both provided and optional dependencies are no longer exported from
generated eclipse .classpath files. This fixes several tests that
would previously fail when running within eclipse. The servlet-api
specific elements of ide.gradle are also no longer required.

Issue: SPR-9656, SPR-10070
2012-12-09 21:33:34 -08:00
Phillip Webb a268528726 Polish .gradle file formatting to use tabs
Replace spaces with tabs for consistency with Java source code
2012-12-09 21:32:27 -08:00
Rob Winch 6e8eede0bf Make GRADLE-1116 workaround more generic
Previously the workaround for GRADLE-1116 only worked for the
merge-dist.gradle projects

Now the workaround is more generic and fixes errors that have since
been introduced when performing a fresh import into Eclipse.
2012-11-26 20:07:55 -06:00