[java-idp-jetty-base] 01/03: JJETTY-13 Implement Jetty-base plugin V2

Rod Widdowson rdw at steadingsoftware.com
Mon Jul 14 18:55:05 UTC 2025


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

rdw pushed a commit to branch dev/JJETTY-13
in repository java-idp-jetty-base.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-jetty-base.git;a=commit;h=9f6334d3c67c3fb20bd1ed6c05da1fef10920766

commit 9f6334d3c67c3fb20bd1ed6c05da1fef10920766
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Jul 14 16:04:24 2025 +0100

    JJETTY-13 Implement Jetty-base plugin V2
    
    https://shibboleth.atlassian.net/browse/JJETTY-13
    
    Test downloading procrun and fix bug
---
 .../idp/plugin/jetty/cli/impl/JettyDownloadCLI.java     |  4 ++--
 .../idp/plugin/jetty/cli/impl/JettyDownloadCLITest.java | 17 +++++++++++++++--
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/jetty-cli/src/main/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLI.java b/jetty-cli/src/main/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLI.java
index 80ca450..97a21e3 100644
--- a/jetty-cli/src/main/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLI.java
+++ b/jetty-cli/src/main/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLI.java
@@ -132,12 +132,12 @@ public class JettyDownloadCLI extends AbstractIdPHomeAwareCommandLine<JettyDownl
         
         final StringBuilder nameBuilder = new StringBuilder(downloadDirName);
         final String classifier = args.getClassifier();
-        if (classifier != null) {
+        if (classifier != null && !classifier.isEmpty()) {
             //
             // Add classifier
             //    commons-daemon-1.4.1-bin-windows
             //
-            nameBuilder.append(args.getClassifier());
+            nameBuilder.append('-').append(args.getClassifier());
         }
 
         //
diff --git a/jetty-cli/src/test/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLITest.java b/jetty-cli/src/test/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLITest.java
index febb52d..1372ca2 100644
--- a/jetty-cli/src/test/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLITest.java
+++ b/jetty-cli/src/test/java/net/shibboleth/idp/plugin/jetty/cli/impl/JettyDownloadCLITest.java
@@ -14,6 +14,8 @@
 
 package net.shibboleth.idp.plugin.jetty.cli.impl;
 
+import static org.testng.Assert.assertEquals;
+
 import java.io.IOException;
 import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
@@ -30,6 +32,7 @@ import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.Test;
 
 import net.shibboleth.idp.installer.InstallerSupport;
+import net.shibboleth.shared.cli.AbstractCommandLine;
 import net.shibboleth.shared.primitive.LoggerFactory;
 
 public class JettyDownloadCLITest {
@@ -73,7 +76,17 @@ public class JettyDownloadCLITest {
         InstallerSupport.deleteTree(ih);
     }
    
-    @Test public void TestDownload() {
-        JettyDownloadCLI.runMain(new String[] {"-v", "12.0.23"});
+    @Test public void TestDownloadJetty() {
+        assertEquals(JettyDownloadCLI.runMain(new String[] {"-v", "12.0.23"}), AbstractCommandLine.RC_OK);
+    }
+    
+    @Test public void TestDownloadProcrun() {
+        assertEquals(JettyDownloadCLI.runMain(new String[] {"-v", "1.4.1",
+                                                            "--type", "zip",
+                                                            "--classifier", "bin-windows",
+                                                            "--groupId", "commons-daemon",
+                                                            "--artifactId","commons-daemon"
+                                                            }), AbstractCommandLine.RC_OK);
     }
+
 }

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


More information about the commits mailing list