From 20f1c036a759c93754227d99ee7b38f976c29944 Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Mon, 4 Dec 2023 15:53:26 +0100 Subject: [PATCH] refactor: avoid unnecessary meta model dependency injection --- .../conventions/DefaultDependencyConvention.java | 12 ++++-------- .../plugins/edcbuild/extensions/BuildExtension.java | 1 - .../edcbuild/extensions/VersionsExtension.java | 1 + 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/conventions/DefaultDependencyConvention.java b/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/conventions/DefaultDependencyConvention.java index fc159119..8814a1ce 100644 --- a/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/conventions/DefaultDependencyConvention.java +++ b/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/conventions/DefaultDependencyConvention.java @@ -37,13 +37,11 @@ */ class DefaultDependencyConvention implements EdcConvention { - private static final String EDC_GROUP_ID = "org.eclipse.edc"; private static final String DEFAULT_JETBRAINS_ANNOTATION_VERSION = "24.0.1"; - private static final String DEFAULT_JACKSON_VERSION = "2.14.2"; - private static final String DEFAULT_METAMODEL_VERSION = "0.4.2-SNAPSHOT"; - private static final String DEFAULT_MOCKITO_VERSION = "5.2.0"; - private static final String DEFAULT_ASSERTJ_VERSION = "3.23.1"; - private static final String DEFAULT_JUPITER_VERSION = "5.9.2"; + private static final String DEFAULT_JACKSON_VERSION = "2.16.0"; + private static final String DEFAULT_MOCKITO_VERSION = "5.8.0"; + private static final String DEFAULT_ASSERTJ_VERSION = "3.24.2"; + private static final String DEFAULT_JUPITER_VERSION = "5.10.1"; @Override public void apply(Project target) { @@ -56,7 +54,6 @@ public void apply(Project target) { // classpath dependencies var jetbrainsAnnotationVersion = ext.getJetbrainsAnnotation().getOrElse(catalogReader.versionFor("jetbrainsAnnotation", DEFAULT_JETBRAINS_ANNOTATION_VERSION)); var jacksonVersion = ext.getJackson().getOrElse(catalogReader.versionFor("jackson", DEFAULT_JACKSON_VERSION)); - var metamodelVersion = ext.getMetaModel().getOrElse(DEFAULT_METAMODEL_VERSION); d.add(API_CONFIGURATION_NAME, format("org.jetbrains:annotations:%s", jetbrainsAnnotationVersion)); d.add(API_CONFIGURATION_NAME, format("com.fasterxml.jackson.core:jackson-core:%s", jacksonVersion)); d.add(API_CONFIGURATION_NAME, format("com.fasterxml.jackson.core:jackson-annotations:%s", jacksonVersion)); @@ -66,7 +63,6 @@ public void apply(Project target) { d.add(JavaPlugin.RUNTIME_ONLY_CONFIGURATION_NAME, format("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:%s", jacksonVersion)); } d.add(API_CONFIGURATION_NAME, format("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:%s", jacksonVersion)); - d.add(API_CONFIGURATION_NAME, format("%s:runtime-metamodel:%s", EDC_GROUP_ID, metamodelVersion)); //test classpath dependencies var jupiterVersion = ext.getJupiter().getOrElse(catalogReader.versionFor("jupiter", DEFAULT_JUPITER_VERSION)); diff --git a/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/BuildExtension.java b/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/BuildExtension.java index 690a1aa8..9c2e0700 100644 --- a/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/BuildExtension.java +++ b/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/BuildExtension.java @@ -34,7 +34,6 @@ public BuildExtension(ObjectFactory objectFactory) { swagger = objectFactory.newInstance(SwaggerGeneratorExtension.class); } - public void versions(Action action) { action.execute(versions); } diff --git a/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/VersionsExtension.java b/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/VersionsExtension.java index 226859f2..50485a77 100644 --- a/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/VersionsExtension.java +++ b/plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/extensions/VersionsExtension.java @@ -25,6 +25,7 @@ public abstract class VersionsExtension { public abstract Property getJackson(); + @Deprecated(since = "0.4.1") public abstract Property getMetaModel(); public abstract Property getJupiter();