PaperMC / Paperclip

Bootstrap utility and launcher for the Paper Minecraft server
MIT License
120 stars 51 forks source link

Download libraries from maven repository #52

Open jamespglines opened 2 years ago

jamespglines commented 2 years ago

I download many versions of paper, every few days. Each time this server jar is ~35mb. Most of this is libraries, which do not change frequently. Without libraries bundled, jar will only be ~16mb.

Because Mojang vanilla server is already downloaded, this gets me to think... why not download libraries from maven as well? This can be done with maven resolver, or the more simple jboss shrinkwrap resolver.

This will only need to redownload libraries on change, not every time.

Multiply the 19mb saving this will cause by every user and you have so many tb saved on the end of PaperMC.

I can make pr for this if desired, it is feature I want. I'd like feedback first before taking time to do this.

electronicboy commented 2 years ago

This has already been considered and somewhat planned however is not a high priority nor do I recall if we ever came to a real conclusion on this due to wanting easily repeatable environments, outside of the vanilla jar, which we already have the odd issues with due to peoples environments, you can download the jar and take it with you and run it anywhere in the world and it will just work

electronicboy commented 2 years ago

(saving data is also not really a huge concern to us at this point as CF caches all of our jars anyways)

jamespglines commented 2 years ago

You already can't just run it anywhere because it has to download from mojang, this is little different. Unless Paper changes its maven repository (central is not allowed as CDN, it is against their policy), which will already cause big problems, server will still work.

Should this be implemented I would make it still run even with no internet, as long as it has libraries locally.

I understand, though, if this is just additional space for error that you do not want.

For bandwidth, you can also think of carbon footprint that downloads release, although, this may not be of big concern to you.