diff --git a/.travis.yml b/.travis.yml index 09a24f9..b7225f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: scala sudo: false -script: sbt '; test; scripted' +script: sbt '; test; scripted' jdk: - oraclejdk8 diff --git a/src/main/scala/com/typesafe/sbt/osgi/Osgi.scala b/src/main/scala/com/typesafe/sbt/osgi/Osgi.scala index 120481b..bbc7084 100644 --- a/src/main/scala/com/typesafe/sbt/osgi/Osgi.scala +++ b/src/main/scala/com/typesafe/sbt/osgi/Osgi.scala @@ -110,7 +110,7 @@ private object Osgi { def validateAllPackagesDecidedAbout(internal: Seq[String], exported: Seq[String], realPackages: List[String]): Unit = if (internal.isEmpty && exported.isEmpty && realPackages.nonEmpty) { throw new RuntimeException(s"Remaining packages are undecided about (private or exported) for OSGi (this is rather dangerous!): ${realPackages}") - } else + } else { realPackages match { case Nil => // OK! case pack :: remainingPackages => @@ -125,9 +125,10 @@ private object Osgi { s" Exported packages: $exported\n" + s" Offending package: $pack\n") } + } - val i = internal.map(_.replaceAll(".*", "")) - val e = exported.map(_.replaceAll(".*", "")) + val i = internal.map(p => if (p.endsWith(".*")) p.dropRight(2) else p) + val e = exported.map(p => if (p.endsWith(".*")) p.dropRight(2) else p) validateAllPackagesDecidedAbout(i, e, allPackages.toList) } diff --git a/src/sbt-test/sbt-osgi/test-08-failOnClassesExcludedFromJarStar/project/build.properties b/src/sbt-test/sbt-osgi/test-08-failOnClassesExcludedFromJarStar/project/build.properties new file mode 100644 index 0000000..64317fd --- /dev/null +++ b/src/sbt-test/sbt-osgi/test-08-failOnClassesExcludedFromJarStar/project/build.properties @@ -0,0 +1 @@ +sbt.version=0.13.15