From a836e898b08e8b231fe11ed7dbff59d9bf000e26 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Thu, 7 Nov 2024 12:43:46 +0100 Subject: [PATCH] IT: cleanup (#1886) Yet another round Changes: * get rid of Guava (2 classes affected) * align dependencies * align plugins --- its/core-it-suite/pom.xml | 8 -------- .../src/test/java/org/apache/maven/it/HttpServer.java | 3 +-- .../org/apache/maven/it/MavenITmng6255FixConcatLines.java | 8 +++----- .../src/test/resources-filtered/bootstrap.txt | 1 + its/core-it-support/core-it-javaagent/pom.xml | 7 +++---- its/core-it-support/core-it-support-artifacts/pom.xml | 1 - its/pom.xml | 6 ------ 7 files changed, 8 insertions(+), 26 deletions(-) diff --git a/its/core-it-suite/pom.xml b/its/core-it-suite/pom.xml index bd5b7f3e71..d704143acd 100644 --- a/its/core-it-suite/pom.xml +++ b/its/core-it-suite/pom.xml @@ -77,7 +77,6 @@ under the License. localhost - 1.6.1 9.4.55.v20240627 0.1-stub-SNAPSHOT @@ -129,11 +128,6 @@ under the License. ${jetty9Version} - - com.google.guava - guava - 16.0 - org.apache.maven maven-repository-metadata @@ -597,13 +591,11 @@ under the License. org.slf4j slf4j-api - ${slf4jVersion} test org.slf4j slf4j-simple - ${slf4jVersion} test diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/HttpServer.java b/its/core-it-suite/src/test/java/org/apache/maven/it/HttpServer.java index c93ec9ff0e..085e48c50f 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/HttpServer.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/HttpServer.java @@ -30,7 +30,6 @@ import java.io.OutputStream; import java.net.URL; import java.util.Collections; -import com.google.common.io.ByteStreams; import org.eclipse.jetty.security.ConstraintMapping; import org.eclipse.jetty.security.ConstraintSecurityHandler; import org.eclipse.jetty.security.HashLoginService; @@ -217,7 +216,7 @@ public class HttpServer { response.setStatus(HttpServletResponse.SC_OK); try (InputStream in = source.stream(target.substring(1)); OutputStream out = response.getOutputStream()) { - ByteStreams.copy(in, out); + in.transferTo(out); } baseRequest.setHandled(true); } diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6255FixConcatLines.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6255FixConcatLines.java index 02f3f882cc..9136c37690 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6255FixConcatLines.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6255FixConcatLines.java @@ -19,11 +19,9 @@ package org.apache.maven.it; import java.io.File; +import java.nio.file.Files; import java.util.Properties; -import com.google.common.base.Charsets; -import com.google.common.base.Joiner; -import com.google.common.io.Files; import org.apache.maven.shared.verifier.Verifier; import org.apache.maven.shared.verifier.util.ResourceExtractor; import org.junit.jupiter.api.Test; @@ -89,7 +87,7 @@ public class MavenITmng6255FixConcatLines extends AbstractMavenIntegrationTestCa } protected void createJvmConfigFile(File jvmConfig, String lineEndings, String... lines) throws Exception { - String content = Joiner.on(lineEndings).join(lines); - Files.write(content, jvmConfig, Charsets.UTF_8); + String content = String.join(lineEndings, lines); + Files.writeString(jvmConfig.toPath(), content); } } diff --git a/its/core-it-suite/src/test/resources-filtered/bootstrap.txt b/its/core-it-suite/src/test/resources-filtered/bootstrap.txt index b2542cf9a5..372cebd860 100644 --- a/its/core-it-suite/src/test/resources-filtered/bootstrap.txt +++ b/its/core-it-suite/src/test/resources-filtered/bootstrap.txt @@ -78,6 +78,7 @@ org.apache.maven.plugin-tools:maven-plugin-annotations:3.3 org.apache.maven.plugins:maven-antrun-plugin:3.0.0 org.apache.maven.plugins:maven-antrun-plugin:3.1.0 org.apache.maven.plugins:maven-assembly-plugin:3.1.0 +org.apache.maven.plugins:maven-assembly-plugin:3.4.0 org.apache.maven.plugins:maven-clean-plugin:${stubPluginVersion} org.apache.maven.plugins:maven-clean-plugin:2.5 org.apache.maven.plugins:maven-clean-plugin:3.1.0 diff --git a/its/core-it-support/core-it-javaagent/pom.xml b/its/core-it-support/core-it-javaagent/pom.xml index 0a74ee5e93..85a11398f6 100644 --- a/its/core-it-support/core-it-javaagent/pom.xml +++ b/its/core-it-support/core-it-javaagent/pom.xml @@ -31,17 +31,17 @@ under the License. org.ow2.asm asm - 9.7.1 + ${asmVersion} org.ow2.asm asm-commons - 7.3.1 + ${asmVersion} org.ow2.asm asm-util - 7.3.1 + ${asmVersion} @@ -62,7 +62,6 @@ under the License. org.apache.maven.plugins maven-shade-plugin - 3.4.1 diff --git a/its/core-it-support/core-it-support-artifacts/pom.xml b/its/core-it-support/core-it-support-artifacts/pom.xml index ac26ab88fb..26b35abc84 100644 --- a/its/core-it-support/core-it-support-artifacts/pom.xml +++ b/its/core-it-support/core-it-support-artifacts/pom.xml @@ -35,7 +35,6 @@ under the License. maven-assembly-plugin - 3.4.0 src/main/assembly/repo.xml diff --git a/its/pom.xml b/its/pom.xml index 6c0118be10..9068953447 100644 --- a/its/pom.xml +++ b/its/pom.xml @@ -153,7 +153,6 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M9 true @@ -207,11 +206,6 @@ under the License. - - org.apache.maven.plugins - maven-resources-plugin - 3.2.0 - org.apache.maven.plugins maven-plugin-plugin