From 22f01b8b85a309dfa2d32ab046e6c436b7731245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Mon, 12 Feb 2024 01:15:58 +0100 Subject: [PATCH] updates and fixes --- api/pom.xml | 5 +++++ java/impl/pom.xml | 1 + ...ndedContextWithMavenAndSourceCodeTest.java | 2 +- java/maven/pom.xml | 5 ----- .../java/maven/impl/MavenBridgeImplTest.java | 11 +++++----- pom.xml | 20 ++++++++++--------- 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 176b487..529c0d6 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -22,6 +22,11 @@ org.slf4j slf4j-api + + org.mockito + mockito-junit-jupiter + test + diff --git a/java/impl/pom.xml b/java/impl/pom.xml index 7905dd5..249b6ae 100644 --- a/java/impl/pom.xml +++ b/java/impl/pom.xml @@ -64,6 +64,7 @@ mvn ${maven.test.path} + -X install diff --git a/java/impl/src/test/java/io/github/mmm/code/impl/java/JavaExtendedContextWithMavenAndSourceCodeTest.java b/java/impl/src/test/java/io/github/mmm/code/impl/java/JavaExtendedContextWithMavenAndSourceCodeTest.java index 2723bba..0d869fd 100644 --- a/java/impl/src/test/java/io/github/mmm/code/impl/java/JavaExtendedContextWithMavenAndSourceCodeTest.java +++ b/java/impl/src/test/java/io/github/mmm/code/impl/java/JavaExtendedContextWithMavenAndSourceCodeTest.java @@ -61,7 +61,7 @@ public void testBasics() { assertThat(source.getSource()).isSameAs(source); List dependencies = source.getDependencies().getDeclared(); - assertThat(dependencies).hasSize(5); + assertThat(dependencies).hasSize(4); CodeSource compileDependency = dependencies.get(0); verifyDependency(compileDependency, "target/classes", "src/main/java", "compile"); assertThat(source.getParent()).isSameAs(compileDependency); diff --git a/java/maven/pom.xml b/java/maven/pom.xml index 9211efd..9f5e874 100644 --- a/java/maven/pom.xml +++ b/java/maven/pom.xml @@ -13,15 +13,10 @@ ${project.artifactId} Integration with Maven. - - 3.6.1 - - org.apache.maven maven-core - ${maven.version} ${project.groupId} diff --git a/java/maven/src/test/java/io/github/mmm/code/java/maven/impl/MavenBridgeImplTest.java b/java/maven/src/test/java/io/github/mmm/code/java/maven/impl/MavenBridgeImplTest.java index 3ad7fc5..e63fb96 100644 --- a/java/maven/src/test/java/io/github/mmm/code/java/maven/impl/MavenBridgeImplTest.java +++ b/java/maven/src/test/java/io/github/mmm/code/java/maven/impl/MavenBridgeImplTest.java @@ -50,7 +50,7 @@ public void testReadModel() { assertThat(model.getParent().getGroupId()).isEqualTo(groupId); assertThat(model.getParent().getVersion()).isEqualTo("${revision}"); verifyDependencies(model, DependencyHelper.create(PROJECT_GROUP_ID, "mmm-code-base", null), - DependencyHelper.create("org.apache.maven", "maven-core", "${maven.version}")); + DependencyHelper.create("org.apache.maven", "maven-core", null)); } /** @@ -89,11 +89,10 @@ public void testReadProject() { assertThat(model.getGroupId()).isEqualTo(groupId); assertThat(model.getVersion()).matches(VERSION_PATTERN); verifyDependencies(model, DependencyHelper.create(groupId, "mmm-code-base", "*"), - DependencyHelper.create("org.apache.maven", "maven-core", "3.6.1"), - DependencyHelper.create("org.assertj", "assertj-core", "3.24.2", SCOPE_TEST), - DependencyHelper.create("org.junit.jupiter", "junit-jupiter", "5.9.3", SCOPE_TEST), - DependencyHelper.create("org.mockito", "mockito-junit-jupiter", "4.9.0", SCOPE_TEST), - DependencyHelper.create("ch.qos.logback", "logback-classic", "1.4.5", SCOPE_TEST)); + DependencyHelper.create("org.apache.maven", "maven-core", "3.9.6"), + DependencyHelper.create("org.assertj", "assertj-core", "3.25.3", SCOPE_TEST), + DependencyHelper.create("org.junit.jupiter", "junit-jupiter", "5.10.2", SCOPE_TEST), + DependencyHelper.create("ch.qos.logback", "logback-classic", "1.4.14", SCOPE_TEST)); } private void verifyDependencies(Model model, Dependency... dependencies) { diff --git a/pom.xml b/pom.xml index 46fadfc..b85474a 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ 17 code + 3.9.6 @@ -24,14 +25,6 @@ java - - - org.mockito - mockito-junit-jupiter - 4.9.0 - test - - @@ -42,7 +35,16 @@ pom import - + + org.apache.maven + maven-core + ${maven.version} + + + org.mockito + mockito-junit-jupiter + 5.10.0 + ${project.groupId}