Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions src/main/scala/io/sdkman/changelogs/KarafMigrations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,53 @@ package io.sdkman.changelogs

import com.github.mongobee.changeset.{ChangeLog, ChangeSet}
import com.mongodb.client.MongoDatabase
import org.bson.Document

@ChangeLog(order = "025")
class KarafMigrations {

@ChangeSet(order = "001", id = "001_add_karaf_candidate", author = "tonit")
def migration001(implicit db: MongoDatabase): Candidate = {
Candidate(
candidate = "karaf",
name = "Karaf",
description =
"Apache Karaf is a polymorphic, lightweight, powerful, and enterprise ready applications runtime. It provides all the ecosystem and bootstrapping options you need for your applications. It runs on premise or on cloud. By polymorphic, it means that Karaf can host any kind of applications: WAR, OSGi, Spring, and much more.",
websiteUrl = "https://karaf.apache.org/"
).insert()
val CandidateName = "karaf"

@ChangeSet(
order = "003",
id = "003-add_new_karaf_versions_and_update_default",
author = "fcolinet"
)
def migration003(implicit db: MongoDatabase): Document = {
List(
"4.4.3",
"4.4.2",
"4.4.1",
"4.4.0",
"4.3.9",
"4.3.8",
"4.3.7",
"4.3.6",
"4.3.5",
"4.3.4",
"4.3.3",
"4.3.2",
"4.3.1",
"4.3.0",
"4.2.16",
"4.2.15",
"4.2.14",
"4.2.13",
"4.2.12",
"4.2.11",
"4.2.10",
"4.2.9"
).map(
version =>
Version(
candidate = CandidateName,
version = version,
url =
s"https://archive.apache.org/dist/karaf/$version/apache-karaf-$version.tar.gz"
)
)
.validate()
.insert()
setCandidateDefault(CandidateName, "4.4.3")
}
}