This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-acr-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 83ebe17 Cleanup deprecations
83ebe17 is described below
commit 83ebe17bd032c872fb8e5a7dd5eaf752226f908b
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Apr 22 01:32:46 2025 +0200
Cleanup deprecations
---
src/main/java/org/apache/maven/plugins/acr/AcrMojo.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/acr/AcrMojo.java
b/src/main/java/org/apache/maven/plugins/acr/AcrMojo.java
index e3fc0cf..e7dede3 100644
--- a/src/main/java/org/apache/maven/plugins/acr/AcrMojo.java
+++ b/src/main/java/org/apache/maven/plugins/acr/AcrMojo.java
@@ -23,6 +23,7 @@ import javax.inject.Named;
import java.io.File;
import java.io.IOException;
+import java.nio.file.Path;
import java.util.List;
import org.apache.commons.io.input.XmlStreamReader;
@@ -187,7 +188,7 @@ public class AcrMojo extends AbstractMojo {
archiver.setOutputFile(jarFile);
// configure for Reproducible Builds based on outputTimestamp value
- archiver.configureReproducible(outputTimestamp);
+ archiver.configureReproducibleBuild(outputTimestamp);
try {
String[] mainJarExcludes = DEFAULT_EXCLUDES;
@@ -224,7 +225,7 @@ public class AcrMojo extends AbstractMojo {
deploymentDescriptor,
true,
filterWrappers,
- getEncoding(unfilteredDeploymentDescriptor));
+
getEncoding(unfilteredDeploymentDescriptor.toPath()));
// Remove the temporary file
FileUtils.forceDelete(unfilteredDeploymentDescriptor);
}
@@ -278,8 +279,9 @@ public class AcrMojo extends AbstractMojo {
* @return The encoding of the XML-file, or UTF-8 if it's not specified in
the file
* @throws IOException if an error occurred while reading the file
*/
- private String getEncoding(File xmlFile) throws IOException {
- try (XmlStreamReader xmlReader = new XmlStreamReader(xmlFile)) {
+ private String getEncoding(Path xmlFile) throws IOException {
+ try (XmlStreamReader xmlReader =
+ XmlStreamReader.builder().setPath(xmlFile).get()) {
return xmlReader.getEncoding();
}
}