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

Make build work on java 22-ea #2569

Closed
wants to merge 5 commits into from
Closed
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 11, 17, 21 ]
java-version: [ 11, 17, 21, 22-ea ]

steps:
- uses: actions/checkout@v3
Expand All @@ -38,6 +38,7 @@ jobs:
JAVA_HOME: ${{ steps.build_jdk.outputs.path }}
run: |
echo "$JAVA_HOME/bin" >> ${GITHUB_PATH}
./mvnw --version

- name: build distribution
env:
Expand All @@ -51,6 +52,7 @@ jobs:
JAVA_HOME: ${{ steps.test_jdk.outputs.path }}
run: |
echo "$JAVA_HOME/bin" >> ${GITHUB_PATH}
./mvnw --version

- name: run tests
env:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ install-fast:: install
docs: MAVEN_CONFIG += -Ppublish-docs -Pfast -Dbasepom.javadoc.skip=false
docs: install

run-tests:: MAVEN_CONFIG += -Dbasepom.it.skip=false
run-tests:: MAVEN_CONFIG += -Dbasepom.it.skip=false -Dbasepom.check.skip-dependency=false
run-tests::
${MAVEN} surefire:test invoker:install invoker:integration-test invoker:verify
${MAVEN} dependency:properties surefire:test invoker:install invoker:integration-test invoker:verify

run-slow-tests:: MAVEN_CONFIG += -Pslow-tests
run-slow-tests:: run-tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# limitations under the License.
#

invoker.goals=clean surefire:test
invoker.goals=clean dependency:properties surefire:test
invoker.buildResult = success
invoker.failureBehavior = fail-at-end
2 changes: 2 additions & 0 deletions cache/caffeine-cache/src/it/test-caffeine-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

<properties>
<basepom.check.skip-all>true</basepom.check.skip-all>
<!-- b/c we need dependency:properties for the mockito agent to work -->
<basepom.check.skip-dependency>false</basepom.check.skip-dependency>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion cache/noop-cache/src/it/test-noop-cache/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# limitations under the License.
#

invoker.goals=clean surefire:test
invoker.goals=clean dependency:properties surefire:test
invoker.buildResult = success
invoker.failureBehavior = fail-at-end
2 changes: 2 additions & 0 deletions cache/noop-cache/src/it/test-noop-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

<properties>
<basepom.check.skip-all>true</basepom.check.skip-all>
<!-- b/c we need dependency:properties for the mockito agent to work -->
<basepom.check.skip-dependency>false</basepom.check.skip-dependency>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion core/src/it/test-inline-jar/invoker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# limitations under the License.
#

invoker.goals=clean surefire:test
invoker.goals=clean dependency:properties surefire:test
invoker.buildResult = success
invoker.failureBehavior = fail-at-end
2 changes: 2 additions & 0 deletions core/src/it/test-inline-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

<properties>
<basepom.check.skip-all>true</basepom.check.skip-all>
<!-- b/c we need dependency:properties for the mockito agent to work -->
<basepom.check.skip-dependency>false</basepom.check.skip-dependency>
</properties>

<dependencies>
Expand Down
47 changes: 42 additions & 5 deletions internal/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<dep.asciidoctorj-diagram.version>2.2.14</dep.asciidoctorj-diagram.version>
<dep.asciidoctorj.version>2.5.10</dep.asciidoctorj.version>
<dep.assertj.version>3.24.2</dep.assertj.version>
<dep.byte-buddy.version>1.14.10</dep.byte-buddy.version>
<dep.caffeine.version>3.1.8</dep.caffeine.version>
<dep.checkerframework.version>3.42.0</dep.checkerframework.version>
<dep.commons-compress.version>1.25.0</dep.commons-compress.version>
Expand Down Expand Up @@ -380,6 +381,18 @@
<version>${dep.mockito.version}</version>
</dependency>

<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${dep.byte-buddy.version}</version>
</dependency>

<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${dep.byte-buddy.version}</version>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down Expand Up @@ -580,6 +593,13 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>

<!-- needed for Java 21 and mockito -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<repositories>
Expand Down Expand Up @@ -890,6 +910,28 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>dependency-properties</id>
<goals>
<goal>properties</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-javaagent:${net.bytebuddy:byte-buddy-agent:jar} @{basepom.coverage.test-args} -Xmx${basepom.test.memory} -Dfile.encoding=${project.build.sourceEncoding} ${basepom.test.arguments}</argLine>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -899,11 +941,6 @@
<activation>
<jdk>[21,)</jdk>
</activation>
<properties>
<!-- see https://github.com/mockito/mockito/issues/3037 -->
<basepom.it.arguments>-XX:+EnableDynamicAgentLoading</basepom.it.arguments>
<basepom.test.arguments>-XX:+EnableDynamicAgentLoading</basepom.test.arguments>
</properties>
<build>
<pluginManagement>
<plugins>
Expand Down