diff --git a/README.md b/README.md index 5017e4221d..218b11cf6e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ --> | Release | Maven Central | Release Notes | Users Guide | |-----------------| --------------------------------------------------- | ----------------------------------------------------------------: | -------------------------------------------------------------: | -| 0.13.0 | [![Maven Central][shield-central]][central-search] | [![PDF][stable-pdf-releasenotes]][releasenotes-pdf] | [![PDF][stable-pdf-usersguide]][usersguide-pdf] | +| 0.13.1 | [![Maven Central][shield-central]][central-search] | [![PDF][stable-pdf-releasenotes]][releasenotes-pdf] | [![PDF][stable-pdf-usersguide]][usersguide-pdf] | | | | [![HTML][stable-html-release]][releasenotes-html] | [![HTML][stable-html-usersgude]][usersguide-html] | | 0.14.0-SNAPSHOT | ![Maven Central][not-available-in-central] | [![PDF][unstable-pdf-releasenotes]][unstable-releasenotes-pdf] | [![PDF][unstable-pdf-usersguide]][unstable-usersguide-pdf] | | | | [![HTML][unstable-html-releasenotes]][unstable-releasenotes-html] | [![HTML][unstable-html-usersguide]][unstable-usersguide-html] | @@ -81,13 +81,13 @@ The first thing before you can run integration tests is to add the following dep com.soebes.itf.jupiter.extension itf-jupiter-extension - 0.13.0 + 0.13.1 test com.soebes.itf.jupiter.extension itf-assertj - 0.13.0 + 0.13.1 test @@ -113,7 +113,7 @@ which handles the first part which is involved: com.soebes.itf.jupiter.extension itf-maven-plugin - 0.13.0 + 0.13.1 installing @@ -344,10 +344,10 @@ mvn clean verify org.jacoco:jacoco-maven-plugin:report [unstable-releasenotes-html]: https://khmarbaise.github.io/maven-it-extension/snapshot/itf-documentation/release-notes/release-notes.html [unstable-releasenotes-pdf]: https://khmarbaise.github.io/maven-it-extension/snapshot/itf-documentation/release-notes/release-notes.pdf -[stable-html-release]: https://img.shields.io/badge/0.13.0-HTML--Releasenotes-green -[stable-html-usersgude]: https://img.shields.io/badge/0.13.0-HTML--Usersguide-green -[stable-pdf-releasenotes]: https://img.shields.io/badge/0.13.0-PDF--Releasenotes-green -[stable-pdf-usersguide]: https://img.shields.io/badge/0.13.0-PDF--Usersguide-green +[stable-html-release]: https://img.shields.io/badge/0.13.1-HTML--Releasenotes-green +[stable-html-usersgude]: https://img.shields.io/badge/0.13.1-HTML--Usersguide-green +[stable-pdf-releasenotes]: https://img.shields.io/badge/0.13.1-PDF--Releasenotes-green +[stable-pdf-usersguide]: https://img.shields.io/badge/0.13.1-PDF--Usersguide-green [unstable-pdf-releasenotes]: https://img.shields.io/badge/0.14.0--SNAPSHOT-PDF--Releasenotes-orange [unstable-html-releasenotes]: https://img.shields.io/badge/0.14.0--SNAPSHOT-HTML--Releasenotes-orange diff --git a/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.13.1.adoc b/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.13.1.adoc new file mode 100644 index 0000000000..a4efcd65f0 --- /dev/null +++ b/itf-documentation/src/main/asciidoc/release-notes/_release-notes-0.13.1.adoc @@ -0,0 +1,38 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +[[release-notes-0.13.1]] +== Pre-release 0.13.1 + +:issue-445: https://github.com/khmarbaise/maven-it-extension/issues/445[Fixed #445] + +:release_0_13_1: https://github.com/khmarbaise/maven-it-extension/milestone/16 + +*Date of Release:* December 29, 2023 + +*Breaking Changes* + * A change in 0.13.0 broke the compatibility with Maven before version 3.9.0. + + * {issue-445} - itf-maven-plugin:0.13.0:install fails due to missing class ArtifactIdUtils + ** Restored compatibility with Maven before 3.9.0 + +*Reporter of this release* + + * https://github.com/acanda[Philip Graf] + ** {issue-445} - itf-maven-plugin:0.13.0:install fails due to missing class ArtifactIdUtils + +The full release notes can be found here {release_0_13_1}[Release 0.13.1]. diff --git a/itf-documentation/src/main/asciidoc/release-notes/release-notes.adoc b/itf-documentation/src/main/asciidoc/release-notes/release-notes.adoc index 641d063e25..46ca6b77d1 100644 --- a/itf-documentation/src/main/asciidoc/release-notes/release-notes.adoc +++ b/itf-documentation/src/main/asciidoc/release-notes/release-notes.adoc @@ -31,6 +31,8 @@ overview and detailed instructions how to use the Integration Testing Framework. include::{sourcedir}/_release-notes-0.14.0.adoc[] +include::{sourcedir}/_release-notes-0.13.1.adoc[] + include::{sourcedir}/_release-notes-0.13.0.adoc[] include::{sourcedir}/_release-notes-0.12.0.adoc[] diff --git a/itf-maven-plugin/pom.xml b/itf-maven-plugin/pom.xml index 27a327fdb6..965835b80e 100644 --- a/itf-maven-plugin/pom.xml +++ b/itf-maven-plugin/pom.xml @@ -34,6 +34,8 @@ 3.2.5 + + 1.0.0.v20140518 @@ -42,26 +44,31 @@ + - com.soebes.itf.jupiter.extension - itf-extension-maven - ${project.version} + org.eclipse.aether + aether-api + ${aetherVersion} + provided - org.apache.maven - maven-core - ${mavenMinimumVersion} - provided + org.eclipse.aether + aether-util + ${aetherVersion} + + compile org.apache.maven - maven-model + maven-core ${mavenMinimumVersion} provided org.apache.maven - maven-artifact + maven-model ${mavenMinimumVersion} provided @@ -71,40 +78,27 @@ ${mavenMinimumVersion} provided - - org.apache.maven - maven-aether-provider - ${mavenMinimumVersion} + org.apache.maven.plugin-tools + maven-plugin-annotations + ${maven-plugin-plugin.version} provided - org.codehaus.plexus - plexus-xml - 4.0.3 - provided + com.soebes.itf.jupiter.extension + itf-extension-maven + ${project.version} org.codehaus.plexus - plexus-interpolation - 1.27 + plexus-utils + 3.5.1 org.apache.maven.shared maven-filtering 3.3.1 - - org.apache.maven.shared - maven-shared-utils - 3.4.2 - - - org.apache.maven.plugin-tools - maven-plugin-annotations - ${maven-plugin-plugin.version} - provided - org.junit.jupiter junit-jupiter-engine @@ -157,11 +151,6 @@ - - org.codehaus.plexus - plexus-component-metadata - 2.1.1 - diff --git a/itf-maven-plugin/src/main/java/com/soebes/itf/maven/plugin/InstallMojo.java b/itf-maven-plugin/src/main/java/com/soebes/itf/maven/plugin/InstallMojo.java index e7532c3d1f..ea620534bf 100644 --- a/itf-maven-plugin/src/main/java/com/soebes/itf/maven/plugin/InstallMojo.java +++ b/itf-maven-plugin/src/main/java/com/soebes/itf/maven/plugin/InstallMojo.java @@ -20,7 +20,6 @@ */ import org.apache.maven.RepositoryUtils; -import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.execution.MavenSession; import org.apache.maven.model.DependencyManagement; import org.apache.maven.model.Model; @@ -103,19 +102,13 @@ public class InstallMojo extends AbstractMojo { @Parameter(defaultValue = "${reactorProjects}", readonly = true) private Collection reactorProjects; - /** - * - */ - @Parameter(property = "localRepository", required = true, readonly = true) - private ArtifactRepository localRepository; - @Parameter(defaultValue = "runtime") private String scope; public void execute() throws MojoExecutionException, MojoFailureException { createTestRepository(); - Map resolvedArtifacts = new LinkedHashMap<>(); + Map resolvedArtifacts = new LinkedHashMap<>(); try { @@ -142,11 +135,11 @@ private void createTestRepository() } } - private void resolveProjectArtifacts(Map resolvedArtifacts) { + private void resolveProjectArtifacts(Map resolvedArtifacts) { // pom packaging doesn't have a main artifact if (project.getArtifact() != null && project.getArtifact().getFile() != null) { - org.eclipse.aether.artifact.Artifact artifact = RepositoryUtils.toArtifact(project.getArtifact()); + Artifact artifact = RepositoryUtils.toArtifact(project.getArtifact()); resolvedArtifacts.put(ArtifactIdUtils.toId(artifact), artifact); } @@ -155,24 +148,24 @@ private void resolveProjectArtifacts(Map resolvedArtifacts.put(ArtifactIdUtils.toId(a), a)); } - private void resolveProjectPoms(MavenProject project, Map resolvedArtifacts) + private void resolveProjectPoms(MavenProject project, Map resolvedArtifacts) throws ArtifactResolutionException { if (project == null) { return; } - org.eclipse.aether.artifact.Artifact projectPom = RepositoryUtils.toArtifact(new ProjectArtifact(project)); + Artifact projectPom = RepositoryUtils.toArtifact(new ProjectArtifact(project)); if (projectPom.getFile() != null) { resolvedArtifacts.put(projectPom.toString(), projectPom); } else { - org.eclipse.aether.artifact.Artifact artifact = resolveArtifact(projectPom, project.getRemoteProjectRepositories()); + Artifact artifact = resolveArtifact(projectPom, project.getRemoteProjectRepositories()); resolvedArtifacts.put(ArtifactIdUtils.toId(artifact), artifact); } resolveProjectPoms(project.getParent(), resolvedArtifacts); } - private void resolveProjectDependencies(Map resolvedArtifacts) + private void resolveProjectDependencies(Map resolvedArtifacts) throws ArtifactResolutionException, MojoExecutionException, DependencyResolutionException { DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(scope); @@ -203,7 +196,7 @@ private void resolveProjectDependencies(Map artifacts = dependencyResult.getArtifactResults().stream() + List artifacts = dependencyResult.getArtifactResults().stream() .map(ArtifactResult::getArtifact) .collect(Collectors.toList()); @@ -212,19 +205,19 @@ private void resolveProjectDependencies(Map artifacts, - Map resolvedArtifacts, + List artifacts, + Map resolvedArtifacts, List remoteRepositories) throws ArtifactResolutionException, MojoExecutionException { - for (org.eclipse.aether.artifact.Artifact a : artifacts) { - org.eclipse.aether.artifact.Artifact artifactResult = resolveArtifact(new SubArtifact(a, "", "pom"), remoteRepositories); + for (Artifact a : artifacts) { + Artifact artifactResult = resolveArtifact(new SubArtifact(a, "", "pom"), remoteRepositories); resolvePomWithParents(artifactResult, resolvedArtifacts, remoteRepositories); } } private void resolvePomWithParents( - org.eclipse.aether.artifact.Artifact artifact, Map resolvedArtifacts, List remoteRepositories) + Artifact artifact, Map resolvedArtifacts, List remoteRepositories) throws MojoExecutionException, ArtifactResolutionException { if (resolvedArtifacts.containsKey(ArtifactIdUtils.toId(artifact))) { @@ -234,16 +227,16 @@ private void resolvePomWithParents( Model model = PomUtils.loadPom(artifact.getFile()); Parent parent = model.getParent(); if (parent != null) { - org.eclipse.aether.artifact.DefaultArtifact pom = + DefaultArtifact pom = new DefaultArtifact(parent.getGroupId(), parent.getArtifactId(), "", "pom", parent.getVersion()); - org.eclipse.aether.artifact.Artifact resolvedPom = resolveArtifact(pom, remoteRepositories); + Artifact resolvedPom = resolveArtifact(pom, remoteRepositories); resolvePomWithParents(resolvedPom, resolvedArtifacts, remoteRepositories); } resolvedArtifacts.put(ArtifactIdUtils.toId(artifact), artifact); } - private org.eclipse.aether.artifact.Artifact resolveArtifact(Artifact artifact, List remoteRepositories) + private Artifact resolveArtifact(Artifact artifact, List remoteRepositories) throws ArtifactResolutionException { ArtifactRequest request = new ArtifactRequest(); @@ -317,7 +310,7 @@ private RepositorySystemSession createSystemSessionForLocalRepo() { newSession.setLocalRepositoryManager(localRepositoryManager); repositorySystemSession = newSession; - getLog().debug("localRepoPath: " + getLog().debug("itfRepositoryPath: " + localRepositoryManager.getRepository().getBasedir()); }