[java-identity-provider] branch main updated: IDP-2107 Misc V5 Installer tasks

Rod Widdowson rdw at steadingsoftware.com
Thu May 25 13:28:48 UTC 2023


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

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=df809b219a0ef64ab515266c00035e099733de3e

The following commit(s) were added to refs/heads/main by this push:
     new df809b219 IDP-2107 Misc V5 Installer tasks
df809b219 is described below

commit df809b219a0ef64ab515266c00035e099733de3e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu May 25 11:24:43 2023 +0100

    IDP-2107 Misc V5 Installer tasks
    
    https://shibboleth.atlassian.net/browse/IDP-2107
    
    Move the CLI lib file from bin/lib to dest/binlib
---
 .../main/resources/net/shibboleth/idp/module/bin/runclass.bat    | 2 +-
 .../src/main/resources/net/shibboleth/idp/module/bin/runclass.sh | 2 +-
 .../java/net/shibboleth/idp/installer/impl/CopyDistribution.java | 9 +++++++--
 .../net/shibboleth/idp/installer/impl/InstallerProperties.java   | 2 +-
 .../test/java/net/shibboleth/idp/installer/TestInstallerCLI.java | 2 +-
 5 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.bat b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.bat
index 081995f75..5ac7cb8a2 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.bat
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.bat
@@ -27,7 +27,7 @@ set WEBAPPCP=%~dp0..\edit-webapp\WEB-INF\lib\*;%~dp0..\dist\plugin-webapp\WEB-IN
 :no_plugin_webapp
 
 REM add in the dependency .jar files
-set LOCALCLASSPATH=%~dp0lib\*;%WEBAPPCP%;%~dp0..\dist\webapp\WEB-INF\lib\*;%JAVA_HOME%\lib\classes.zip;%CLASSPATH%
+set LOCALCLASSPATH=%~dp0lib\*;%WEBAPPCP%;%~dp0..\dist\webapp\WEB-INF\lib\*;%~dp0..\dist\binlib\*;%JAVA_HOME%\lib\classes.zip;%CLASSPATH%
 
 REM Go to it !
 
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.sh b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.sh
index 5ee60f20d..9cd52ed41 100755
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.sh
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/bin/runclass.sh
@@ -42,7 +42,7 @@ if [ -z "$NO_PLUGIN_WEBAPP" ] ; then
   LOCALCLASSPATH="$LOCATION/../dist/plugin-webapp/WEB-INF/lib/*":$LOCALCLASSPATH
 fi
 LOCALCLASSPATH="$LOCATION/../edit-webapp/WEB-INF/lib/*":$LOCALCLASSPATH
-LOCALCLASSPATH="$LOCATION/lib/*":$LOCALCLASSPATH
+LOCALCLASSPATH="$LOCATION/../dist/binlib/*":$LOCALCLASSPATH
 
 if [ -n "$JAVA_HOME" ] ; then
   if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
index f420dbfea..641ccb0b0 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/CopyDistribution.java
@@ -75,7 +75,7 @@ public final class CopyDistribution {
         }
     }
 
-    /** Delete old copies of bin/lib (leaving bin for scripts), disty, doc and system.
+    /** Delete old copies of bin/lib (leaving bin for scripts), dist, doc and system.
      * system has to be unprotected first which also means we need to create it too.
      * @throws BuildException if badness occurs
      */
@@ -138,7 +138,12 @@ public final class CopyDistribution {
      * @throws BuildException if badness occurs
      */
     protected void copyBinDoc() {
-        distCopy(installerProps.getSourceDir(), installerProps.getTargetDir(), "bin/lib", true);
         distCopy(installerProps.getSourceDir(), installerProps.getTargetDir(), "doc");
+        final Path fromPath = installerProps.getSourceDir().resolve("bin").resolve("lib");
+        final Path toPath = installerProps.getTargetDir().resolve("dist").resolve("binlib");
+        log.debug("Copying distribution from {} to {}", fromPath, toPath);
+        final Copy copy = InstallerSupport.getCopyTask(fromPath, toPath);
+        copy.setOverwrite(false);
+        copy.execute();
     }
 }
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java
index afd00f0c2..50a635789 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/impl/InstallerProperties.java
@@ -312,7 +312,7 @@ public class InstallerProperties  {
     /** Where is the install coming from?
      * @return the source directory
      */
-    @Nullable public Path getSourceDir() {
+    @Nonnull public Path getSourceDir() {
         return srcDir;
     }
 
diff --git a/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java b/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java
index 32e124b4b..c80b36613 100644
--- a/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java
+++ b/idp-installer/src/test/java/net/shibboleth/idp/installer/TestInstallerCLI.java
@@ -26,7 +26,7 @@ import net.shibboleth.idp.installer.impl.InstallerProperties;
  */
 public class TestInstallerCLI {
 
-    @Test(enabled = false)
+    @Test(enabled = true)
     public void install() {
 
         System.setProperty(InstallerProperties.KEY_STORE_PASSWORD, "p1");

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


More information about the commits mailing list