[
https://issues.apache.org/jira/browse/MPLUGIN-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616658#comment-17616658
]
ASF GitHub Bot commented on MPLUGIN-423:
----------------------------------------
michael-o commented on code in PR #147:
URL: https://github.com/apache/maven-plugin-tools/pull/147#discussion_r993794117
##########
maven-plugin-report-plugin/src/it/mplugin-394_report-encoding/invoker.properties:
##########
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals = clean plugin:report
+invoker.goals = -Dfile.encoding=CP1252 site
Review Comment:
@slawekjaranowski This is the stuff I have told you about...
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java:
##########
@@ -226,6 +228,10 @@ public boolean canGenerateReport()
protected void executeReport( Locale locale )
throws MavenReportException
{
+ getLog().warn( "The report of the maven-plugin-plugin is deprecated,
please use "
+ + "the report from the maven-plugin-report-plugin instead.
This plugin will be removed "
+ + "in version 4.0.0." );
+
Review Comment:
Important: The plugin is *not* removed, but just the report goal. Therfore:
"report goal", "plugin goal"
##########
maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java:
##########
@@ -0,0 +1,792 @@
+package org.apache.maven.plugin.plugin.report;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import
org.apache.maven.plugins.plugin.descriptor.MNG6109PluginDescriptorBuilder;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.AbstractMavenReportRenderer;
+import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.rtinfo.RuntimeInformation;
+import org.apache.maven.tools.plugin.DefaultPluginToolsRequest;
+import org.apache.maven.tools.plugin.PluginToolsRequest;
+import org.apache.maven.tools.plugin.generator.GeneratorException;
+import org.apache.maven.tools.plugin.generator.GeneratorUtils;
+import org.apache.maven.tools.plugin.generator.PluginXdocGenerator;
+import org.apache.maven.tools.plugin.util.PluginUtils;
+import org.codehaus.plexus.configuration.PlexusConfigurationException;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.XmlStreamReader;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+
+/**
+ * Generates the Plugin's documentation report: <code>plugin-info.html</code>
plugin overview page,
+ * and one <code><i>goal</i>-mojo.html</code> per goal.
+ *
+ * @author <a href="[email protected]">Stephane Nicoll</a>
+ * @author <a href="mailto:[email protected]">Vincent Siveton</a>
+ * @since 2.0
+ */
+@Mojo( name = "report", threadSafe = true )
+@Execute( phase = LifecyclePhase.PROCESS_CLASSES )
+public class PluginReport
+ extends AbstractMavenReport
+{
+ /**
+ * Report output directory for mojos' documentation.
+ */
+ @Parameter( defaultValue =
"${project.build.directory}/generated-site/xdoc" )
+ private File outputDirectory;
+
+ /**
+ * The file encoding of the source files.
+ *
+ * @deprecated not used in report, will be removed in the next major
version
+ *
+ * @since 2.7
+ */
+ @Deprecated
+ @Parameter( property = "encoding", defaultValue =
"${project.build.sourceEncoding}" )
+ private String encoding;
+
+ /**
+ * Specify some requirements to execute this plugin.
+ * Example:
+ * <pre>
+ * <requirements>
+ * <maven>2.0</maven>
+ * <jdk>1.4</jdk>
+ * <memory>256m</memory>
+ * <diskSpace>1m</diskSpace>
+ * <others>
+ * <property>
+ * <name>SVN</name>
+ * <value>1.4.6</value>
+ * </property>
+ * </others>
+ * </requirements>
+ * </pre>
+ * <p>
+ * If not is specified, Maven requirement is extracted from
+ * <code><project><prerequisites><maven></code>
+ * and JDK requirement is extracted from maven-compiler-plugin
configuration.
+ *
+ * @deprecated will be removed in the next major version, please don't use
+ */
+ @Deprecated
+ @Parameter
+ private Requirements requirements;
+
+ /**
+ * <p>
+ * The goal prefix that will appear before the ":".
+ * By default, this plugin applies a heuristic to derive a heuristic from
+ * the plugin's artifactId.
+ * </p>
+ * <p>
+ * It removes any occurrences of the regular expression
<strong>-?maven-?</strong>,
+ * and then removes any occurrences of <strong>-?plugin-?</strong>.
+ * </p>
+ * <p>
+ * For example, horsefeature-maven-plugin becomes horsefeature.
+ * </p>
+ * <p>
+ * (There is a special case for maven-plugin-plugin: it is mapped to
'plugin')
+ * </p>
+ *
+ * @deprecated not used in report, will be removed in the next major
version
+ *
+ * @since 2.4
+ */
+ @Deprecated
+ @Parameter( property = "goalPrefix" )
+ protected String goalPrefix;
+
+ /**
+ * Set this to "true" to skip invoking any goals or reports of the plugin.
+ *
+ * @since 2.8
+ */
+ @Parameter( defaultValue = "false", property = "maven.plugin.skip" )
+ private boolean skip;
+
+ /**
+ * Set this to "true" to skip generating the report.
+ *
+ * @since 2.8
+ */
+ @Parameter( defaultValue = "false", property = "maven.plugin.report.skip" )
+ private boolean skipReport;
Review Comment:
Shouldn't both params be merged into `skip` with `maven.plugin.report.skip`
in the future? WDYT?
> Extract plugin report into its own plugin
> -----------------------------------------
>
> Key: MPLUGIN-423
> URL: https://issues.apache.org/jira/browse/MPLUGIN-423
> Project: Maven Plugin Tools
> Issue Type: Task
> Reporter: Guillaume Nodet
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)