Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to assembly fat jar rather than put all dependent jars into lib-directory #285

Closed
dnrusakov opened this issue Jun 27, 2014 · 5 comments
Labels
documentation Documentation should be extended or updated feature request

Comments

@dnrusakov
Copy link

Now all dependent libs are in lib-directory and provided via class path during the app starts:
java -cp lib1.jar:lib2.jar:lib3.jar:libN.jar
It would be great to have an ability of fat-jar generating. For example by using something like "sbt debian:packageFatJar" command.

Thank you

@muuki88
Copy link
Contributor

muuki88 commented Jun 27, 2014

AFAIK this can already be achieved by configuration. You need a plugin like sbt-assembly to create your fat-jar and then override the package mappings described here

It should be something like this

import AssemblyKeys._

assemblySettings

mappings in Universal <+= (assembly in Compile) map { jar =>
  jar -> ("lib/" + jar.getName)
}

If this (or something similar works) you could provide a small page in the detailed topics session if you like :)

@dnrusakov
Copy link
Author

I will try and publish results here later if it will work...

@muuki88
Copy link
Contributor

muuki88 commented Jul 24, 2014

@dnrusakov any progress on this?

@muuki88 muuki88 added the docs label Jul 24, 2014
@rpomeroy
Copy link

I'm also need to support this style of packaging. Any luck?

@muuki88
Copy link
Contributor

muuki88 commented Sep 18, 2014

So. I wrote an example for this here.

At some point I hope to add this as an AutoPlugin to NativePacakger itself. #356

muuki88 added a commit that referenced this issue Sep 24, 2014
muuki88 added a commit that referenced this issue Sep 25, 2014
…in Universal and Linux

Conflicts:
	src/sphinx/DetailedTopics/index.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation should be extended or updated feature request
Projects
None yet
Development

No branches or pull requests

3 participants