From b7c95a1a359ab2597af021a6c62d47da3f243f3d Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 17 Oct 2024 11:43:05 +1000 Subject: [PATCH] Upgrade to Jetty 10.0.24, 11.0.24 and 12.0.14 Signed-off-by: Olivier Lamy --- .../sdkman/changelogs/JettyMigrations.scala | 69 +++++-------------- 1 file changed, 18 insertions(+), 51 deletions(-) diff --git a/src/main/scala/io/sdkman/changelogs/JettyMigrations.scala b/src/main/scala/io/sdkman/changelogs/JettyMigrations.scala index 8b392ced..0881af32 100644 --- a/src/main/scala/io/sdkman/changelogs/JettyMigrations.scala +++ b/src/main/scala/io/sdkman/changelogs/JettyMigrations.scala @@ -5,62 +5,29 @@ import com.mongodb.client.MongoDatabase @ChangeLog(order = "086") class JettyMigrations { - @ChangeSet( - order = "001", - id = "001-add_jetty_candidate", - author = "olamy" - ) - def migration001(implicit db: MongoDatabase) = { - Candidate( - candidate = "jetty", - name = "Eclipse Jetty", - description = - "Eclipse Jetty provides a highly scalable and memory-efficient web server and servlet container, supporting many protocols such as HTTP/3,2,1 and WebSocket", - websiteUrl = "https://jetty.org/" - ).insert() - - } - - @ChangeSet( - order = "002", - id = "002-add_jetty_10.0.21", - author = "olamy" - ) - def migration002(implicit db: MongoDatabase) = { - Version( - "jetty", - "10.0.21", - "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/10.0.21/jetty-home-10.0.21.zip" - ).validate() - .insert() - } @ChangeSet( - order = "003", - id = "003-add_jetty_11.0.21", + order = "005", + id = "005-update_jetty_versions", author = "olamy" ) - def migration003(implicit db: MongoDatabase) = { - Version( - "jetty", - "11.0.21", - "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/11.0.21/jetty-home-11.0.21.zip" - ).validate() + def migration005(implicit db: MongoDatabase) = { + List( + "10" -> "10.0.24", + "11" -> "11.0.24", + "12" -> "12.0.14" + ).map { + case (series: String, version: String) => + Version( + candidate = "jetty", + version = version, + url = + s"https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/$version/jetty-home-$version.zip" + ) + } + .validate() .insert() - } + setCandidateDefault("jetty", "12.0.14") - @ChangeSet( - order = "004", - id = "004-add_jetty_12.0.9", - author = "olamy" - ) - def migration004(implicit db: MongoDatabase) = { - Version( - "jetty", - "12.0.9", - "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/12.0.9/jetty-home-12.0.9.zip" - ).validate() - .insert() - .asCandidateDefault() } }