Skip to content

Commit

Permalink
Replace two deprecated methods (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored Dec 4, 2024
1 parent 31b9fa0 commit 6f432fb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.StandardCopyOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -716,7 +717,7 @@ protected static void copyResource(URL url, File file) throws IOException {
throw new NullPointerException("The url could not be null.");
}

FileUtils.copyURLToFile(url, file);
Files.copy(url.openStream(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
}

/**
Expand Down Expand Up @@ -801,7 +802,7 @@ protected static void invokeMaven(
} else {
request.setDebug(true);
}
request.setGoals(goals);
request.addArgs(goals);
if (properties != null) {
request.setProperties(properties);
}
Expand Down

0 comments on commit 6f432fb

Please sign in to comment.