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

Upgrades to cf-java-client #1201

Conversation

pacphi
Copy link
Contributor

@pacphi pacphi commented Oct 13, 2023

It's been 7 months since the 5.10.0.RELEASE. The current release documentation states that that release is compatible with Spring Boot release versions up to 2.6.x. Meanwhile, Spring Boot 3.1.x is the current release, with Spring Boot 3.2.x nearing GA.

There's not much that needed to change to prepare a version of the cf-java-client to be compatible with Spring Boot 3.1.x, but it does require setting target to Java 17. That required a change to the maven-compiler-plugin compileArgs configuration to facilitate source code generation and data-binding when using Immutables. I also took the test dependencies forward, so that in the future, the tests could be refactored to leverage JUnit 5 APIs. The rest of the changes are pretty straight-forward, just upgrades to dependencies and plugins to the latest available as of the date of this pull request.

Default build with Maven 3.9.4 targets Java 8 and upgrades Spring Boot to 2.7.16.

Maven profiles get activated based on the installed version of the JDK detected. These profiles update the dependencies and plugins to support compilation and testing on Java 17 and 21 with Spring Boot 3.1.4 dependency management.

A Github Action workflow was added to provide signal on "good builds".

Currently, tests fail when targeting either Java 17 or 21. See this open issue for more details: immutables/immutables#1339.

Also did a fair amount of cleanup across Maven child modules where we had unused imports.

This PR was based upon earlier work in #1198.

It's been 7 months since the 5.10.0.RELEASE. The current release documentation states that that release is compatible with Spring Boot release versions up to 2.6.x. Meanwhile, Spring Boot 3.1.x is the current release, with Spring Boot 3.2.x nearing GA.

There's not much that needed to change to prepare a version of the cf-java-client to be compatible with Spring Boot 3.1.x, but it does require setting target to Java 17. That required a change to the maven-compiler-plugin compileArgs configuration to facilitate source code generation and data-binding when using Immutables. I also took the test dependencies forward, so that in the future, the tests could be refactored to leverage JUnit 5 APIs. The rest of the changes are pretty straight-forward, just upgrades to dependencies and plugins to the latest available as of the date of this pull request.

Default build with Maven 3.9.4 targets Java 8 and upgrades Spring Boot to 2.7.16.

Maven profiles get activated based on the installed version of the JDK detected.  These profiles update the dependencies and plugins to support compilation and testing on Java 17 and 21 with Spring Boot 3.1.4 dependency management.

A Github Action workflow was added to provide signal on "good builds".

Currently, tests fail when targeting either Java 17 or 21.  See this open issue for more details: immutables/immutables#1339.

> This PR was based upon earlier work in cloudfoundry#1198.
* support for building cf-java-client with Java 8, 11, 17, and 21
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 13, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@anthonydahanne
Copy link
Contributor

@pivotal-david-osullivan I think this PR puts us in a good spot: removed unused imports, deps upgrades, and I checked it builds on Java 8

We can address JDK 17 and 21 Immutable issues in a later PR

LGTM, please review! (I don't have approver rights on this project)

* active when compile target is JDK 8
* update .gitignore to exclude all sub-directories underneath .idea and exclude .history directory
* replace javax.annotation with jakarta.annotation
@pivotal-david-osullivan pivotal-david-osullivan merged commit 04205c4 into cloudfoundry:main Dec 21, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants