[MNG-6825] Replace FileUtils with Commons IO#1067
Conversation
Co-authored-by: Moderne <team@moderne.io>
|
This PR was largely created through: https://github.com/timtebeek/maven-rewrite/blob/main/file-utils.yml It's not yet a complete migration, as a few cases need dedicated recipes, or manual work to convert completely, depending on how much they are used. |
|
Failure looks flaky and unrelated: Error: Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (checkstyle-check) on project core-its: Execution checkstyle-check of goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0 or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven:maven-artifact:jar:3.0 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/3.0/maven-artifact-3.0.jar: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.28.215] failed: Connection timed out |
|
Could we just switch to the nio api which provides a bunch of helper methods ? I'd rather remove dependencies than adding one.... |
I think yes, with a little bit of effort. |
|
Not everything in this PR is covered by NIO in Java 8. As of Java 11 though we should be able to remove most uses of Apache Commons IO too. |
|
Resolve #8219 |
For: https://issues.apache.org/jira/browse/MNG-6825
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MNG-XXX] SUMMARY,where you replace
MNG-XXXandSUMMARYwith the appropriate JIRA issue.[MNG-XXX] SUMMARY.Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.