[MARTIFACT-24] document check-buildplan goal
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 8b527dd..f1ff625 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -32,11 +32,13 @@
 
 * Goals Overview
 
-  The Artifact Plugin only has two goals currently:
+  The Artifact Plugin only has 3 goals currently:
 
   * {{{./buildinfo-mojo.html}artifact:buildinfo}} records current build results in {{{https://reproducible-builds.org/docs/jvm/}Reproducible Builds buildinfo}} file,
 
-  * {{{./compare-mojo.html}artifact:compare}} compares current build output against reference build previously published.
+  * {{{./compare-mojo.html}artifact:compare}} compares current build output against reference build previously published,
+
+  * {{{./check-buildplan-mojo.html}artifact:check-buildplan}} checks the project's buildplan to find if any used {{{./plugin-issues.html}plugin has a known Reproducible Builds issue}}.
 
 * Usage
 
diff --git a/src/site/apt/plugin-issues.apt b/src/site/apt/plugin-issues.apt
new file mode 100644
index 0000000..b19b016
--- /dev/null
+++ b/src/site/apt/plugin-issues.apt
@@ -0,0 +1,88 @@
+ ------
+ artifact:check-buildplan
+ ------
+ Hervé Boutemy
+ ------
+ 2022-04-02
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Usage
+
+  <<<mvn artifact:check-buildplan>>> detects prerequisites or issues with following plugins:
+
+~~ content generated by NotReproduciblePluginsDocumentationTest
+*---------+-------------------------------------------------------------------+-------+--------------+
+|  | <<plugin>>                                                 | <<minimum version>> | <<comments>>
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-archetype-plugin/}maven-archetype-plugin}} | 3.2.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-assembly-plugin/}maven-assembly-plugin}} | 3.2.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-jar-plugin/}maven-jar-plugin}} | 3.2.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-ejb-plugin/}maven-ejb-plugin}} | 3.1.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-plugin-plugin/}maven-plugin-plugin}} | 3.5.1 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-remote-resources-plugin/}maven-remote-resources-plugin}} | 1.7.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-shade-plugin/}maven-shade-plugin}} | 3.2.3 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-source-plugin/}maven-source-plugin}} | 3.2.1 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-war-plugin/}maven-war-plugin}} | 3.3.1 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-ear-plugin/}maven-ear-plugin}} | 3.1.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-rar-plugin/}maven-rar-plugin}} | 3.0.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.maven.plugins | {{{/plugins/maven-acr-plugin/}maven-acr-plugin}} | 3.2.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.antlr | antlr3-maven-plugin | - | no fixed release available, see {{{https://github.com/antlr/antlr3/pull/195}reference}}
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.felix | maven-bundle-plugin | 5.1.4 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.karaf.tooling | karaf-maven-plugin | - | no fixed release available, see {{{https://issues.apache.org/jira/browse/KARAF-7367}reference}}
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.nifi | nifi-nar-maven-plugin | 1.3.4 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.apache.servicemix.tooling | depends-maven-plugin | - | no fixed release available, see {{{https://issues.apache.org/jira/browse/SM-5021}reference}}
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.codehaus.plexus | plexus-component-metadata | 2.1.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.codehaus.mojo | jaxb2-maven-plugin | - | no fixed release available, see {{{https://github.com/mojohaus/jaxb2-maven-plugin}reference}}
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.codehaus.mojo | properties-maven-plugin | 1.1.0 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.codehaus.mojo | flatten-maven-plugin | - | no fixed release available, see {{{https://github.com/mojohaus/flatten-maven-plugin/issues/256}reference}}
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.eclipse.sisu | sisu-maven-plugin | 0.3.4 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.eclipse.jetty | jetty-jspc-maven-plugin | - | no fixed release available, see {{{https://github.com/eclipse/jetty.project/}reference}}
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.springframework.boot | springboot-maven-plugin | 2.3.0-M4 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.vafer | jdeb | 1.10 | 
+*--------+--------------------------------------------------------------------+-------+--------------+
+| org.jboss.jandex | jandex-maven-plugin | - | no fixed release available, see {{{https://github.com/wildfly/jandex-maven-plugin/pull/35}reference}}
+*----------+------------------------------------------------------------------+-------+--------------+
diff --git a/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java b/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java
new file mode 100644
index 0000000..b481fef
--- /dev/null
+++ b/src/test/java/org/apache/maven/plugins/artifact/buildinfo/NotReproduciblePluginsDocumentationTest.java
@@ -0,0 +1,88 @@
+package org.apache.maven.plugins.artifact.buildinfo;
+
+/*
+ * 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 org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Test class to update src/site/apt/plugin-issues.apt with content extracted from
+ * src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties
+ */
+public class NotReproduciblePluginsDocumentationTest
+{
+    private static final String LS = System.lineSeparator();
+    private static final String DELIMITER = "~~ content generated by NotReproduciblePluginsDocumentationTest";
+
+    public void testBasic() throws IOException
+    {
+        File pluginIssuesApt = new File( "src/site/apt/plugin-issues.apt" );
+        String content = FileUtils.fileRead( pluginIssuesApt, "UTF-8" );
+        content = content.substring( 0, content.indexOf( DELIMITER ) + DELIMITER.length() );
+
+        StringBuilder sb = new StringBuilder( content );
+        sb.append( LS );
+        sb.append( "*---------+-------------------------------------------------------------------+-------+--------------+" + LS );
+        sb.append( "|  | <<plugin>>                                                 | <<minimum version>> | <<comments>>" );
+        String groupId = null;
+        for ( String line : FileUtils.loadFile( new File( "src/main/resources/org/apache/maven/plugins/artifact/buildinfo/not-reproducible-plugins.properties" ) ) )
+        {
+            if ( !line.startsWith( "#" ) )
+            {
+                sb.append( LS + "*--------+--------------------------------------------------------------------+-------+--------------+" + LS );
+                int index = line.indexOf( '=' );
+                String plugin = line.substring( 0, index );
+                String status = line.substring( index + 1 );
+
+                index = plugin.indexOf( '+' );
+                if ( index < 0 )
+                {
+                    groupId = "org.apache.maven.plugins";
+                    sb.append( "| org.apache.maven.plugins | {{{/plugins/" + plugin + "/}" + plugin + "}} " );
+                }
+                else
+                {
+                    groupId = plugin.substring( 0, index );
+                    plugin = plugin.substring( index + 1 );
+                    sb.append( "| " + groupId + " | " + plugin + " " );
+                }
+                if ( status.startsWith( "fail:" ) )
+                {
+                    sb.append( "| - | no fixed release available, see {{{" + status.substring( 5 ) + "}reference}}" );
+                }
+                else
+                {
+                    sb.append( "| " + status + " | ");
+                }
+                continue;
+            }
+            if ( groupId == null )
+            {
+                continue;
+            }
+            sb.append( line.substring( 1 ) );
+        }
+        sb.append( LS + "*----------+------------------------------------------------------------------+-------+--------------+" + LS );
+
+        FileUtils.fileWrite( pluginIssuesApt, "UTF-8", sb.toString() );
+    }
+}