These are chat archives for sbt/sbt-native-packager

24th
Mar 2016
Andreas Kapp
@zoosky
Mar 24 2016 08:20
@argyakrivos good question
Anargyros Akrivos
@argyakrivos
Mar 24 2016 11:56
@muuki88 this doesn't quite work, I still end up with both scripts
It says here: "If you use the JavaServerAppPackaging there are predefined postinst and preinst files, which start/stop the application on install/remove calls. Existing maintainer scripts will be extended not overridden." -- http://www.scala-sbt.org/sbt-native-packager/formats/debian.html
well, in my case, I want to overwrite it, not extend it. How can I achieve that?
I'm writing an sbt plugin which customises JavaAppPackaging and JavaServicePackaging. I want a different init scripts for JavaAppPackaging and JavaServicePackaging, that's why I want to override the initscripts programmatically, based on the project type
Anargyros Akrivos
@argyakrivos
Mar 24 2016 13:37
Just figured it out:
    maintainerScripts in Debian := (maintainerScripts in Debian).value) ++ Map(
      Postinst -> Seq("echo 'hello world'")
    )
Nepomuk Seiler
@muuki88
Mar 24 2016 14:41
Exactly :)
Anargyros Akrivos
@argyakrivos
Mar 24 2016 14:56
Another issue that I found was I'm not able to integrate JDeb in my sbt-plugin. I'm adding a plugin dependency on JDebPackaging including "org.vafer" % "jdeb" % "1.3" artifacts (Artifact("jdeb", "jar", "jar")) in my dependencies. Compilation works well. When I use my sbt plugin from another project, sbt complains with java.lang.NoClassDefFoundError: org/vafer/jdeb/Console
If I manually include jdeb dependency in my project, it works fine
But I don't want to include that library on every single project. I would expect that given this is a dependency of my sbt-plugin, it would bring it to each project.
Has anyone tried that with success?
Nick Telford
@nicktelford
Mar 24 2016 17:18
hi everyone
I'm trying to package a multi-module project in to an RPM using the RpmPlugin
we can't use JavaAppPackaging, because it seems to mandate a bunch of stuff we don't want (like the structure of the installed package and that we use HOCON for config, which we're not)
the issue we're having is that we can't seem to find a way to get all the JARs for the project, both the artifacts created by each dependent module, and the external dependencies brought in via Ivy
I was just using packageBin for the local artifact, and dependencyClasspath for the external dependencies - however, this doesn't work for multi-module projects
any help would be appreciated :)
Nepomuk Seiler
@muuki88
Mar 24 2016 17:21
Hi. You can use any configuration format. Native-packager doesn't force a format.
Nick Telford
@nicktelford
Mar 24 2016 17:22
it was the bundled scripts that the archetypes use that were the problem iirc
Nepomuk Seiler
@muuki88
Mar 24 2016 17:22
And you can change the package layout if you want. Just remap the mappings
And you can provide custom scripts as well :)
Nick Telford
@nicktelford
Mar 24 2016 17:23
I'm trying to avoid using the archetypes tbh, because I honestly don't understand half the things they do or how to do them :(
Nepomuk Seiler
@muuki88
Mar 24 2016 17:26
Archetypes do the heavy lifting for you. These "how do I get all artifacts" questions.
Nick Telford
@nicktelford
Mar 24 2016 17:26
This message was deleted
it feels like something that should be fairly straight-forward to do with SBT
I'm sure I'm missing something
Nepomuk Seiler
@muuki88
Mar 24 2016 17:27
I added a more general introduction to the new docs. http://sbt-native-packager.readthedocs.org/en/latest/
Nick Telford
@nicktelford
Mar 24 2016 17:28
oh wow, I haven't seen these, they seem much better!
Nepomuk Seiler
@muuki88
Mar 24 2016 17:29
SBT is IMHO a good build tool, but some times it's quite confusing and hard to use. I honestly have no idea how native-packager gets all artifacts. This has been done some years ago by Josh
Nick Telford
@nicktelford
Mar 24 2016 17:30
ahh right, ok - thanks anyway
Nepomuk Seiler
@muuki88
Mar 24 2016 17:30
Thanks. If you have any hints to make the docs better :)
Nick Telford
@nicktelford
Mar 24 2016 17:30
we've just made the switch from Maven, and while SBT is much better, there's a few pain points that have me tearing my hair out!
Nepomuk Seiler
@muuki88
Mar 24 2016 17:35
You are not alone ;)