File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/main/scala/com/typesafe/sbt/osgi Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,27 @@ object SbtOsgi extends AutoPlugin {
38
38
SbtCompat .packageBinBundle)
39
39
}
40
40
41
+ private def calculateClassPath (dependencyClasspathAsJarsInCompile : Seq [File ],
42
+ productsInCompile : Seq [File ],
43
+ fullClassPathInCompile : Seq [File ]): Seq [File ] = {
44
+ val initialClassPath = dependencyClasspathAsJarsInCompile ++ productsInCompile
45
+ val initialClassPathFileNames = initialClassPath.map(_.getName)
46
+
47
+ fullClassPathInCompile.filterNot(fullFile => initialClassPathFileNames.contains(fullFile.getName))
48
+ ++ initialClassPath
49
+ }
50
+
41
51
def defaultOsgiSettings : Seq [Setting [_]] = {
42
52
import OsgiKeys ._
43
53
Seq (
44
54
bundle := Osgi .bundleTask(
45
55
manifestHeaders.value,
46
56
additionalHeaders.value,
47
- (dependencyClasspathAsJars in Compile ).value.map(_.data) ++ (products in Compile ).value,
57
+ calculateClassPath(
58
+ (dependencyClasspathAsJars in Compile ).value.map(_.data),
59
+ (products in Compile ).value,
60
+ (fullClasspath in Compile ).value.map(_.data)
61
+ ),
48
62
(artifactPath in (Compile , packageBin)).value,
49
63
(resourceDirectories in Compile ).value,
50
64
embeddedJars.value,
You can’t perform that action at this time.
0 commit comments