Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 21 ]
java: [ 8, 11, 17, 21]
name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ Beyond that, it is helpful to capture the following information:
If you open a Github issue with a request for help, please include as much of the information above as possible and do not forget to sanitize any request/response data posted.

## Development
The project depends on Java 8. To build from source and install to your local Maven cache, run the following:
The project depends on Java 8 to 25. To build from source and install to your local Maven cache, run the following:

```shell
$ git submodule update --init --recursive
$ ./mvnw clean install
```

It also depends on [Immutables][i] and won't compile in IDEs like Eclipse or IntelliJ unless you also have an enabled annotation processor. See [this guide][j] for instructions on how to configure your IDE.
It also depends on [Immutables][i] and won't compile in IDEs like Eclipse or IntelliJ unless you also have an installed annotation processor. See [this guide][j] for instructions on how to configure your IDE.

To run the integration tests, run the following:

Expand Down
20 changes: 20 additions & 0 deletions cloudfoundry-client-reactor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -190,5 +195,20 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-16+</id>
<activation>
<jdk>(16,]</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-subclass</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
16 changes: 16 additions & 0 deletions cloudfoundry-operations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
Expand Down Expand Up @@ -150,5 +151,20 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-16+</id>
<activation>
<jdk>(16,]</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-subclass</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
15 changes: 15 additions & 0 deletions cloudfoundry-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,20 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk-16+</id>
<activation>
<jdk>(16,]</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-subclass</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
import java.util.function.Consumer;

/**
* Dynamically creates {@link byte} arrays and caches them, reusing them once they have been released.
* <p>
* The maximum number of byte arrays is unbounded
* <p>
* The default time-to-live for unused byte arrays is one minute
* Dynamically creates {@link Byte} arrays and caches them, reusing them once they have been
* released.
*
* <p>The maximum number of byte arrays is unbounded
*
* <p>The default time-to-live for unused byte arrays is one minute
*/
public final class ByteArrayPool {

Expand Down Expand Up @@ -69,7 +70,7 @@ private ByteArrayPool(int capacity, Duration ttl) {
/**
* Executes a {@link Consumer} providing a pooled {@code byte} array
*
* @param consumer the {@link Consumer} of the {@link byte} array
* @param consumer the {@link Consumer} of the {@link Byte} array
*/
public static void withByteArray(Consumer<byte[]> consumer) {
INSTANCE.doWithByteArray(consumer);
Expand Down
97 changes: 60 additions & 37 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
</modules>

<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<dependencies.version>2.7.17</dependencies.version>
Expand All @@ -74,6 +73,7 @@
<wire.plugin.version>3.0.2</wire.plugin.version>
<wire.suffix></wire.suffix>
<spotless.version>2.44.4</spotless.version>
<m2e.apt.activation>disabled</m2e.apt.activation><!-- used by Eclipse -->
</properties>

<dependencyManagement>
Expand All @@ -85,7 +85,21 @@
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.github.zafarkhaja</groupId>
<artifactId>java-semver</artifactId>
Expand Down Expand Up @@ -163,9 +177,31 @@
<arg>-Xlint:-processing</arg>
<arg>-Xlint:-serial</arg>
</compilerArgs>
<annotationProcessorPaths>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<version>${immutables.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
</annotationProcessorPaths>
<showWarnings>true</showWarnings>
<source>${java.version}</source>
<target>${java.version}</target>
<source>${java.specification.version}</source>
<target>${java.specification.version}</target>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you build with JDK 11, the jar will have the same name but a different target than with 1.8 ; we should probably pin to 1.8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, everything before JDK 16 uses the same jar file name. I can either use different names, as in the later JDKs or I can pin everything before 16 to 1.8. The effort should (hopefully) be the same. I will check tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now in all JDK versions the version is part of the jar name. That's more consistent. Hopefully the changed jar name does not create problems in other tools.

</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -222,6 +258,7 @@
</plugins>
</pluginManagement>

<finalName>${project.artifactId}-jdk${java.specification.version}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
Expand Down Expand Up @@ -336,19 +373,29 @@
</profile>

<profile>
<id>jdk-17</id>
<id>jdk-16+</id>
<activation>
<jdk>17</jdk>
<jdk>(16,]</jdk>
</activation>
<properties>
<java.version>17</java.version>
<dependencies.version>3.2.1</dependencies.version>
<wire.version>4.9.1</wire.version>
<wire.plugin.version>3.0.2</wire.plugin.version>
<wire.suffix>-jvm</wire.suffix>
</properties>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-subclass</artifactId>
<version>${mockito.version}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-jdk17-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -360,45 +407,21 @@
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<source>${java.version}</source>
<target>${java.version}</target>
<source>${java.specification.version}</source>
<target>${java.specification.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>jdk-21</id>
<id>jdk-23+</id>
<activation>
<jdk>21</jdk>
<jdk>(23,]</jdk>
</activation>
<properties>
<java.version>21</java.version>
<dependencies.version>3.2.1</dependencies.version>
<wire.version>4.9.1</wire.version>
<wire.plugin.version>3.0.2</wire.plugin.version>
<wire.suffix>-jvm</wire.suffix>
<dependencies.version>3.5.8</dependencies.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because the whole project is not compatible with JDK 25, which requires Boot 3.5 and up. But Boot 3.5 is not compatible with JDK 8 and 11.

I don't want to support both 2.x and 3.x lines in a single release. This needs to go in a separate branch, that supports JDK17+ and Boot 3.5.x ; which will go into a 6.0 release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that mean double maintenance in 5 and 6 or will 5 and therefor JDK8 and 11 then phase out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 6.x will be the new primary, with the intent to phase out support for 5.x .

We'll keep a 5.x branch for critical CVEs, but we've somewhat maxed out the versions that we can upgrade on that branch anyway.

</properties>
<build>
<finalName>${project.artifactId}-jdk21-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- @see https://github.com/immutables/immutables/issues/1339#issuecomment-1016125673 -->
<configuration>
<fork>true</fork>
<compilerArgs combine.children="append">
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
</compilerArgs>
<showWarnings>true</showWarnings>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

Expand Down