I'm interested in how to distribute a Java application that has a lot of dependencies (specified in a pom.xml in Maven).
Obviously it would be possible to just package everything in one big .jar file. However that seems wasteful, since an update of the application would require sending a new copy of all the dependencies as well.
So I'm looking for a way of distributing the app that does the following:
- Only includes the core application in the main .jar file
- Downloads dependencies as needed when the .jar file is run
- Keeps copies of the dependencies locally, so that if an application update is distributed the dependencies don't need to be downloaded again
What's the best way of achieving this?