read Java system properties from ISABELLE_CI_PROPERTIES
authorLars Hupel <lars.hupel@mytum.de>
Tue, 21 Jun 2016 10:53:43 +0200
changeset 63328 7a8515c58271
parent 63327 83a91a73fcb5
child 63329 6b26c378ab35
read Java system properties from ISABELLE_CI_PROPERTIES
src/Pure/Tools/ci_profile.scala
--- a/src/Pure/Tools/ci_profile.scala	Mon Jun 20 22:31:16 2016 +0200
+++ b/src/Pure/Tools/ci_profile.scala	Tue Jun 21 10:53:43 2016 +0200
@@ -7,6 +7,9 @@
 package isabelle
 
 
+import java.util.{Properties => JProperties}
+
+
 abstract class CI_Profile extends Isabelle_Tool.Body
 {
 
@@ -39,10 +42,22 @@
     }
   }
 
+  private def load_properties(): JProperties =
+  {
+    val props = new JProperties()
+    val file = Path.explode(Isabelle_System.getenv_strict("ISABELLE_CI_PROPERTIES")).file
+    if (file.exists())
+      props.load(new java.io.FileReader(file))
+    props
+  }
+
 
   override final def apply(args: List[String]): Unit =
   {
     List("ML_PLATFORM", "ML_HOME", "ML_SYSTEM", "ML_OPTIONS").foreach(print_variable)
+    val props = load_properties()
+    System.getProperties().putAll(props)
+
     val isabelle_home = Path.explode(Isabelle_System.getenv_strict("ISABELLE_HOME"))
     println(s"Build for Isabelle id ${hg_id(isabelle_home)}")