[ 
https://issues.apache.org/jira/browse/MPLUGIN-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616680#comment-17616680
 ] 

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_r993869171


##########
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="snic...@apache.org">Stephane Nicoll</a>
+ * @author <a href="mailto:vincent.sive...@gmail.com";>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>
+     * &lt;requirements&gt;
+     *   &lt;maven&gt;2.0&lt;/maven&gt;
+     *   &lt;jdk&gt;1.4&lt;/jdk&gt;
+     *   &lt;memory&gt;256m&lt;/memory&gt;
+     *   &lt;diskSpace&gt;1m&lt;/diskSpace&gt;
+     *   &lt;others&gt;
+     *     &lt;property&gt;
+     *       &lt;name&gt;SVN&lt;/name&gt;
+     *       &lt;value&gt;1.4.6&lt;/value&gt;
+     *     &lt;/property&gt;
+     *   &lt;/others&gt;
+     * &lt;/requirements&gt;
+     * </pre>
+     * <p>
+     * If not is specified, Maven requirement is extracted from
+     * <code>&lt;project&gt;&lt;prerequisites&gt;&lt;maven&gt;</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:
   I would do this the other way around and use the same param name as with 
other plugins: `skip` with property `maven.plugin.report.skip`





> 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)

Reply via email to