You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/12/11 22:39:23 UTC
[maven-invoker-plugin] 01/01: [MINVOKER-315] Upgrade Maven Reporting API to 3.1.1/Maven Reporting Impl to 3.2.0
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MINVOKER-315
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git
commit 8f50dc457d09adb22663b44e4336b7836ff828a8
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Dec 11 23:37:38 2022 +0100
[MINVOKER-315] Upgrade Maven Reporting API to 3.1.1/Maven Reporting Impl to 3.2.0
This closes #155
---
pom.xml | 34 ++++++++++++++++-
.../maven/plugins/invoker/InvokerReport.java | 43 +++-------------------
2 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/pom.xml b/pom.xml
index 6139892..e266cf1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,11 +143,23 @@ under the License.
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings-builder</artifactId>
+ <version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- shared -->
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ <version>3.1.1</version>
+ </dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
- <version>3.1.0</version>
+ <version>3.2.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
@@ -156,6 +168,13 @@ under the License.
</exclusions>
</dependency>
+ <!-- doxia -->
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-sink-api</artifactId>
+ <version>1.11.1</version>
+ </dependency>
+
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
@@ -213,6 +232,17 @@ under the License.
<artifactId>plexus-interpolation</artifactId>
<version>1.26</version>
</dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-i18n</artifactId>
+ <version>1.0-beta-10</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-component-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
@@ -357,7 +387,7 @@ under the License.
<profile>
<id>run-its</id>
<properties>
- <sitePluginVersion>3.7.1</sitePluginVersion>
+ <sitePluginVersion>3.12.1</sitePluginVersion>
</properties>
<build>
<pluginManagement>
diff --git a/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java b/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java
index 316a6f4..71fff65 100644
--- a/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java
+++ b/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java
@@ -30,13 +30,11 @@ import java.util.List;
import java.util.Locale;
import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.plugins.invoker.model.BuildJob;
import org.apache.maven.plugins.invoker.model.io.xpp3.BuildJobXpp3Reader;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
import org.apache.maven.reporting.MavenReportException;
import org.codehaus.plexus.i18n.I18N;
@@ -58,32 +56,12 @@ public class InvokerReport
extends AbstractMavenReport
{
- /**
- * The Maven Project.
- */
- @Parameter( defaultValue = "${project}", readonly = true, required = true )
- protected MavenProject project;
-
- /**
- * Doxia Site Renderer component.
- */
- @Component
- protected Renderer siteRenderer;
-
/**
* Internationalization component.
*/
@Component
protected I18N i18n;
- /**
- * The output directory for the report. Note that this parameter is only evaluated if the goal is run directly from
- * the command line. If the goal is run indirectly as part of a site generation, the output directory configured in
- * the Maven Site Plugin is used instead.
- */
- @Parameter( defaultValue = "${project.reporting.outputDirectory}", required = true )
- protected File outputDirectory;
-
/**
* Base directory where all build reports have been written to.
*/
@@ -185,6 +163,7 @@ public class InvokerReport
// detail tests table header
sink.table();
+ sink.tableRows( null, false );
sink.tableRow();
// -------------------------------------------
@@ -202,6 +181,7 @@ public class InvokerReport
renderBuildJob( buildJob );
}
+ sink.tableRows_();
sink.table_();
sink.body_();
@@ -228,6 +208,8 @@ public class InvokerReport
// ------------------------------------------------------------------------
sink.table();
+ sink.tableRows( null, false );
+
sink.tableRow();
sinkTableHeader( sink, getText( locale, "report.invoker.summary.number" ) );
@@ -283,6 +265,8 @@ public class InvokerReport
sinkCell( sink, secondsFormat.format( totalTime / number ) );
sink.tableRow_();
+
+ sink.tableRows_();
sink.table_();
}
@@ -337,21 +321,6 @@ public class InvokerReport
return nameAndDescriptionFormat.format( new Object[] { name, description } );
}
- protected String getOutputDirectory()
- {
- return outputDirectory.getAbsolutePath();
- }
-
- protected MavenProject getProject()
- {
- return project;
- }
-
- protected Renderer getSiteRenderer()
- {
- return siteRenderer;
- }
-
public String getDescription( Locale locale )
{
return getText( locale, "report.invoker.result.description" );