[java-idp-testbed COMMIT] /trunk/src/main/java/Main.java

noreply at shibboleth.net noreply at shibboleth.net
Thu May 22 13:55:28 EDT 2014


Author: tzeller
Date: Thu May 22 13:55:28 2014
New Revision: 235

URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=235&view=rev
Log:
Move jetty.* properties out of idp.properties to idp-distribution:jetty-base/start.d/idp.ini.

Modified:
    trunk/src/main/java/Main.java

Modified: trunk/src/main/java/Main.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/java/Main.java?rev=235&r1=234&r2=235&view=diff
==============================================================================
--- trunk/src/main/java/Main.java (original)
+++ trunk/src/main/java/Main.java Thu May 22 13:55:28 2014
@@ -45,19 +45,20 @@
             PathPropertySupport.setupIdPHomeProperties();
             PathPropertySupport.setupTestbedHomeProperty();
 
+            // Determine path to jetty-base in the idp-distribution module.
+            final Path pathToJettyBase =
+                    Paths.get(Paths.get("").toAbsolutePath().getParent().toAbsolutePath().toString(),
+                            "java-identity-provider", "idp-distribution", "src", "main", "resources", "jetty-base");
+
             // Create Jetty configuration from jetty-base/etc/jetty.xml in the idp-distribution module.
-            final Path pathToJettyXML =
-                    Paths.get(Paths.get("").toAbsolutePath().getParent().toAbsolutePath().toString(),
-                            "java-identity-provider", "idp-distribution", "src", "main", "resources", "jetty-base",
-                            "etc", "jetty.xml");
+            final Path pathToJettyXML = pathToJettyBase.resolve(Paths.get("etc", "jetty.xml"));
             final Resource jettyXML = Resource.newResource(pathToJettyXML.toString());
             final XmlConfiguration configuration = new XmlConfiguration(jettyXML.getInputStream());
 
-            // Add properties to the Jetty configuration from conf/idp-properties in the idp-conf module.
-            final Path pathToIdPProperties =
-                    Paths.get(System.getProperty(PathPropertySupport.IDP_HOME), "conf", "idp.properties");
+            // Add properties to the Jetty configuration from jetty-base/start.d/idp.ini in the idp-distribution module.
+            final Path pathToIdPIni = pathToJettyBase.resolve(Paths.get("start.d", "idp.ini"));
             final Properties properties = new Properties();
-            properties.load(Resource.newResource(pathToIdPProperties.toFile().getAbsolutePath()).getInputStream());
+            properties.load(Resource.newResource(pathToIdPIni.toFile().getAbsolutePath()).getInputStream());
             for (String key : properties.stringPropertyNames()) {
                 configuration.getProperties().put(key, properties.getProperty(key));
             }



More information about the commits mailing list