Update to DependencyDownload 2.0.0 and implement cleaning the libraries directory#4242
Conversation
| try { | ||
| applicationDependencyManager.cleanupCacheDirectory(); | ||
| } catch (IOException e) { | ||
| logger.warn("Failed to cleanup dependency cache directory", e); | ||
| } | ||
|
|
There was a problem hiding this comment.
Right now I placed this in disable, as to avoid accidentally cleaning any dependencies that are loaded "late". As ApplicationDependencyManager will only know to keep files for dependencies that are included in it
AuroraLS3
left a comment
There was a problem hiding this comment.
Awesome, thanks! :)
At one point I was wondering if the new version supports one of the maven repositories going down - e.g. it stops responding or starts responding with 5xx errors? When paper changed their repository URL it killed Plan version 5.4 even though it had two repositories defined, so I'm asking in case that sort of thing happens again in the future
|
@AuroraLS3 In theory yes if there in a Exception on one of the repositories, it should try the next one (unless it threw a non-Exception throwable, which would be odd). Do you have a error I could look at? Usually DependencyDownload's errors should have one suppressed exception per repository (if they all fail repositories to download the dependency) if the download fails entirely |
|
@Vankka I only have been getting these as reports #4224, they are HikariCP thrown error about driver class not being found #4224 SQLite download failure is as cryptic as that one, Likely this message is ClassNotFoundException#getMessage() which would be ClassNotFoundException: org.sqlite.jdbc4.JDBC4Connection |
|
@AuroraLS3 Hmm, yeah seems in 5.4 build 1722 ignored the future from DependencyManager#download so it wasn't logged. Perhaps the problem was actually resolved by this (since DependencyDownload previously didn't handle trailing slashes in the repository urls), Paper's repository was probably more lenient with double slashes, eg. |
|
Ah I see, so it was a double whammy 😓 - Thanks for looking at it, that gives confidence that it won't break the same way in the future |
…es directory (plan-player-analytics#4242) Affects issues: - Close plan-player-analytics#3438
Your checklist for this pull request
🚨 Please review the guidelines for contributing to this repository.
/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/html/Contributors.java/Plan/common/src/main/java/com/djrapitops/plan/settings/locale/LangCode.javaDescription
Updates DependencyDownload 2.0.0 which consists mostly of renames. And adds ApplicationDependencyManager for keeping track of loaded dependencies and then cleaning up old dependencies (in practice: deleting jar files from the
librariesdirectory that aren't included in the ApplicationDependencyManager when cleaning up)Implements #3438