[java-plugin-storage-jdbc] 02/03: OSJ-342 Investigate Strategies to end of life our use of Hibernate in V5

Rod Widdowson rdw at steadingsoftware.com
Wed Jun 1 10:34:36 UTC 2022


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

rdw pushed a commit to branch main
in repository java-plugin-storage-jdbc.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-storage-jdbc.git;a=commit;h=8b79a230efe2480d3eae937286d75b8ca860deb5

commit 8b79a230efe2480d3eae937286d75b8ca860deb5
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon May 30 20:01:47 2022 +0100

    OSJ-342 Investigate Strategies to end of life our use of Hibernate in V5
    
    https://shibboleth.atlassian.net/browse/OSJ-342
    
    Plugin preparation
     - Fix name and paths (no 'idp')
     - Remove module
     - We have no dependencies
---
 jdbc-storage-api/pom.xml                           |  6 +-
 .../shibboleth/plugin/storage/jdbc/Version.java    |  6 +-
 jdbc-storage-dist/pom.xml                          |  6 +-
 jdbc-storage-dist/src/main/assembly/assembly.xml   | 73 ++++++++++------------
 jdbc-storage-impl/pom.xml                          | 11 +++-
 .../storage/jdbc/impl/JDBCStorageModule.java       | 41 ------------
 .../storage/jdbc/impl/JDBCStoragePlugin.java       |  8 +--
 .../services/net.shibboleth.idp.module.IdPModule   |  1 -
 .../idp/plugin/storage/jdbc/conf/placeholder.xml   |  1 -
 .../idp/plugin/storage/jdbc/module.properties      | 14 -----
 .../storage/jdbc/impl}/plugin.properties           |  2 +-
 pom.xml                                            | 10 ---
 12 files changed, 52 insertions(+), 127 deletions(-)

diff --git a/jdbc-storage-api/pom.xml b/jdbc-storage-api/pom.xml
index 3824f7e..cd7c459 100644
--- a/jdbc-storage-api/pom.xml
+++ b/jdbc-storage-api/pom.xml
@@ -12,11 +12,11 @@
     <artifactId>jdbc-storage-api</artifactId>
     <packaging>jar</packaging>
     <name>Shibboleth :: Plugins :: jdbc-storage API</name>
-    <description>IdP jdbc-storage plugin API.</description>
+    <description>JDBC storage plugin API.</description>
 
     <properties>
         <checkstyle.configLocation>${project.basedir}/../checkstyle.xml</checkstyle.configLocation>
-        <automatic.module.name>net.shibboleth.idp.plugin.storage.jdbc.api</automatic.module.name>
+        <automatic.module.name>net.shibboleth.plugin.storage.jdbc.api</automatic.module.name>
     </properties>
 
     <dependencies>
@@ -37,7 +37,7 @@
                     <archive>
                         <index>true</index>
                         <manifestEntries>
-                            <Main-Class>net.shibboleth.idp.plugin.storage.jdbc.Version</Main-Class>
+                            <Main-Class>net.shibboleth.plugin.storage.jdbc.Version</Main-Class>
                         </manifestEntries>
                         <manifestSections>
                             <manifestSection>
