diff --git a/build.gradle.kts b/build.gradle.kts index d8cb980a8..29b82f381 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,12 +25,12 @@ val getJars by tasks.registering(Copy::class) { outputs.upToDateWhen { false } //always download from(downloadArtifact) - // strip away the version string - .rename { s -> - s.replace("-${identityHubVersion}", "") - .replace("-${registrationServiceVersion}", "") - .replace("-all", "") - } + // strip away the version string + .rename { s -> + s.replace("-${identityHubVersion}", "") + .replace("-${registrationServiceVersion}", "") + .replace("-all", "") + } into(layout.projectDirectory.dir("libs/cli-tools")) } @@ -101,7 +101,8 @@ allprojects { } } maven { - url = uri("https://pkgs.dev.azure.com/sovity/41799556-91c8-4df6-8ddb-4471d6f15953/_packaging/core-edc/maven/v1") + url = + uri("https://pkgs.dev.azure.com/sovity/41799556-91c8-4df6-8ddb-4471d6f15953/_packaging/core-edc/maven/v1") name = "AzureRepo" } } @@ -137,8 +138,20 @@ subprojects { withJavadocJar() } - tasks.withType { - val fullOptions = options as StandardJavadocDocletOptions - fullOptions.addStringOption("Xdoclint:none", "-quiet") + tasks.withType().configureEach { + options { + val fullOptions = options as StandardJavadocDocletOptions + fullOptions.addStringOption("Xdoclint:none", "-quiet") + // Include Lombok-generated methods in the documentation + fullOptions.addBooleanOption("-A", true) + } + + // Ensure Lombok processor is available during JavaDoc generation + doFirst { + configurations.compileClasspath.get().forEach { file -> + val fullOptions = options as StandardJavadocDocletOptions + fullOptions.addStringOption("classpath", file.absolutePath) + } + } } } diff --git a/config/build.gradle.kts b/config/build.gradle.kts index 041257464..6fcdbd034 100644 --- a/config/build.gradle.kts +++ b/config/build.gradle.kts @@ -8,8 +8,7 @@ dependencies { annotationProcessor(libs.lombok) compileOnly(libs.lombok) - api(libs.edc.bootSpi) - + api(libs.edc.boot) testAnnotationProcessor(libs.lombok) testCompileOnly(libs.lombok) diff --git a/config/src/main/java/de/sovity/edc/utils/config/utils/UrlPathUtils.java b/config/src/main/java/de/sovity/edc/utils/config/utils/UrlPathUtils.java index c78930f34..bfaac2db7 100644 --- a/config/src/main/java/de/sovity/edc/utils/config/utils/UrlPathUtils.java +++ b/config/src/main/java/de/sovity/edc/utils/config/utils/UrlPathUtils.java @@ -26,11 +26,6 @@ public static String urlPathJoin(String... parts) { .filter(Objects::nonNull) .filter(it -> !it.isEmpty()) .reduce("", (cur, add) -> { - // Special Case: https:// - if (add.contains("://")) { - return add; - } - // Join with a single slash if (cur.endsWith("/") && add.startsWith("/")) { return cur + add.substring(1); diff --git a/config/src/test/java/UrlPathUtilsTest.java b/config/src/test/java/UrlPathUtilsTest.java index 6c1f3a3c2..dfbdf6bc7 100644 --- a/config/src/test/java/UrlPathUtilsTest.java +++ b/config/src/test/java/UrlPathUtilsTest.java @@ -45,6 +45,13 @@ void urlPathJoin_absolute() { assertThat(urlPathJoin("/a/", "/b")).isEqualTo("/a/b"); } + @Test + void urlPathJoin_immediate_protocol() { + assertThat(urlPathJoin("https://")).isEqualTo("https://"); + assertThat(urlPathJoin("https://", "b")).isEqualTo("https://b"); + assertThat(urlPathJoin("https://", "/b")).isEqualTo("https://b"); + } + @Test void urlPathJoin_protocol() { assertThat(urlPathJoin("https://a")).isEqualTo("https://a"); @@ -56,12 +63,12 @@ void urlPathJoin_protocol() { } @Test - void urlPathJoin_protocol_overrules_previous_segment() { - assertThat(urlPathJoin("https://ignored", "https://a")).isEqualTo("https://a"); - assertThat(urlPathJoin("https://ignored", "https://a/")).isEqualTo("https://a/"); - assertThat(urlPathJoin("https://ignored", "https://a", "b")).isEqualTo("https://a/b"); - assertThat(urlPathJoin("https://ignored", "https://a/", "b")).isEqualTo("https://a/b"); - assertThat(urlPathJoin("https://ignored", "https://a", "/b")).isEqualTo("https://a/b"); - assertThat(urlPathJoin("https://ignored", "https://a/", "/b")).isEqualTo("https://a/b"); + void urlPathJoin_protocol_overruling_not_enabled() { + assertThat(urlPathJoin("https://ignored", "https://a")).isEqualTo("https://ignored/https://a"); + assertThat(urlPathJoin("https://ignored", "https://a/")).isEqualTo("https://ignored/https://a/"); + assertThat(urlPathJoin("https://ignored", "https://a", "b")).isEqualTo("https://ignored/https://a/b"); + assertThat(urlPathJoin("https://ignored", "https://a/", "b")).isEqualTo("https://ignored/https://a/b"); + assertThat(urlPathJoin("https://ignored", "https://a", "/b")).isEqualTo("https://ignored/https://a/b"); + assertThat(urlPathJoin("https://ignored", "https://a/", "/b")).isEqualTo("https://ignored/https://a/b"); } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3db73e70b..a9efe5c46 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -81,7 +81,6 @@ edc-apiObservability = { module = "org.eclipse.edc:api-observability", version.r edc-authSpi = { module = "org.eclipse.edc:auth-spi", version.ref = "edc" } edc-authTokenbased = { module = "org.eclipse.edc:auth-tokenbased", version.ref = "edc" } edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" } -edc-bootSpi = { module = "org.eclipse.edc:boot", version.ref = "edc" } edc-configurationFilesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" } edc-connectorCore = { module = "org.eclipse.edc:connector-core", version.ref = "edc" } edc-contractDefinitionApi = { module = "org.eclipse.edc:contract-definition-api", version.ref = "edc" } diff --git a/utils/test-utils/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java b/utils/test-utils/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java index 31c00da55..827157bb6 100644 --- a/utils/test-utils/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java +++ b/utils/test-utils/src/main/java/de/sovity/edc/extension/e2e/connector/config/ConnectorConfigFactory.java @@ -17,6 +17,7 @@ import de.sovity.edc.extension.e2e.db.TestDatabase; import de.sovity.edc.utils.config.ConfigProps; import de.sovity.edc.utils.config.ConfigService; +import de.sovity.edc.utils.config.model.ConfigProp; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.val; @@ -35,7 +36,18 @@ public class ConnectorConfigFactory { private static final Random RANDOM = new Random(); - public static ConnectorConfig forTestDatabase(String participantId, TestDatabase testDatabase) { + public static ConnectorConfig forTestDatabase( + String participantId, + TestDatabase testDatabase + ) { + return forTestDatabase(participantId, testDatabase, Map.of()); + } + + public static ConnectorConfig forTestDatabase( + String participantId, + TestDatabase testDatabase, + Map overrides + ) { val firstPort = getFreePortRange(5); // The initialization of the Map is split into several statements @@ -65,6 +77,8 @@ public static ConnectorConfig forTestDatabase(String participantId, TestDatabase ConfigProps.MY_EDC_MAINTAINER_NAME, "Maintainer Name %s".formatted(participantId) )); + propertiesInput.putAll(overrides); + var properties = ConfigService.applyDefaults(propertiesInput, ConfigProps.ALL_CE_PROPS); return ConnectorConfig.builder()