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

multi module project jar is included twice #227

Closed
nefilim opened this issue Apr 15, 2014 · 6 comments · Fixed by #233
Closed

multi module project jar is included twice #227

nefilim opened this issue Apr 15, 2014 · 6 comments · Fixed by #233
Labels
documentation Documentation should be extended or updated

Comments

@nefilim
Copy link
Contributor

nefilim commented Apr 15, 2014

I've been running into an issue where a multi module project jar is included twice in the universal package for said project. I've had to do a few unconventional things in the build, for instance to get the artifactId in a more maven friendly way.
I looked over a few times and can't see anything obviously wrong and was able to distill the problem into a small example project, which made me wonder if there's a bug?

You can find it here: https://github.com/nefilim/sbt-native-packager-sample

If you perform a universal:packageZipTarball you will find that the special tgz contains:

special_2.10/lib/com.xxx.special-0.1.2-SNAPSHOT.jar
special_2.10/lib/special_2.10-0.1.2-SNAPSHOT.jar

which are identical in contents.

@muuki88 muuki88 added bug and removed debian labels Apr 17, 2014
@muuki88
Copy link
Contributor

muuki88 commented Apr 17, 2014

Thanks a lot for the sample. We'll have a look as soon as possible :)

@nefilim
Copy link
Contributor Author

nefilim commented Apr 17, 2014

I'm sorry, I think this was my misunderstanding of the docs when I first started with sbt-native-packager and looked at http://www.scala-sbt.org/sbt-native-packager/DetailedTopics/universal.html#getting-started-with-universal-packaging
I interpreted that as needed to do universal packaging.

So just removing this:

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

fixes the problem. Maybe change the doc wording to be more explicit?

I'll keep my sample project up, maybe it can help others to get started with some basic universal packaging, I'll add some comments too to help anyone new. Could you possibly look it over briefly for sanity? Wouldn't want to lead anyone astray :)

@muuki88 muuki88 added docs and removed bug labels Apr 17, 2014
@kardapoltsev
Copy link
Member

Sure, this docs looks a bit confusing.

@muuki88
Copy link
Contributor

muuki88 commented Apr 17, 2014

Thanks for sharing! I think we should be more explicit that this is an example, not neccessary. Feel free to provide a pull request :)

Speaking of pull request. I started a repository with examples some time ago. Create a pull request with your sample app. I'm happy to merge: https://github.com/muuki88/sbt-native-packager-examples

@jsuereth
Copy link
Member

Actually the doc is pretty correct, it starts you without a project archetype, where you have to explicitly add that sort of thing.

I think maybe we need to clarify that, since most people start with a Play project where this kind of thing is automatic from the archetype settings....

Sorry for any confusion! You can blame me for those docs.

@nefilim
Copy link
Contributor Author

nefilim commented Apr 18, 2014

Thanks @jsuereth - makes sense, us mere mortals are a bit slow :)

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants