[java-idp-testbed COMMIT] in /trunk: README.txt pom.xml src/main/config/conf/idp.properties src/main/config/creds/loc...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Nov 13 17:52:45 EST 2013
Author: tzeller
Date: Wed Nov 13 17:52:45 2013
New Revision: 45
URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=45&view=rev
Log:
Add properties from src/main/config/conf/idp.properties to system properties. Configure Jetty via src/main/jetty/jetty.xml.
Added:
trunk/src/main/config/creds/localhost.p12 (with props)
trunk/src/main/jetty/
trunk/src/main/jetty/jetty.xml (with props)
Modified:
trunk/README.txt
trunk/pom.xml
trunk/src/main/config/conf/idp.properties
trunk/src/main/java/common/Main.java
Modified: trunk/README.txt
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/README.txt?rev=45&r1=44&r2=45&view=diff
==============================================================================
--- trunk/README.txt (original)
+++ trunk/README.txt Wed Nov 13 17:52:45 2013
@@ -12,6 +12,8 @@
Right click on common.Main -> Run As -> Java Application
Open the following location in your browser :
- http://127.0.0.1:8080
+ http://localhost:8080
+or
+ https://localhost:8443
-The idp.home system property defines the path to configuration files, which are located relative to this file in src/main/resources.
+The idp.home system property defines the path to configuration files, which are located relative to this file in src/main/config.
Modified: trunk/pom.xml
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/pom.xml?rev=45&r1=44&r2=45&view=diff
==============================================================================
--- trunk/pom.xml (original)
+++ trunk/pom.xml Wed Nov 13 17:52:45 2013
@@ -214,12 +214,16 @@
<!-- Startup faster. https://jira.codehaus.org/browse/JETTY-1503 -->
<webInfIncludeJarPattern>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$</webInfIncludeJarPattern>
</webApp>
+ <jettyXml>
+ ${project.basedir}/src/main/jetty/jetty.xml
+ </jettyXml>
<systemProperties>
<systemProperty>
<name>idp.home</name>
<value>${project.basedir}/src/main/config</value>
</systemProperty>
- </systemProperties>
+ </systemProperties>
+ <systemPropertiesFile>${project.basedir}/src/main/config/conf/idp.properties</systemPropertiesFile>
<loginServices>
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
<name>Shib Testbed Web Authentication</name>
Modified: trunk/src/main/config/conf/idp.properties
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/config/conf/idp.properties?rev=45&r1=44&r2=45&view=diff
==============================================================================
--- trunk/src/main/config/conf/idp.properties (original)
+++ trunk/src/main/config/conf/idp.properties Wed Nov 13 17:52:45 2013
@@ -1,4 +1,10 @@
-# Provides base location of most out-of-war resources
+# Jetty properties
+jetty.host=localhost
+jetty.port=8080
+jetty.secure.port=8443
+jetty.https.port=8443
+jetty.dump.start=false
+jetty.dump.stop=false
# Use the XML Parser SecurityManager appropriate for the chosen parser
# Sun/Oracle, use com.sun.org.apache.xerces.internal.util.SecurityManager
Modified: trunk/src/main/java/common/Main.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/main/java/common/Main.java?rev=45&r1=44&r2=45&view=diff
==============================================================================
--- trunk/src/main/java/common/Main.java (original)
+++ trunk/src/main/java/common/Main.java Wed Nov 13 17:52:45 2013
@@ -17,9 +17,14 @@
package common;
+import java.io.FileInputStream;
+import java.util.Properties;
+
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext;
+import org.eclipse.jetty.xml.XmlConfiguration;
/** Start Jetty */
public class Main {
@@ -28,9 +33,18 @@
* @param args
*/
public static void main(String[] args) {
+ try {
+ // Add system properties from idp.properties.
+ Properties idpProperties = new Properties();
+ idpProperties.load(new FileInputStream("src/main/config/conf/idp.properties"));
+ for (String propertyName : idpProperties.stringPropertyNames()) {
+ System.setProperty(propertyName, idpProperties.getProperty(propertyName));
+ }
- try {
- Server server = new Server(8080);
+ // Configure Jetty from jetty.xml.
+ Resource fileserver_xml = Resource.newResource("src/main/jetty/jetty.xml");
+ XmlConfiguration configuration = new XmlConfiguration(fileserver_xml.getInputStream());
+ Server server = (Server) configuration.configure();
HashLoginService loginService = new HashLoginService();
[... 2 lines stripped ...]
More information about the commits
mailing list