Skip to content

Commit

Permalink
feat: move Java baseline from 8 (1.8) to 11
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa authored Oct 11, 2024
1 parent 75656b7 commit 0ffd1ea
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 225 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8,11,17,21]
java: [11,17,21]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ jobs:
with:
path: ~/.m2/repository
key: cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Setup Java 8
- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
- name: Install Kubernetes Client
run: make quickly MAVEN_ARGS="${MAVEN_ARGS}"
Expand Down Expand Up @@ -84,10 +84,10 @@ jobs:
with:
path: ~/.m2/repository
key: cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Setup Java 8
- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
- name: Install and Run Integration Tests
run: |
Expand Down Expand Up @@ -115,10 +115,10 @@ jobs:
with:
path: ~/.m2/repository
key: cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Setup Java 8
- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
- name: Install and Run Integration Tests
run: |
Expand Down Expand Up @@ -146,10 +146,10 @@ jobs:
with:
path: ~/.m2/repository
key: cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Setup Java 8
- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
- name: Install and Run Integration Tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java 8
- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
- name: Check Java Docs
run: ./mvnw ${MAVEN_ARGS} clean install javadoc:jar -DskipTests -Pjavadoc-test
43 changes: 2 additions & 41 deletions .github/workflows/release-snapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,7 @@ env:
# contents: read

jobs:
build-release-java-8-snapshot:
name: Release Java 8 SNAPSHOT
# Cheap way to prevent accidental releases
# Modify the list to add users with release permissions
if: contains('["manusa","rohanKanojia"]', github.actor)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache .m2 registry
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: cache-snapshot-release-${{ github.sha }}-${{ github.run_id }}
- name: Setup Java 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
server-id: ossrh
server-username: OSSRHUSERNAME
server-password: OSSRHPASSWORD
gpg-private-key: ${{ secrets.SIGNINGKEY }}
gpg-passphrase: SIGNINGPASSWORD
- name: Build and release Java 8 modules
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} clean deploy
build-release-java-11-snapshot:
needs: build-release-java-8-snapshot
name: Release Java 11 SNAPSHOT
# Cheap way to prevent accidental releases
# Modify the list to add users with release permissions
Expand All @@ -88,17 +61,5 @@ jobs:
server-password: OSSRHPASSWORD
gpg-private-key: ${{ secrets.SIGNINGKEY }}
gpg-passphrase: SIGNINGPASSWORD
- name: Build and release Java 11 modules
run: |
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} \
-pl "httpclient-jdk" \
-pl "httpclient-jetty" \
-pl "junit/kube-api-test" \
-pl "junit/kube-api-test/core" \
-pl "junit/kube-api-test/client-inject" \
clean deploy
- name: Build and release BOM
run: |
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} clean sundr:generate-bom &&
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} gpg:sign-and-deploy-file -Prelease -Dgpg.passphrase=${{ secrets.SIGNINGPASSWORD }} -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DpomFile="target/classes/kubernetes-client-bom/pom.xml" -Dfile="target/classes/kubernetes-client-bom/pom.xml" &&
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} gpg:sign-and-deploy-file -Prelease -Dgpg.passphrase=${{ secrets.SIGNINGPASSWORD }} -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/content/repositories/snapshots/ -DpomFile="target/classes/kubernetes-client-bom-with-deps/pom.xml" -Dfile="target/classes/kubernetes-client-bom-with-deps/pom.xml"
- name: Build and release Java modules
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} clean deploy
45 changes: 2 additions & 43 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,36 +42,7 @@ env:
# contents: read

