[java-idp-testbed] branch main updated: foo

Rod Widdowson rdw at steadingsoftware.com
Sat Jun 4 13:54:55 UTC 2022


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-idp-testbed.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-testbed.git;a=commit;h=b1f230e7bc4055ebcf0a61330faebb21550258f5

The following commit(s) were added to refs/heads/main by this push:
     new b1f230e  foo
b1f230e is described below

commit b1f230e7bc4055ebcf0a61330faebb21550258f5
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jun 2 19:29:10 2022 +0100

    foo
---
 .classpath                           |  2 +-
 .settings/org.eclipse.jdt.core.prefs |  6 +++---
 idp-testbed-jetty-11.launch          | 10 +++++-----
 pom.xml                              | 11 +++++++++++
 src/main/java/Main.java              | 26 +++++++++++++++++++++++++-
 5 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/.classpath b/.classpath
index ff4983c..77be441 100644
--- a/.classpath
+++ b/.classpath
@@ -24,7 +24,7 @@
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
 		<attributes>
 			<attribute name="maven.pomderived" value="true"/>
 		</attributes>
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 3bb416c..bbd5bf4 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -11,9 +11,9 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
 org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
 org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.compliance=17
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -76,7 +76,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.source=17
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16
diff --git a/idp-testbed-jetty-11.launch b/idp-testbed-jetty-11.launch
index 02d06ae..c8b07ea 100644
--- a/idp-testbed-jetty-11.launch
+++ b/idp-testbed-jetty-11.launch
@@ -2,7 +2,7 @@
 <launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
     <stringAttribute key="bad_container_name" value="/idp-testbed-jetty-10"/>
     <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-        <listEntry value="/java-idp-testbed/src/main/java/Main.java"/>
+        <listEntry value="/idp-testbed/src/main/java/Main.java"/>
     </listAttribute>
     <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
         <listEntry value="1"/>
@@ -14,9 +14,9 @@
     <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
     <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
     <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="Main"/>
-    <stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="java-idp-testbed"/>
-    <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-Djetty.home=/opt/jetty-home-11.0.9 -Djava.security.egd=file:/dev/urandom -Didp.home=classpath: -Didp.webflows=classpath*:/flows -Dlogback.configurationFile=resources/logback.xml -Didp.logfiles=${workspace_loc:java-idp-testbed/src/main/resources/logs} -Djava.io.tmpdir=tmp -Dnet.shibboleth.idp.plugin.oidc.op.servlet.RegisterFilterServletContextInitializer=disabled -Didp.loglevel.ldap=INFO -Didp.loglevel.idp=DEBU [...]
-    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="java-idp-testbed"/>
+    <stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="idp-testbed"/>
+    <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-Djetty.home=H:\Perforce\Juno\New\jetty-home-11.0.9 -Didp.home=classpath: -Didp.webflows=classpath*:/flows -Dlogback.configurationFile=resources/logback.xml -Didp.logfiles=H:\Perforce\Juno\New\java-idp-testbed/src/main/resources/logs -Djava.io.tmpdir=tmp -Dnet.shibboleth.idp.plugin.oidc.op.servlet.RegisterFilterServletContextInitializer=disabled -Didp.loglevel.ldap=INFO -Didp.loglevel.idp=DEBUG -Didp.loglevel.o [...]
+    <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="idp-testbed"/>
     <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-    <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:java-idp-jetty-base/src/main/resources/jetty-base}"/>
+    <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:idp-jetty-base/src/main/resources/jetty-base}"/>
 </launchConfiguration>
diff --git a/pom.xml b/pom.xml
index acd1c72..112eab7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -308,6 +308,17 @@
             <scope>runtime</scope>
         </dependency>
 
+        <dependency>
+            <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
+            <artifactId>jdbc-storage-impl</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hsqldb</groupId>
+            <artifactId>hsqldb</artifactId>
+            <scope>test</scope>
+        </dependency>
+
         <!-- For OIDC plugin testing. -->
         <!--
         <dependency>
diff --git a/src/main/java/Main.java b/src/main/java/Main.java
index 1e65245..8a39353 100644
--- a/src/main/java/Main.java
+++ b/src/main/java/Main.java
@@ -1,3 +1,9 @@
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.apache.commons.dbcp2.BasicDataSource;
+
 /*
  * Licensed to the University Corporation for Advanced Internet Development, 
  * Inc. (UCAID) under one or more contributor license agreements.  See the 
@@ -17,11 +23,29 @@
 
 /** Start Jetty */
 public class Main {
+    private static final String INIT_SQL_HSQLDB="CREATE TABLE StorageRecords (\r\n"
+            + "  context varchar(255) NOT NULL,\n"
+            + "  id varchar(255) NOT NULL,\n"
+            + "  expires bigint DEFAULT NULL,\n"
+            + "  value varchar(255) NOT NULL,\n"
+            + "  version bigint NOT NULL,\n"
+            + "  PRIMARY KEY (context,id)\n"
+            + ")";
 
     /**
      * @param args command-line arguments
+     * @throws SQLException 
      */
-    public static void main(String[] args) {
+    public static void main(String[] args) throws SQLException {
+        try (final BasicDataSource dataSource = new BasicDataSource()) {
+            dataSource.setUrl("jdbc:hsqldb:mem:JPAStorageService;hsqldb.sqllog=3");
+            dataSource.setUsername("sa");
+            dataSource.setPassword("");
+            try (final Connection dbConn = dataSource.getConnection()) {
+                final Statement statement = dbConn.createStatement();
+                statement.executeUpdate(INIT_SQL_HSQLDB);
+            }
+        }
         org.eclipse.jetty.start.Main.main(args);
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list