This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch doxia-2.0.0 in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
commit 80841baeaceb458ec2ffc901757bd06e09868c54 Author: Michael Osipov <micha...@apache.org> AuthorDate: Sat Dec 3 02:13:19 2022 +0100 Prepare for Doxia 2.0.0 --- pom.xml | 16 ++++++++++++++-- .../analyze-testDependencyWithNonTestScope/verify.bsh | 4 ++-- .../maven/plugins/dependency/DisplayAncestorsMojo.java | 11 ++--------- .../plugins/dependency/analyze/AnalyzeReportView.java | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 1bf90c37..209a628a 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ under the License. </parent> <artifactId>maven-dependency-plugin</artifactId> - <version>3.5.1-SNAPSHOT</version> + <version>4.0.0-M1-SNAPSHOT</version> <packaging>maven-plugin</packaging> <name>Apache Maven Dependency Plugin</name> @@ -159,11 +159,23 @@ under the License. <scope>provided</scope> </dependency> + <!-- doxia --> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-sink-api</artifactId> + <version>2.0.0-M5</version> + </dependency> + <!-- reporting --> + <dependency> + <groupId>org.apache.maven.reporting</groupId> + <artifactId>maven-reporting-api</artifactId> + <version>4.0.0-M4</version> + </dependency> <dependency> <groupId>org.apache.maven.reporting</groupId> <artifactId>maven-reporting-impl</artifactId> - <version>3.2.0</version> + <version>4.0.0-M4</version> </dependency> <dependency> <groupId>commons-io</groupId> diff --git a/src/it/projects/analyze-testDependencyWithNonTestScope/verify.bsh b/src/it/projects/analyze-testDependencyWithNonTestScope/verify.bsh index ba623ba7..c5c7993f 100644 --- a/src/it/projects/analyze-testDependencyWithNonTestScope/verify.bsh +++ b/src/it/projects/analyze-testDependencyWithNonTestScope/verify.bsh @@ -37,7 +37,7 @@ if ( htmlFile.length() == 0 ) Document doc = Jsoup.parse( htmlFile, "UTF-8"); -Elements entry = doc.select( "#contentBox > section > section:nth-child(5) > table > tbody > tr.b" ); +Elements entry = doc.select( "#bodyColumn > section > section:nth-child(5) > table > tbody > tr.b" ); if( entry.isEmpty() ) { @@ -50,7 +50,7 @@ else if ( entry.size() != 1 ) } Element groupIdElement = doc.select( -"#contentBox > section > section:nth-child(5) > table > tbody > tr.b > td:nth-child(1)" ).first(); +"#bodyColumn > section > section:nth-child(5) > table > tbody > tr.b > td:nth-child(1)" ).first(); String groupId = groupIdElement.text(); diff --git a/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java b/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java index 248bef79..81e94c73 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java @@ -20,7 +20,6 @@ package org.apache.maven.plugins.dependency; import java.util.ArrayList; import java.util.List; -import java.util.Locale; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; @@ -61,14 +60,8 @@ public class DisplayAncestorsMojo extends AbstractMojo { MavenProject currentAncestor = project.getParent(); while (currentAncestor != null) { - final String gav = String.format( - Locale.US, - "%s:%s:%s", - currentAncestor.getGroupId(), - currentAncestor.getArtifactId(), - currentAncestor.getVersion()); - - ancestors.add(gav); + ancestors.add(currentAncestor.getGroupId() + ":" + currentAncestor.getArtifactId() + ":" + + currentAncestor.getVersion()); currentAncestor = currentAncestor.getParent(); } diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java index c36cb4e3..d83793c7 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java +++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AnalyzeReportView.java @@ -129,7 +129,7 @@ public class AnalyzeReportView { */ public void generateDependenciesTable(Sink sink, Iterator<Artifact> iter) { sink.table(); - sink.tableRows(null, false); + sink.tableRows(); sink.tableRow(); sink.tableCell();