jobs:
release-java-8:
name: Release Java 8 ${{ github.event.inputs.tag }}
# Cheap way to prevent accidental releases
# Modify the list to add users with release permissions
if: contains('["manusa","rohanKanojia"]', github.actor)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Cache .m2 registry
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: cache-release-${{ github.sha }}-${{ github.run_id }}
- name: Setup Java 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: ${{ github.event.inputs.java_distribution }}
server-id: ossrh
server-username: OSSRHUSERNAME
server-password: OSSRHPASSWORD
gpg-private-key: ${{ secrets.SIGNINGKEY }}
gpg-passphrase: SIGNINGPASSWORD
- name: Build and release Java 8 modules
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} clean deploy
release-java-11:
needs: release-java-8
name: Release Java 11 ${{ github.event.inputs.tag }}
# Cheap way to prevent accidental releases
# Modify the list to add users with release permissions
Expand All @@ -97,17 +68,5 @@ jobs:
server-password: OSSRHPASSWORD
gpg-private-key: ${{ secrets.SIGNINGKEY }}
gpg-passphrase: SIGNINGPASSWORD
- name: Build and release Java 11 modules
run: |
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} \
-pl "httpclient-jdk" \
-pl "httpclient-jetty" \
-pl "junit/kube-api-test" \
-pl "junit/kube-api-test/core" \
-pl "junit/kube-api-test/client-inject" \
clean deploy
- name: Build and release BOM
run: |
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} clean sundr:generate-bom &&
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} gpg:sign-and-deploy-file -Prelease -Dgpg.passphrase=${{ secrets.SIGNINGPASSWORD }} -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DpomFile="target/classes/kubernetes-client-bom/pom.xml" -Dfile="target/classes/kubernetes-client-bom/pom.xml" &&
./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} gpg:sign-and-deploy-file -Prelease -Dgpg.passphrase=${{ secrets.SIGNINGPASSWORD }} -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DpomFile="target/classes/kubernetes-client-bom-with-deps/pom.xml" -Dfile="target/classes/kubernetes-client-bom-with-deps/pom.xml"
- name: Build and release Java 8 modules
run: ./mvnw ${MAVEN_ARGS} ${RELEASE_MAVEN_ARGS} clean deploy
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@

#### _**Note**_: Breaking changes
* Check detailed migration documentation for breaking changes in [7.0.0](./doc/MIGRATION-v7.md)
* `Config.errorMessages` has been removed. Please use Kubernetes status messages directly.
* Fix #5264: `Config.errorMessages` has been removed. Please use Kubernetes status messages directly.
* Fix #6081: Moved Java baseline from 8 (1.8) to 11
* Fix #6138: Removed unused `io:fabric8:kubernetes-model` artifact
* Fix #6156: Removed deprecated extension `io:fabric8:service-catalog`

Expand Down
8 changes: 8 additions & 0 deletions doc/MIGRATION-v7.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Migration from 6.x to 7.x

## Contents
- [Java baseline set to Java 11](#java-11)
- [Bouncy Castle is no longer needed](#bouncy-castle)
- [Apache Felix SCR Annotations removed](#apache-felix-scr-annotations)
- [Model Changes](#model-changes)
Expand All @@ -20,6 +21,13 @@
> We value your feedback and will work to address your issue promptly.
> Your contribution is essential to improving our documentation, making our migration process smoother for everyone!
## Java baseline set to Java 11 <a href="#java-11" id="java-11"/>

Starting from version 7.0.0, you will need a Java 11+ runtime (using the latest Java release is always encouraged) to use the Fabric8 Kubernetes Client.

It's been more than 10 years since Java 8 was released, and it's no longer supported by most vendors.
We made our best effort to keep the client compatible with Java 8 for as long as possible, but it's time to move on.

## Bouncy Castle is no longer needed <a href="#bouncy-castle" id="bouncy-castle"/>

The Bouncy Castle library is no longer needed as a dependency.
Expand Down
1 change: 0 additions & 1 deletion httpclient-jdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<name>Fabric8 :: Kubernetes :: HttpClient :: JDK</name>

<properties>
<maven.compiler.release>11</maven.compiler.release>
<osgi.require-capability>
osgi.extender;
filter:="(osgi.extender=osgi.serviceloader.registrar)",
Expand Down
1 change: 0 additions & 1 deletion httpclient-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<name>Fabric8 :: Kubernetes :: HttpClient :: Jetty</name>

<properties>
<maven.compiler.release>11</maven.compiler.release>
<osgi.require-capability>
osgi.extender;
filter:="(osgi.extender=osgi.serviceloader.registrar)",
Expand Down
4 changes: 0 additions & 4 deletions httpclient-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
<packaging>jar</packaging>
<name>Fabric8 :: Kubernetes :: HttpClient Tests</name>

<properties>
<maven.compiler.release>11</maven.compiler.release>
</properties>

<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
Expand Down
6 changes: 0 additions & 6 deletions junit/kube-api-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@
<name>Kube API Test Parent</name>
<description>Library to support testing against Kubernetes API server</description>

<properties>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>

<modules>
<module>core</module>
<module>client-inject</module>
Expand Down
6 changes: 6 additions & 0 deletions kubernetes-model-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<!-- TODO: Remove and use javax.annotation.processing.Generated annotation instead -->
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>

<!-- CompileOnly (provided) dependencies -->
<dependency>
Expand Down
Loading

0 comments on commit 0ffd1ea

Please sign in to comment.