Is it possible to make jar fat on deploy?

Hello. Let me describe our build/deploy process:

  1. Build rpm/deb which contains all jars
  2. Upload rpm/deb to repository
  3. Ssh to staging server
  4. Download rpm/deb
  5. Install rpm/deb

Usually rpm/deb hav 10+mb of size - 99% of them is dependencies. Fat rpm/deb means slow upload/download process.

  1. Is it possible to upload light rpm/deb which will contain only your code + dependency resolving info and download dependencies on deploy?
  2. Do you package your applications? Can you describe your process?