File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,18 @@ lazy val xml = crossProject.in(file("."))
27
27
28
28
apiMappings ++= Map (
29
29
scalaInstance.value.libraryJar
30
- -> url(s " http://www.scala-lang.org/api/ ${scalaVersion.value}/ " ),
30
+ -> url(s " http://www.scala-lang.org/api/ ${scalaVersion.value}/ " )
31
+ ) ++ {
31
32
// http://stackoverflow.com/questions/16934488
32
- file(System .getProperty(" sun.boot.class.path" ).split(java.io.File .pathSeparator).filter(_.endsWith(java.io.File .separator + " rt.jar" )).head)
33
- -> url(" http://docs.oracle.com/javase/8/docs/api" )
34
- )
33
+ Option (System .getProperty(" sun.boot.class.path" )).flatMap { classPath =>
34
+ classPath.split(java.io.File .pathSeparator).filter(_.endsWith(java.io.File .separator + " rt.jar" )).headOption
35
+ }.map { jarPath =>
36
+ Map (
37
+ file(jarPath)
38
+ -> url(" http://docs.oracle.com/javase/8/docs/api" )
39
+ )
40
+ } getOrElse(Map .empty)
41
+ }
35
42
)
36
43
.jvmSettings(
37
44
OsgiKeys .exportPackage := Seq (s " scala.xml.*;version= ${version.value}" ),
You can’t perform that action at this time.
0 commit comments