less dependence on plexus-utils; including it explicitly

This commit is contained in:
2023-02-07 15:01:01 -05:00
parent 79b7ca7370
commit 587c8479c4
2 changed files with 29 additions and 9 deletions
+26 -6
View File
@@ -51,11 +51,27 @@
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<!-- Extra Maven Plugin libraries -->
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-util</artifactId>
<version>1.1.0</version>
</dependency>
<!-- maven-plugin-api v3.9 depends on it, but it isn't actually included in Maven v3.9 -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.5.0</version>
</dependency>
<!-- Embedded Maven Plugin libraries -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
@@ -74,6 +90,16 @@
<version>${maven.version}</version>
<scope>provided</scope>
</dependency>
<!-- Testing libraries -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- Maven Testing libraries -->
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
@@ -86,12 +112,6 @@
<version>${maven.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -29,6 +29,7 @@ import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Exclusion;
@@ -49,7 +50,6 @@ import org.apache.maven.project.ProjectDependenciesResolver;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.eclipse.aether.graph.Dependency;
import org.eclipse.aether.impl.ArtifactResolver;
import org.eclipse.aether.resolution.ArtifactRequest;
@@ -327,7 +327,7 @@ public class AmpMojo extends AbstractMojo implements ArtifactResolutionCallback
FileInputStream fistream = new FileInputStream(file);
BufferedInputStream bistream = new BufferedInputStream(fistream, this.streamBufferSize);
try {
IOUtil.copy(bistream, zstream);
IOUtils.copy(bistream, zstream);
} finally {
bistream.close();
}
@@ -354,7 +354,7 @@ public class AmpMojo extends AbstractMojo implements ArtifactResolutionCallback
FileInputStream fistream = new FileInputStream(file);
BufferedInputStream bistream = new BufferedInputStream(fistream, this.streamBufferSize);
try {
IOUtil.copy(bistream, zstream);
IOUtils.copy(bistream, zstream);
} finally {
bistream.close();
}