diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 25abab9edb..420b2eee56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -235,11 +235,11 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/workflows/maven-goal with: - java-version: ${{ matrix.version }} - distribution: ${{ env.JAVA_DIST }} + test-java-version: ${{ matrix.version }} + test-java-distribution: ${{ env.JAVA_DIST }} command: ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true - name: Run tests for ${{ matrix.version }}:${{ env.JAVA_DIST }} - run: ./mvnw test + run: ./mvnw test -Dtest_java_binary=${{ env.TEST_JAVA_BINARY }} - name: Store test results if: success() || failure() uses: actions/upload-artifact@v3 diff --git a/.github/workflows/maven-goal/action.yml b/.github/workflows/maven-goal/action.yml index efa751938c..6f50f29d2a 100644 --- a/.github/workflows/maven-goal/action.yml +++ b/.github/workflows/maven-goal/action.yml @@ -4,12 +4,12 @@ name: common build tasks description: Install specific JDK and run a command inputs: - java-version: - description: 'Java version' + test-java-version: + description: 'Testing Java version' required: true - default: '17' # NOTE: This version is also defined in .buildkite/hooks/pre-command - distribution: - description: 'Java distribution' + default: '17' + test-java-distribution: + description: 'Testing Java distribution' required: true default: 'temurin' command: @@ -23,12 +23,20 @@ inputs: runs: using: "composite" steps: - - name: Set up JDK ${{ inputs.java-version }} + - name: Set up testing JDK + if: ${{ inputs.test-java-version != '17' }} uses: actions/setup-java@v3 with: - java-version: ${{ inputs.java-version }} - distribution: ${{ inputs.distribution }} + java-version: ${{ inputs.test-java-version}} + distribution: ${{ inputs.test-java-distribution}} + - name: Set up build JDK + uses: actions/setup-java@v3 + with: + java-version: 17 # NOTE: This version is also defined in .buildkite/hooks/pre-command + distribution: temurin cache: 'maven' - + - name: Set up TEST_JAVA_BINARY environment variable + shell: bash + run: echo "TEST_JAVA_BINARY=$JAVA_HOME_${{ inputs.test-java-version }}_${{ runner.arch }}/bin/java" >> $GITHUB_ENV - run: ${{ inputs.command }} shell: ${{ inputs.shell }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5ef3bad04a..468d2ce4a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,9 +47,18 @@ For small changes you don't have to execute them locally. When creating a pull requests, they will be executed by a CI server. +The code requires at least Java 17 to be built. +The tests require at least Java 11 to run. +You can use a different JVM for testing than building by passing the `test_java_binary` to maven: + +```bash +./mvnw clean test -Dtest_java_binary=/path/to/java_home/bin/java +``` + #### Performance testing We have some JMH Tests that allow to track the following performance metrics deltas when agent is activated. + - memory allocation rate (GC pressure) - cpu time diff --git a/README.md b/README.md index 372c7bec34..1852f9b52d 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Those snapshots include features & bugfixes for the next release, see [releases ## Build form source -Execute `./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true` to build the artifacts and to install them to your local maven repository. The build process requires JDK 9. +Execute `./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true` to build the artifacts and to install them to your local maven repository. The build process requires JDK 17. The agent jar is in the folder `elastic-apm-agent/target`. ## License diff --git a/apm-agent-builds/pom.xml b/apm-agent-builds/pom.xml index 3daf624a5c..47d97075c4 100644 --- a/apm-agent-builds/pom.xml +++ b/apm-agent-builds/pom.xml @@ -344,6 +344,11 @@ apm-spring-webflux-plugin ${project.version} + + ${project.groupId} + apm-spring-webflux-spring5 + ${project.version} + ${project.groupId} apm-spring-webmvc-plugin @@ -429,22 +434,6 @@ - - - non-java-11 - - !11 - - - - ${project.groupId} - apm-agent-spring-6 - ${project.version} - - - - - diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java b/apm-agent-core/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java deleted file mode 100644 index 86685638b7..0000000000 --- a/apm-agent-core/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * This package is common as it needs to be used by Spring WebFlux instrumentations from different modules (compiled by different Java - * versions). It must have the same package name as used by the WebFlux instrumentation, as it is expected to be loaded by the same - * plugin class loader that loads the WebFlux advice and helper classes. - */ -package co.elastic.apm.agent.springwebflux; - diff --git a/apm-agent-java-17/apm-agent-spring-6/pom.xml b/apm-agent-java-17/apm-agent-spring-6/pom.xml deleted file mode 100755 index b45de09af3..0000000000 --- a/apm-agent-java-17/apm-agent-spring-6/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - 4.0.0 - - - co.elastic.apm - apm-agent-java-17 - 1.36.1-SNAPSHOT - - - apm-agent-spring-6 - ${project.groupId}:${project.artifactId} - - - ${project.basedir}/../.. - - - - - ${project.groupId} - apm-agent-core - ${project.version} - - - org.springframework - spring-web - 6.0.1 - provided - - - - io.projectreactor - reactor-core - 3.2.0.RELEASE - test - - - diff --git a/apm-agent-java-17/pom.xml b/apm-agent-java-17/pom.xml deleted file mode 100644 index df0c4528de..0000000000 --- a/apm-agent-java-17/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - 4.0.0 - - - apm-agent-parent - co.elastic.apm - 1.36.1-SNAPSHOT - - - apm-agent-java-17 - pom - ${project.groupId}:${project.artifactId} - - - apm-agent-spring-6 - - - - true - - ${project.basedir}/.. - - - true - - - diff --git a/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml b/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml index 70ac98299c..60f99cf725 100644 --- a/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml +++ b/apm-agent-plugins/apm-finagle-httpclient-plugin/pom.xml @@ -32,7 +32,7 @@ com.fasterxml.jackson.core jackson-databind - 2.14.2 + 2.13.3 test diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml index e472628940..4b22eb4029 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/pom.xml @@ -18,80 +18,35 @@ true - - - org.springframework - spring-web - ${version.spring} - provided - - - - org.springframework - spring-webflux - ${version.spring} - provided - - - - ${project.groupId} - apm-spring-webflux-testapp - ${project.version} - test - + + + + org.springframework + spring-framework-bom + 6.0.1 + pom + import + + + + ${project.groupId} - apm-httpserver-core - ${project.version} - - - - - co.elastic.apm - apm-api-plugin + apm-spring-webflux-spring5 ${project.version} - test - - - - - co.elastic.apm - apm-reactor-plugin - ${project.version} - test - - - - co.elastic.apm - apm-reactor-plugin - ${project.version} - test - test-jar - - - - co.elastic.apm - apm-servlet-plugin - ${project.version} - test - - org.springframework - spring-test - ${version.spring} - test + spring-web + provided - io.projectreactor reactor-test ${version.reactor} test - diff --git a/apm-agent-java-17/apm-agent-spring-6/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb6Utils.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb6Utils.java similarity index 96% rename from apm-agent-java-17/apm-agent-spring-6/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb6Utils.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb6Utils.java index 86ed8487d6..3029363ef2 100644 --- a/apm-agent-java-17/apm-agent-spring-6/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb6Utils.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb6Utils.java @@ -25,6 +25,7 @@ * This class is compiled with spring-web 6.x, as it relies on {@link HttpStatusCode} and an API that was introduced in 6.0.0. * Therefore, it MUST only be loaded through its class name through {@link SpringWebVersionUtils}. */ +@SuppressWarnings("unused") //Created via reflection public class SpringWeb6Utils implements SpringWebVersionUtils.ISpringWebVersionUtils { @Override public int getStatusCode(Object response) { diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb5UtilsTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb5UtilsTest.java deleted file mode 100644 index f0fb189b42..0000000000 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb5UtilsTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package co.elastic.apm.agent.springwebflux; - -import org.junit.jupiter.api.Test; -import org.springframework.http.HttpStatus; -import org.springframework.http.server.reactive.ServerHttpResponse; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; - -class SpringWeb5UtilsTest { - - @Test - void testGetStatusCode() throws Exception { - ServerHttpResponse mockResponse = mock(ServerHttpResponse.class); - doReturn(HttpStatus.IM_USED).when(mockResponse).getStatusCode(); - assertThat(SpringWebVersionUtils.getStatusCode(mockResponse)).isEqualTo(226); - } - - @Test - void testWrongResponseType() { - assertThatThrownBy(() -> SpringWebVersionUtils.getStatusCode(new Object())).isInstanceOf(ClassCastException.class); - } -} diff --git a/apm-agent-java-17/apm-agent-spring-6/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb6UtilsTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb6UtilsTest.java similarity index 81% rename from apm-agent-java-17/apm-agent-spring-6/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb6UtilsTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb6UtilsTest.java index ab6bff651f..dfc6060b4e 100644 --- a/apm-agent-java-17/apm-agent-spring-6/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb6UtilsTest.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/SpringWeb6UtilsTest.java @@ -19,20 +19,22 @@ package co.elastic.apm.agent.springwebflux; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledForJreRange; +import org.junit.jupiter.api.condition.JRE; +import org.mockito.Mockito; import org.springframework.http.HttpStatusCode; import org.springframework.http.server.reactive.ServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; +@EnabledForJreRange(min = JRE.JAVA_17) public class SpringWeb6UtilsTest { @Test void testGetStatusCode() throws Exception { - ServerHttpResponse mockResponse = mock(ServerHttpResponse.class); - doReturn(HttpStatusCode.valueOf(222)).when(mockResponse).getStatusCode(); + ServerHttpResponse mockResponse = Mockito.mock(ServerHttpResponse.class); + Mockito.doReturn(HttpStatusCode.valueOf(222)).when(mockResponse).getStatusCode(); assertThat(SpringWebVersionUtils.getStatusCode(mockResponse)).isEqualTo(222); } diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml new file mode 100644 index 0000000000..be765091f8 --- /dev/null +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + + co.elastic.apm + apm-spring-webflux + 1.36.1-SNAPSHOT + + + apm-spring-webflux-spring5 + ${project.groupId}:${project.artifactId} + + + + ${project.basedir}/../../.. + + true + + + + + + org.springframework + spring-framework-bom + 5.3.25 + pom + import + + + + + + + org.springframework + spring-web + provided + + + + org.springframework + spring-webflux + provided + + + + ${project.groupId} + apm-spring-webflux-testapp + ${project.version} + test + + + + ${project.groupId} + apm-httpserver-core + ${project.version} + + + + + co.elastic.apm + apm-api-plugin + ${project.version} + test + + + + + co.elastic.apm + apm-reactor-plugin + ${project.version} + test + + + + co.elastic.apm + apm-reactor-plugin + ${project.version} + test + test-jar + + + + + co.elastic.apm + apm-servlet-plugin + ${project.version} + test + + + + org.springframework + spring-test + test + + + + io.projectreactor + reactor-test + ${version.reactor} + test + + + + + diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/BodyInsertersInstrumentation.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/BodyInsertersInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/BodyInsertersInstrumentation.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/BodyInsertersInstrumentation.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/DispatcherHandlerInstrumentation.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/DispatcherHandlerInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/DispatcherHandlerInstrumentation.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/DispatcherHandlerInstrumentation.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/HandlerAdapterInstrumentation.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/HandlerAdapterInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/HandlerAdapterInstrumentation.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/HandlerAdapterInstrumentation.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/HeaderGetter.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/HeaderGetter.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/HeaderGetter.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/HeaderGetter.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb5Utils.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb5Utils.java similarity index 96% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb5Utils.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb5Utils.java index 4acda6f375..a649c79b7f 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb5Utils.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/SpringWeb5Utils.java @@ -25,6 +25,7 @@ * This class is compiled with spring-web 5.x, relying on the {@link ServerHttpResponse#getStatusCode()}, which changed in 6.0.0. * Therefore, it MUST only be loaded through its class name through {@link SpringWebVersionUtils}. */ +@SuppressWarnings("unused") //Created via reflection public class SpringWeb5Utils implements SpringWebVersionUtils.ISpringWebVersionUtils { @Override diff --git a/apm-agent-core/src/main/java/co/elastic/apm/agent/springwebflux/SpringWebVersionUtils.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/SpringWebVersionUtils.java similarity index 100% rename from apm-agent-core/src/main/java/co/elastic/apm/agent/springwebflux/SpringWebVersionUtils.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/SpringWebVersionUtils.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/TransactionAwareSubscriber.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/WebFluxInstrumentation.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebFluxInstrumentation.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/WebFluxInstrumentation.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebFluxInstrumentation.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxHelper.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/WebfluxServletHelper.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/java/co/elastic/apm/agent/springwebflux/package-info.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/main/resources/META-INF/services/co.elastic.apm.agent.sdk.ElasticApmInstrumentation diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/AbstractServerInstrumentationTest.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/HeaderGetterTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/HeaderGetterTest.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/HeaderGetterTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/HeaderGetterTest.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/ServerAnnotatedInstrumentationTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServerAnnotatedInstrumentationTest.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/ServerAnnotatedInstrumentationTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServerAnnotatedInstrumentationTest.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/ServerFunctionalInstrumentationTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServerFunctionalInstrumentationTest.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/ServerFunctionalInstrumentationTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServerFunctionalInstrumentationTest.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/ServletContainerTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServletContainerTest.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/ServletContainerTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/ServletContainerTest.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/WebSocketServerInstrumentationTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/WebSocketServerInstrumentationTest.java similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/java/co/elastic/apm/agent/springwebflux/WebSocketServerInstrumentationTest.java rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/java/co/elastic/apm/agent/springwebflux/WebSocketServerInstrumentationTest.java diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/resources/application.properties b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/resources/application.properties similarity index 100% rename from apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-plugin/src/test/resources/application.properties rename to apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-spring5/src/test/resources/application.properties diff --git a/apm-agent-plugins/apm-spring-webflux/pom.xml b/apm-agent-plugins/apm-spring-webflux/pom.xml index a7ce754e23..c38e96a5f9 100644 --- a/apm-agent-plugins/apm-spring-webflux/pom.xml +++ b/apm-agent-plugins/apm-spring-webflux/pom.xml @@ -31,5 +31,6 @@ apm-spring-webflux-plugin apm-spring-webclient-plugin apm-spring-webflux-testapp + apm-spring-webflux-spring5 diff --git a/pom.xml b/pom.xml index 00a8c56502..3f466752ff 100644 --- a/pom.xml +++ b/pom.xml @@ -222,32 +222,45 @@ - - maven-failsafe-plugin - - ${skip.integration.test} - 3 - - - - maven-surefire-plugin - - true - - + + maven-failsafe-plugin + + ${skip.integration.test} + 3 + + + + maven-surefire-plugin + + true + + - - non-java-11 - - !11 - - - apm-agent-java-17 - + different-test-jdk + + + test_java_binary + + + + + + maven-surefire-plugin + + ${test_java_binary} + + + + maven-failsafe-plugin + + ${test_java_binary} + + + + no-errorprone @@ -435,7 +448,6 @@ - org.jacoco jacoco-maven-plugin