Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ $ 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
100 changes: 57 additions & 43 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 @@ -336,52 +372,30 @@
</profile>

<profile>
<id>jdk-17</id>
<activation>
<jdk>17</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>
<build>
<finalName>${project.artifactId}-jdk17-${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>

<profile>
<id>jdk-21</id>
<id>jdk-16+</id>
<activation>
<jdk>21</jdk>
<jdk>(16,]</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>
</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}-jdk21-${project.version}</finalName>
<finalName>${project.artifactId}-jdk${java.specification.version}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -393,8 +407,8 @@
<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>
Expand Down