Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Download runtime library dependencies, resolve conflicts. #889
This PR adds the ability for Glowstone to download dependencies for libraries specified in the glowstone.yml. It does so using an abstraction on top of Maven's Aether API, Naether, that makes dependency resolution fairly easy. I check the tree that is built up by this plugin against the libraries builtin to the server by searching the classpath for the dependency's POM, which maven-shade-plugin embeds into the JAR. I tried various methods (hence why this change took so long), and this seems to be the most stable way of attempting to do this.
Now, there's a few downsides to how I implemented this:
Do note that due to concerns in the previous commit, I reverted my Kotlin changes. Kotlin will still be included with the Glowstone JAR file.
As before, let me know what you think of this change! I think the benefits of this outweigh the downsides listed above, but certainly there's room for improvement here.
After a while, finally got back to this. I made a small change to better address using libraries that aren't in a maven repository. Prior to the most recent commit, using a library not in a maven repo would need to use an invalid URL as the repository key in order to not affect any other dependencies being resolved. Now, you can set the exclude-dependencies flag within the library's config section to true in order to keep from attempting to resolve the dependencies for these libraries.