diff --git a/jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java b/jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java
index 644ac15..15b6f28 100644
--- a/jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java
+++ b/jdbc-storage-api/src/main/java/net/shibboleth/plugin/storage/jdbc/Version.java
@@ -21,7 +21,7 @@ import javax.annotation.Nullable;
 /** Class for getting and printing the version of the plugin. */
 public final class Version {
 
-    /** IdP version. */
+    /** Plugin version. */
     @Nullable private static final String VERSION = Version.class.getPackage().getImplementationVersion();
 
     /** Constructor. */
@@ -38,9 +38,9 @@ public final class Version {
     }
 
     /**
-     * Get the version of the IdP.
+     * Get the version of the Plugin.
      * 
-     * @return version of the IdP
+     * @return the version
      */
     @Nullable public static String getVersion() {
         return VERSION;
diff --git a/jdbc-storage-dist/pom.xml b/jdbc-storage-dist/pom.xml
index 8865896..4689667 100644
--- a/jdbc-storage-dist/pom.xml
+++ b/jdbc-storage-dist/pom.xml
@@ -10,13 +10,13 @@
 
     <artifactId>jdbc-storage-dist</artifactId>
     <name>Shibboleth :: Plugins :: jdbc-storage Distribution</name>
-    <description>IdP jdbc-storage plugin packaging.</description>
+    <description>JDBC storage plugin packaging.</description>
     <packaging>pom</packaging>
 
 
     <properties>
         <checkstyle.configLocation>${project.basedir}/../checkstyle.xml</checkstyle.configLocation>
-        <dist.plugin.finalName>idp-plugin-jdbc-storage-${project.version}</dist.plugin.finalName>
+        <dist.plugin.finalName>java-plugin-jdbc-storage-${project.version}</dist.plugin.finalName>
     </properties>
 
     <build>
@@ -67,7 +67,7 @@
                                     <dataVersion>${maven-dist-enforcer-data.version}</dataVersion>
                                     <dataKeyRing>${basedir}/src/main/enforcer/shibbolethKeys.gpg</dataKeyRing>
                                     <parentPomDir>${basedir}/..</parentPomDir>
-                                    <zipFiles>${project.build.directory}/${dist.plugin.finalName}.zip</zipFiles>
+                                    <zipFiles/>
                                     <tgzFiles>${project.build.directory}/${dist.plugin.finalName}.tar.gz</tgzFiles>
                                     <checkSignatures>true</checkSignatures>
                                     <checkDependencies>true</checkDependencies>
diff --git a/jdbc-storage-dist/src/main/assembly/assembly.xml b/jdbc-storage-dist/src/main/assembly/assembly.xml
index 06c755c..f9052ac 100644
--- a/jdbc-storage-dist/src/main/assembly/assembly.xml
+++ b/jdbc-storage-dist/src/main/assembly/assembly.xml
@@ -1,35 +1,33 @@
 <assembly
-	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-	<id>bin</id>
-	<formats>
-		<format>tar.gz</format>
-		<format>tar.bz2</format>
-		<format>zip</format>
-	</formats>
+    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>bin</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
 
-	<fileSets>
-		<fileSet>
-			<directory>src/main/resources/</directory>
-			<outputDirectory></outputDirectory>
-		</fileSet>
+    <fileSets>
+        <fileSet>
+            <directory>src/main/resources/</directory>
+            <outputDirectory></outputDirectory>
+        </fileSet>
 
         <!-- The plugin property file -->
-		<fileSet>			
-			<directory>../plugin-impl/target/classes/FIXME</directory>
-			<outputDirectory>bootstrap</outputDirectory>
-			<includes>
-				<include>plugin.properties</include>
-			</includes>
-		</fileSet>
-		
-		<!--  The implementation jar -->
         <fileSet>
-            <directory>../plugin-impl/target</directory>
+            <directory>../jdbc-storage-impl/target/classes/net/shibboleth/plugin/storage/jdbc/impl</directory>
+            <outputDirectory>bootstrap</outputDirectory>
+            <includes>
+                <include>plugin.properties</include>
+            </includes>
+        </fileSet>
+
+        <!--  The implementation jar -->
+        <fileSet>
+            <directory>../jdbc-storage-impl/target</directory>
             <outputDirectory>webapp/WEB-INF/lib</outputDirectory>
             <includes>
-                <include>plugin-impl-*.jar</include>
+                <include>jdbc-storage-impl-*.jar</include>
             </includes>
             <excludes>
                 <exclude>*test*.jar</exclude>
@@ -40,10 +38,10 @@
         
         <!--  The API jar -->
         <fileSet>
-            <directory>../plugin-api/target</directory>
+            <directory>../jdbc-storage-api/target</directory>
             <outputDirectory>webapp/WEB-INF/lib</outputDirectory>
             <includes>
-                <include>plugin-api-*.jar</include>
+                <include>jdbc-storage-api-*.jar</include>
             </includes>
             <excludes>
                 <exclude>*test*.jar</exclude>
@@ -52,23 +50,16 @@
             </excludes>
         </fileSet>
         
-         <!--  The dependencies -->
+        <!--  We have no dependencies -->
+
+        <!-- The signing certificates -->
         <fileSet>
-            <directory>../plugin-impl/target/dependency</directory>
-            <outputDirectory>webapp/WEB-INF/lib</outputDirectory>
+            <directory>src/main/resources/bootstrap</directory>
+            <outputDirectory>bootstrap</outputDirectory>
             <includes>
-                <include>*.jar</include>
+                <include>keys.txt</include>
             </includes>
         </fileSet>
-
-        <!-- The signing certificates -->
-		<fileSet>			
-			<directory>src/main/resources/bootstrap</directory>
-			<outputDirectory>bootstrap</outputDirectory>
-			<includes>
-				<include>keys.txt</include>
-			</includes>
-		</fileSet>
-	</fileSets>
+    </fileSets>
 
 </assembly>
diff --git a/jdbc-storage-impl/pom.xml b/jdbc-storage-impl/pom.xml
index 7ad2940..20a06da 100644
--- a/jdbc-storage-impl/pom.xml
+++ b/jdbc-storage-impl/pom.xml
@@ -15,14 +15,15 @@
     
     <properties>
         <checkstyle.configLocation>${project.basedir}/../checkstyle.xml</checkstyle.configLocation>
-        <automatic.module.name>net.shibboleth.idp.plugin.storage.jdbc.impl</automatic.module.name>
+        <automatic.module.name>net.shibboleth.plugin.storage.jdbc.impl</automatic.module.name>
     </properties>
     
     <dependencies>
-        <!-- compile time intra project dependencies -->
+        <!-- Compile time intra project dependencies -->
         <dependency>
             <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
             <artifactId>jdbc-storage-api</artifactId>
+            <version>${project.version}</version>
         </dependency>
         <!-- Service API and Plugin Description dependency -->
         <dependency>
@@ -35,6 +36,11 @@
             <artifactId>idp-admin-impl</artifactId>
             <scope>provided</scope>
         </dependency>
+	<dependency>
+	    <groupId>${slf4j.groupId}</groupId>
+	    <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+	</dependency>
         <!--  Test dependencies -->
         <dependency>
             <groupId>${opensaml.groupId}</groupId>
@@ -68,5 +74,4 @@
         -->
     </dependencies>
 
-
 </project>
diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageModule.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageModule.java
deleted file mode 100644
index ff460bd..0000000
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStorageModule.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the University Corporation for Advanced Internet Development,
- * Inc. (UCAID) under one or more contributor license agreements.  See the
- * NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The UCAID licenses this file to You under the Apache
- * License, Version 2.0 (the "License"); you may not use this file except in
- * compliance with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.shibboleth.plugin.storage.jdbc.impl;
-
-import java.io.IOException;
-
-import net.shibboleth.idp.module.ModuleException;
-import net.shibboleth.idp.module.impl.PluginIdPModule;
-
-
-/**
- * {@link IdPModule IdP Module} implementation.
- */
-public class JDBCStorageModule extends PluginIdPModule{
-    
-    /**
-     * Constructor.
-     *  
-     * @throws ModuleException on error
-     * @throws IOException on error
-     */
-    public JDBCStorageModule() throws IOException, ModuleException {
-        super(JDBCStorageModule.class);
-    }
-    
-
-}
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java
index a17829a..1275483 100644
--- a/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java
+++ b/jdbc-storage-impl/src/main/java/net/shibboleth/plugin/storage/jdbc/impl/JDBCStoragePlugin.java
@@ -17,9 +17,7 @@
 package net.shibboleth.plugin.storage.jdbc.impl;
 
 import java.io.IOException;
-import javax.annotation.Nonnull;
 
-import net.shibboleth.idp.plugin.IdPPlugin;
 import net.shibboleth.idp.plugin.PluginException;
 import net.shibboleth.idp.plugin.PropertyDrivenIdPPlugin;
 
@@ -30,14 +28,12 @@ public class JDBCStoragePlugin extends PropertyDrivenIdPPlugin {
 
     /**
      * Constructor.
-     *
-     * @param claz type of plugin
      * 
      * @throws IOException if properties can't be loaded
      * @throws PluginException if another error occurs
      */
-    public JDBCStoragePlugin(@Nonnull final Class<? extends IdPPlugin> claz) throws IOException, PluginException {
-        super(claz);
+    public JDBCStoragePlugin() throws IOException, PluginException {
+        super(JDBCStoragePlugin.class);
     }
 
 }
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule b/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
deleted file mode 100644
index 09130d4..0000000
--- a/jdbc-storage-impl/src/main/resources/META-INF/services/net.shibboleth.idp.module.IdPModule
+++ /dev/null
@@ -1 +0,0 @@
-net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageModule
diff --git a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml
deleted file mode 100644
index 1746f0a..0000000
--- a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml
+++ /dev/null
@@ -1 +0,0 @@
-<empty/>
\ No newline at end of file
diff --git a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties b/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties
deleted file mode 100644
index de18216..0000000
--- a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/module.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# Example Properties defining an authentication module.
-
-# Class to Module ID mappings
-net.shibboleth.plugin.storage.jdbc.impl.JDBCStorageModule = net.shibboleth.storage.jdbc
-
-# Module Owner
-net.shibboleth.storage.jdbc.plugin = net.shibboleth.idp.plugin.storage.jdbc
-
-net.shibboleth.storage.jdbc.name = JDBC Storage Service
-net.shibboleth.storage.jdbc.desc = Implementation of a Login flow for jdbc-storage
-net.shibboleth.storage.jdbc.url = /jdbc-storageConfiguration
-net.shibboleth.storage.jdbc.1.src = /net/shibboleth/idp/plugin/storage/jdbc/conf/placeholder.xml
-net.shibboleth.storage.jdbc.1.dest = conf/placeholder.xml
-net.shibboleth.storage.jdbc.1.replace = true
diff --git a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties b/jdbc-storage-impl/src/main/resources/net/shibboleth/plugin/storage/jdbc/impl/plugin.properties
similarity index 75%
rename from jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties
rename to jdbc-storage-impl/src/main/resources/net/shibboleth/plugin/storage/jdbc/impl/plugin.properties
index 72a63e9..4e637cb 100644
--- a/jdbc-storage-impl/src/main/resources/net/shibboleth/idp/plugin/storage/jdbc/plugin.properties
+++ b/jdbc-storage-impl/src/main/resources/net/shibboleth/plugin/storage/jdbc/impl/plugin.properties
@@ -1,6 +1,6 @@
 # Example properties defining this plugin
 
-plugin.id = net.shibboleth.idp.plugin.storage.jdbc
+plugin.id = net.shibboleth.plugin.storage.jdbc
 # Only used when package manifest is not available
 plugin.version = 0.0.1
 
diff --git a/pom.xml b/pom.xml
index 160a1d2..a2fee82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,16 +66,6 @@
     <dependencyManagement>
         <!-- jdbc-storage project dependencies -->
         <dependencies>
-            <dependency>
-                <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
-                <artifactId>jdbc-storage-api</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>net.shibboleth.plugin.storage.jdbc</groupId>
-                <artifactId>jdbc-storage-impl</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <!-- Shibboleth IdP BOM for importing IdP dependencies -->
             <dependency>
                 <groupId>net.shibboleth.idp</groupId>

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


More information about the commits mailing list