Skip to content

Commit

Permalink
Merge pull request #700 from kardapoltsev/wip/fix-default-jdeb-depend…
Browse files Browse the repository at this point in the history
…encies

Removed default-jre | java6-runtime dependency in jdeb packaging
  • Loading branch information
muuki88 committed Nov 23, 2015
2 parents 301dea4 + 8eb0352 commit 5f4ced3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ object JDebPackaging extends AutoPlugin with DebianPluginLike {
fileAndDirectoryProducers(mappings, targetDir) ++ linkProducers(symlinks),
conffileProducers(mappings, targetDir)
)
debMaker setDepends ""
debMaker setDeb debianFile
debMaker setControl (targetDir / Names.Debian)

Expand Down
25 changes: 25 additions & 0 deletions src/sbt-test/debian/jdeb-dependencies/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
enablePlugins(JavaServerAppPackaging, JDebPackaging)

name := "debian-test"

version := "0.1.0"

maintainer := "Josh Suereth <joshua.suereth@typesafe.com>"

packageSummary := "Test debian package"

packageDescription := """A fun package description of our software,
with multiple lines."""

debianPackageDependencies in Debian := Seq()

TaskKey[Unit]("check-dependencies") <<= (target, streams) map { (target, out) =>
val extracted = target / "extracted"
Seq("dpkg-deb", "-R", (target / "debian-test_0.1.0_all.deb").absolutePath, extracted.absolutePath).!

val control = IO.read(extracted / "DEBIAN" / "control")
assert(!control.contains("Depends:"))

out.log.success("Successfully tested systemV control files")
()
}
1 change: 1 addition & 0 deletions src/sbt-test/debian/jdeb-dependencies/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version"))
5 changes: 5 additions & 0 deletions src/sbt-test/debian/jdeb-dependencies/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Run the debian packaging.
$ mkdir src/resources/empty
> debian:package-bin
$ exists target/debian-test_0.1.0_all.deb
> check-dependencies
4 changes: 0 additions & 4 deletions src/sphinx/formats/debian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ If you want to use the java based implementation, enable the following plugin.
enablePlugins(JDebPackaging)
Note that JDeb will add `default-jre` and `java6-runtime` as dependencies if
they are not explicitly specified using ``debianPackageDependencies`` (
`jdeb#208 <https://github.com/tcurdt/jdeb/issues/208>`_).

0.8 or lower
~~~~~~~~~~~~

Expand Down

0 comments on commit 5f4ced3

Please sign in to comment.