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 2023/02/11 22:37:49 UTC
[maven-plugin-tools] 01/01: Prepare for Doxia 2.0.0
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-plugin-tools.git
commit 7e686743397e0f46853ca6049bd9e73922e1d34a
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Thu Jul 21 18:03:20 2022 +0200
Prepare for Doxia 2.0.0
---
maven-plugin-plugin/pom.xml | 18 -
.../plugin/plugin/report_old/PluginReport.java | 803 ---------------------
.../plugin/plugin/report_old/Requirements.java | 94 ---
.../plugin/report_old/RequirementsHistory.java | 70 --
.../EnhancedPluginDescriptorBuilder.java | 104 ---
.../src/main/resources/plugin-report.properties | 54 --
.../src/main/resources/plugin-report_de.properties | 54 --
.../src/main/resources/plugin-report_en.properties | 23 -
.../src/main/resources/plugin-report_fr.properties | 54 --
.../src/main/resources/plugin-report_sv.properties | 54 --
maven-plugin-report-plugin/pom.xml | 15 +-
.../src/it/mplugin-187/invoker.properties | 6 +-
.../src/it/mplugin-187/pom.xml | 6 +-
.../src/site/site.xml | 30 -
.../src/it/plugin-report-annotations/pom.xml | 2 +-
.../it/plugin-report-with-javadoc-links/pom.xml | 3 -
.../plugin-report-with-javadoc-links/verify.groovy | 4 +-
.../src/it/plugin-report/pom.xml | 5 +-
.../maven/plugin/plugin/report/PluginReport.java | 6 +-
maven-plugin-tools-generators/pom.xml | 3 +-
.../plugin/generator/PluginXdocGenerator.java | 21 +-
pom.xml | 57 +-
22 files changed, 40 insertions(+), 1446 deletions(-)
diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml
index 45ebafcc..48ee0dc7 100644
--- a/maven-plugin-plugin/pom.xml
+++ b/maven-plugin-plugin/pom.xml
@@ -95,16 +95,6 @@
<optional>true</optional>
</dependency>
- <!-- doxia -->
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-sink-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-site-renderer</artifactId>
- </dependency>
-
<!-- Maven -->
<dependency>
<groupId>org.apache.maven</groupId>
@@ -128,12 +118,6 @@
<scope>provided</scope>
</dependency>
- <!-- shared -->
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-impl</artifactId>
- </dependency>
-
<!-- plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -293,8 +277,6 @@
<streamLogsOnFailures>true</streamLogsOnFailures>
<showErrors>true</showErrors>
<filterProperties>
- <sitePluginVersion>3.12.1</sitePluginVersion>
- <projectInfoReportsPlugin>3.4.1</projectInfoReportsPlugin>
<antVersion>${antVersion}</antVersion>
</filterProperties>
<properties>
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/PluginReport.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/PluginReport.java
deleted file mode 100644
index 34f39632..00000000
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/PluginReport.java
+++ /dev/null
@@ -1,803 +0,0 @@
-package org.apache.maven.plugin.plugin.report_old;
-
-/*
- * 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.plugin.plugin.DescriptorGeneratorMojo;
-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_old.EnhancedPluginDescriptorBuilder;
-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.
- * Relies on one output file from {@link DescriptorGeneratorMojo}.
- *
- * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
- * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
- * @since 2.0
- * @deprecated use the maven-plugin-report-plugin instead
- */
-@Deprecated
-@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.
- *
- * @deprecated use {@link #skip} parameter instead
- *
- * @since 2.8
- */
- @Deprecated
- @Parameter( defaultValue = "false", property = "maven.plugin.skip" )
- private boolean skipReport;
-
- /**
- * Set this to "true" to skip generating the report.
- *
- * @since 2.8
- */
- @Parameter( defaultValue = "false", property = "maven.plugin.report.skip" )
- private boolean skip;
-
- /**
- * Set this to "true" to generate the usage section for "plugin-info.html" with
- * {@code <extensions>true</extensions>}.
- *
- * @since 3.7.0
- */
- @Parameter( defaultValue = "false", property = "maven.plugin.report.hasExtensionsToLoad" )
- private boolean hasExtensionsToLoad;
-
- /**
- * The Plugin requirements history list.
- * <p>
- * Can be specified as list of <code>requirementsHistory</code>:
- *
- * <pre>
- * <requirementsHistories>
- * <requirementsHistory>
- * <version>plugin version</version>
- * <maven>maven version</maven>
- * <jdk>jdk version</jdk>
- * </requirementsHistory>
- * </requirementsHistories>
- * </pre>
- *
- * @since 3.7.0
- */
- @Parameter
- private List<RequirementsHistory> requirementsHistories = new ArrayList<>();
-
- /**
- * @since 3.5.1
- */
- @Component
- private RuntimeInformation rtInfo;
-
- /**
- * Path to {@code plugin.xml} plugin descriptor to generate the report from.
- *
- * @since 3.5.1
- * @deprecated No longer evaluated, use {@link #enhancedPluginXmlFile}.
- */
- @Parameter( defaultValue = "${project.build.outputDirectory}/META-INF/maven/plugin.xml", required = true,
- readonly = true )
- @Deprecated
- private File pluginXmlFile;
-
- /**
- * Path to enhanced plugin descriptor to generate the report from (must contain some XHTML values)
- *
- * @since 3.7.0
- */
- @Parameter( defaultValue = "${project.build.directory}/plugin-enhanced.xml", required = true,
- readonly = true )
- private File enhancedPluginXmlFile;
-
- /**
- * In case the internal javadoc site has not been generated when running this report goal
- * (e.g. when using an aggregator javadoc report) link validation needs to be disabled by setting
- * this value to {@code true}.
- * This might have the drawback that some links being generated in the report might be broken
- * in case not all parameter types and javadoc link references are resolvable through the sites being given to
- * {@link DescriptorGeneratorMojo}.
- *
- * @since 3.7.0
- */
- @Parameter( property = "maven.plugin.report.disableInternalJavadocLinkValidation" )
- private boolean disableInternalJavadocLinkValidation;
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getOutputDirectory()
- {
- // PLUGIN-191: output directory of plugin.html, not *-mojo.xml
- return project.getReporting().getOutputDirectory();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean canGenerateReport()
- {
- return enhancedPluginXmlFile != null && enhancedPluginXmlFile.isFile() && enhancedPluginXmlFile.canRead();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void executeReport( Locale locale )
- throws MavenReportException
- {
- getLog().warn( "The 'report' goal of the maven-plugin-plugin is deprecated, please use "
- + "the 'report' goal from the maven-plugin-report-plugin instead. This goal will be removed "
- + "in version 4.0.0." );
-
- if ( skip || skipReport )
- {
- getLog().info( "Maven Plugin Plugin Report generation skipped." );
- return;
- }
-
- PluginDescriptor pluginDescriptor = extractPluginDescriptor();
-
- // Generate the mojos' documentation
- generateMojosDocumentation( pluginDescriptor, locale );
-
- // Write the overview
- PluginOverviewRenderer r =
- new PluginOverviewRenderer( getProject(), requirements, requirementsHistories, getSink(),
- pluginDescriptor, locale, hasExtensionsToLoad );
- r.render();
- }
-
- private PluginDescriptor extractPluginDescriptor()
- throws MavenReportException
- {
- PluginDescriptorBuilder builder = new EnhancedPluginDescriptorBuilder( rtInfo );
-
- try ( Reader input = new XmlStreamReader( Files.newInputStream( enhancedPluginXmlFile.toPath() ) ) )
- {
- return builder.build( input );
- }
- catch ( IOException | PlexusConfigurationException e )
- {
- throw new MavenReportException( "Error extracting plugin descriptor from " + enhancedPluginXmlFile, e );
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getDescription( Locale locale )
- {
- return getBundle( locale ).getString( "report.plugin.description" );
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getName( Locale locale )
- {
- return getBundle( locale ).getString( "report.plugin.name" );
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getOutputName()
- {
- return "plugin-info";
- }
-
- /**
- * Generate the mojos documentation, as xdoc files.
- *
- * @param pluginDescriptor not null
- * @param locale not null
- * @throws MavenReportException if any
- */
- private void generateMojosDocumentation( PluginDescriptor pluginDescriptor, Locale locale )
- throws MavenReportException
- {
- try
- {
- File outputDir = outputDirectory;
- outputDir.mkdirs();
-
- PluginXdocGenerator generator = new PluginXdocGenerator( getProject(), locale, getReportOutputDirectory(),
- disableInternalJavadocLinkValidation );
- PluginToolsRequest pluginToolsRequest = new DefaultPluginToolsRequest( getProject(), pluginDescriptor );
- generator.execute( outputDir, pluginToolsRequest );
- }
- catch ( GeneratorException e )
- {
- throw new MavenReportException( "Error writing plugin documentation", e );
- }
-
- }
-
- /**
- * @param locale not null
- * @return the bundle for this report
- */
- protected static ResourceBundle getBundle( Locale locale )
- {
- return ResourceBundle.getBundle( "plugin-report", locale, PluginReport.class.getClassLoader() );
- }
-
- /**
- * Generates an overview page with the list of goals
- * and a link to the goal's page.
- */
- static class PluginOverviewRenderer
- extends AbstractMavenReportRenderer
- {
- private final MavenProject project;
-
- private final Requirements requirements;
-
- private final List<RequirementsHistory> requirementsHistories;
-
- private final PluginDescriptor pluginDescriptor;
-
- private final Locale locale;
-
- private final boolean hasExtensionsToLoad;
-
- /**
- * @param project not null
- * @param requirements not null
- * @param requirementsHistories not null
- * @param sink not null
- * @param pluginDescriptor not null
- * @param locale not null
- */
- PluginOverviewRenderer( MavenProject project, Requirements requirements,
- List<RequirementsHistory> requirementsHistories, Sink sink,
- PluginDescriptor pluginDescriptor, Locale locale, boolean hasExtensionsToLoad )
- {
- super( sink );
-
- this.project = project;
-
- this.requirements = ( requirements == null ? new Requirements() : requirements );
-
- this.requirementsHistories = requirementsHistories;
-
- this.pluginDescriptor = pluginDescriptor;
-
- this.locale = locale;
-
- this.hasExtensionsToLoad = hasExtensionsToLoad;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getTitle()
- {
- return getBundle( locale ).getString( "report.plugin.title" );
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void renderBody()
- {
- startSection( getTitle() );
-
- if ( !( pluginDescriptor.getMojos() != null && pluginDescriptor.getMojos().size() > 0 ) )
- {
- paragraph( getBundle( locale ).getString( "report.plugin.goals.nogoal" ) );
- endSection();
- return;
- }
-
- paragraph( getBundle( locale ).getString( "report.plugin.goals.intro" ) );
-
- boolean hasMavenReport = false;
- for ( Iterator<MojoDescriptor> i = pluginDescriptor.getMojos().iterator(); i.hasNext(); )
- {
- MojoDescriptor mojo = i.next();
-
- if ( GeneratorUtils.isMavenReport( mojo.getImplementation(), project ) )
- {
- hasMavenReport = true;
- }
- }
-
- startTable();
-
- String goalColumnName = getBundle( locale ).getString( "report.plugin.goals.column.goal" );
- String isMavenReport = getBundle( locale ).getString( "report.plugin.goals.column.isMavenReport" );
- String descriptionColumnName = getBundle( locale ).getString( "report.plugin.goals.column.description" );
- if ( hasMavenReport )
- {
- tableHeader( new String[] {goalColumnName, isMavenReport, descriptionColumnName} );
- }
- else
- {
- tableHeader( new String[] {goalColumnName, descriptionColumnName} );
- }
-
- List<MojoDescriptor> mojos = new ArrayList<>();
- mojos.addAll( pluginDescriptor.getMojos() );
- PluginUtils.sortMojos( mojos );
- for ( MojoDescriptor mojo : mojos )
- {
- String goalName = mojo.getFullGoalName();
-
- /*
- * Added ./ to define a relative path
- * @see AbstractMavenReportRenderer#getValidHref(java.lang.String)
- */
- String goalDocumentationLink = "./" + mojo.getGoal() + "-mojo.html";
-
- String description;
- if ( StringUtils.isNotEmpty( mojo.getDeprecated() ) )
- {
- description =
- "<strong>" + getBundle( locale ).getString( "report.plugin.goal.deprecated" ) + "</strong> "
- + mojo.getDeprecated();
- }
- else if ( StringUtils.isNotEmpty( mojo.getDescription() ) )
- {
- description = mojo.getDescription();
- }
- else
- {
- description = getBundle( locale ).getString( "report.plugin.goal.nodescription" );
- }
-
- sink.tableRow();
- tableCell( createLinkPatternedText( goalName, goalDocumentationLink ) );
- if ( hasMavenReport )
- {
- if ( GeneratorUtils.isMavenReport( mojo.getImplementation(), project ) )
- {
- sink.tableCell();
- sink.text( getBundle( locale ).getString( "report.plugin.isReport" ) );
- sink.tableCell_();
- }
- else
- {
- sink.tableCell();
- sink.text( getBundle( locale ).getString( "report.plugin.isNotReport" ) );
- sink.tableCell_();
- }
- }
- tableCell( description, true );
- sink.tableRow_();
- }
-
- endTable();
-
- startSection( getBundle( locale ).getString( "report.plugin.systemrequirements" ) );
-
- paragraph( getBundle( locale ).getString( "report.plugin.systemrequirements.intro" ) );
-
- startTable();
-
- String maven = discoverMavenRequirement( project, requirements );
- sink.tableRow();
- tableCell( getBundle( locale ).getString( "report.plugin.systemrequirements.maven" ) );
- tableCell( ( maven != null
- ? maven
- : getBundle( locale ).getString( "report.plugin.systemrequirements.nominimum" ) ) );
- sink.tableRow_();
-
- String jdk = discoverJdkRequirement( project, requirements );
- sink.tableRow();
- tableCell( getBundle( locale ).getString( "report.plugin.systemrequirements.jdk" ) );
- tableCell(
- ( jdk != null ? jdk : getBundle( locale ).getString( "report.plugin.systemrequirements.nominimum" ) ) );
- sink.tableRow_();
-
- String memory = requirements.getMemory();
- if ( StringUtils.isNotEmpty( memory ) )
- {
- sink.tableRow();
- tableCell( getBundle( locale ).getString( "report.plugin.systemrequirements.memory" ) );
- tableCell( memory );
- sink.tableRow_();
- }
-
- String diskSpace = requirements.getDiskSpace();
- if ( StringUtils.isNotEmpty( diskSpace ) )
- {
- sink.tableRow();
- tableCell( getBundle( locale ).getString( "report.plugin.systemrequirements.diskspace" ) );
- tableCell( diskSpace );
- sink.tableRow_();
- }
-
- if ( requirements.getOthers() != null && requirements.getOthers().size() > 0 )
- {
- for ( Iterator it = requirements.getOthers().keySet().iterator(); it.hasNext(); )
- {
- String key = it.next().toString();
-
- sink.tableRow();
- tableCell( key );
- tableCell( ( StringUtils.isNotEmpty( requirements.getOthers().getProperty( key ) )
- ? requirements.getOthers().getProperty( key )
- : getBundle( locale ).getString( "report.plugin.systemrequirements.nominimum" ) ) );
- sink.tableRow_();
- }
- }
- endTable();
-
- endSection();
-
- renderRequirementsHistories();
-
- renderUsageSection( hasMavenReport );
-
- endSection();
- }
-
- private void renderRequirementsHistories()
- {
- if ( requirementsHistories.isEmpty() )
- {
- return;
- }
-
- startSection( getBundle( locale ).getString( "report.plugin.systemrequirements.history" ) );
- paragraph( getBundle( locale ).getString( "report.plugin.systemrequirements.history.intro" ) );
-
- startTable();
- tableHeader( new String[] {
- getBundle( locale ).getString( "report.plugin.systemrequirements.history.version" ),
- getBundle( locale ).getString( "report.plugin.systemrequirements.history.maven" ),
- getBundle( locale ).getString( "report.plugin.systemrequirements.history.jdk" )
- } );
-
- requirementsHistories.forEach(
- requirementsHistory ->
- {
- sink.tableRow();
- tableCell( requirementsHistory.getVersion() );
- tableCell( requirementsHistory.getMaven() );
- tableCell( requirementsHistory.getJdk() );
- sink.tableRow_();
- } );
- endTable();
-
- endSection();
- }
-
- /**
- * Render the section about the usage of the plugin.
- *
- * @param hasMavenReport If the plugin has a report or not
- */
- private void renderUsageSection( boolean hasMavenReport )
- {
- startSection( getBundle( locale ).getString( "report.plugin.usage" ) );
-
- // Configuration
- sink.paragraph();
- text( getBundle( locale ).getString( "report.plugin.usage.intro" ) );
- sink.paragraph_();
-
- StringBuilder sb = new StringBuilder();
- sb.append( "<project>" ).append( '\n' );
- sb.append( " ..." ).append( '\n' );
- sb.append( " <build>" ).append( '\n' );
- sb.append(
- " <!-- " + getBundle( locale ).getString( "report.plugin.usage.pluginManagement" ) + " -->" ).append(
- '\n' );
- sb.append( " <pluginManagement>" ).append( '\n' );
- sb.append( " <plugins>" ).append( '\n' );
- sb.append( " <plugin>" ).append( '\n' );
- sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" ).append(
- '\n' );
- sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append(
- "</artifactId>" ).append( '\n' );
- sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" ).append(
- '\n' );
- if ( hasExtensionsToLoad )
- {
- sb.append( " <extensions>true</extensions>" ).append(
- '\n' );
- }
- sb.append( " </plugin>" ).append( '\n' );
- sb.append( " ..." ).append( '\n' );
- sb.append( " </plugins>" ).append( '\n' );
- sb.append( " </pluginManagement>" ).append( '\n' );
- sb.append( " <!-- " + getBundle( locale ).getString( "report.plugin.usage.plugins" ) + " -->" ).append(
- '\n' );
- sb.append( " <plugins>" ).append( '\n' );
- sb.append( " <plugin>" ).append( '\n' );
- sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" ).append(
- '\n' );
- sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append(
- "</artifactId>" ).append( '\n' );
- sb.append( " </plugin>" ).append( '\n' );
- sb.append( " ..." ).append( '\n' );
- sb.append( " </plugins>" ).append( '\n' );
- sb.append( " </build>" ).append( '\n' );
-
- if ( hasMavenReport )
- {
- sb.append( " ..." ).append( '\n' );
- sb.append(
- " <!-- " + getBundle( locale ).getString( "report.plugin.usage.reporting" ) + " -->" ).append(
- '\n' );
- sb.append( " <reporting>" ).append( '\n' );
- sb.append( " <plugins>" ).append( '\n' );
- sb.append( " <plugin>" ).append( '\n' );
- sb.append( " <groupId>" ).append( pluginDescriptor.getGroupId() ).append( "</groupId>" ).append(
- '\n' );
- sb.append( " <artifactId>" ).append( pluginDescriptor.getArtifactId() ).append(
- "</artifactId>" ).append( '\n' );
- sb.append( " <version>" ).append( pluginDescriptor.getVersion() ).append( "</version>" ).append(
- '\n' );
- sb.append( " </plugin>" ).append( '\n' );
- sb.append( " ..." ).append( '\n' );
- sb.append( " </plugins>" ).append( '\n' );
- sb.append( " </reporting>" ).append( '\n' );
- }
-
- sb.append( " ..." ).append( '\n' );
- sb.append( "</project>" ).append( '\n' );
-
- verbatimText( sb.toString() );
-
- sink.paragraph();
- linkPatternedText( getBundle( locale ).getString( "report.plugin.configuration.end" ) );
- sink.paragraph_();
-
- endSection();
- }
-
- /**
- * Try to lookup on the Maven prerequisites property.
- * If not specified, uses the value defined by the user.
- *
- * @param project not null
- * @param requirements not null
- * @return the Maven version
- */
- private static String discoverMavenRequirement( MavenProject project, Requirements requirements )
- {
- String maven = requirements.getMaven();
- if ( maven == null )
- {
- maven = ( project.getPrerequisites() != null ? project.getPrerequisites().getMaven() : null );
- }
- if ( maven == null )
- {
- maven = "2.0";
- }
-
- return maven;
- }
-
- /**
- * <ol>
- * <li>use configured jdk requirement</li>
- * <li>use <code>target</code> configuration of <code>org.apache.maven.plugins:maven-compiler-plugin</code></li>
- * <li>use <code>target</code> configuration of <code>org.apache.maven.plugins:maven-compiler-plugin</code> in
- * <code>pluginManagement</code></li>
- * <li>use <code>maven.compiler.target</code> property</li>
- * </ol>
- *
- * @param project not null
- * @param requirements not null
- * @return the JDK version
- */
- private static String discoverJdkRequirement( MavenProject project, Requirements requirements )
- {
- String jdk = requirements.getJdk();
-
- if ( jdk != null )
- {
- return jdk;
- }
-
- Plugin compiler = getCompilerPlugin( project.getBuild().getPluginsAsMap() );
- if ( compiler == null )
- {
- compiler = getCompilerPlugin( project.getPluginManagement().getPluginsAsMap() );
- }
-
- jdk = getPluginParameter( compiler, "release" );
- if ( jdk != null )
- {
- return jdk;
- }
-
- jdk = project.getProperties().getProperty( "maven.compiler.release" );
- if ( jdk != null )
- {
- return jdk;
- }
-
- jdk = getPluginParameter( compiler, "target" );
- if ( jdk != null )
- {
- return jdk;
- }
-
- // default value
- jdk = project.getProperties().getProperty( "maven.compiler.target" );
- if ( jdk != null )
- {
- return jdk;
- }
-
- // return "1.5" by default?
-
- String version = ( compiler == null ) ? null : compiler.getVersion();
-
- if ( version != null )
- {
- return "Default target for maven-compiler-plugin version " + version;
- }
-
- return "Unknown";
- }
-
- private static Plugin getCompilerPlugin( Map<String, Plugin> pluginsAsMap )
- {
- return pluginsAsMap.get( "org.apache.maven.plugins:maven-compiler-plugin" );
- }
-
- private static String getPluginParameter( Plugin plugin, String parameter )
- {
- if ( plugin != null )
- {
- Xpp3Dom pluginConf = (Xpp3Dom) plugin.getConfiguration();
-
- if ( pluginConf != null )
- {
- Xpp3Dom target = pluginConf.getChild( parameter );
-
- if ( target != null )
- {
- return target.getValue();
- }
- }
- }
-
- return null;
- }
- }
-}
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/Requirements.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/Requirements.java
deleted file mode 100644
index cb420995..00000000
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/Requirements.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.apache.maven.plugin.plugin.report_old;
-
-/*
- * 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.util.Properties;
-
-/**
- * Plugin requirements.
- *
- * @deprecated will be removed in the next major version
- */
-@Deprecated
-public class Requirements
-{
- /**
- * The minimum version of Maven to run this plugin.
- */
- private String maven;
-
- /**
- * The minimum version of the JDK to run this plugin.
- */
- private String jdk;
-
- /**
- * The minimum memory needed to run this plugin.
- */
- private String memory;
-
- /**
- * The minimum diskSpace needed to run this plugin.
- */
- private String diskSpace;
-
- /**
- * Field others.
- */
- private java.util.Properties others;
-
- public String getMaven()
- {
- return maven;
- }
-
- public String getJdk()
- {
- return jdk;
- }
-
- public String getMemory()
- {
- return memory;
- }
-
- public String getDiskSpace()
- {
- return diskSpace;
- }
-
- public Properties getOthers()
- {
- return others;
- }
-
- @Override
- public String toString()
- {
- final StringBuilder sb = new StringBuilder( "Requirements{" );
- sb.append( "maven='" ).append( maven ).append( '\'' );
- sb.append( ", jdk='" ).append( jdk ).append( '\'' );
- sb.append( ", memory='" ).append( memory ).append( '\'' );
- sb.append( ", diskSpace='" ).append( diskSpace ).append( '\'' );
- sb.append( ", others=" ).append( others );
- sb.append( '}' );
- return sb.toString();
- }
-}
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/RequirementsHistory.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/RequirementsHistory.java
deleted file mode 100644
index 438d8d74..00000000
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/report_old/RequirementsHistory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.apache.maven.plugin.plugin.report_old;
-
-/*
- * 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.
- */
-
-/**
- * Plugin requirements history.
- *
- * @author Slawomir Jaranowski
- */
-@Deprecated
-public class RequirementsHistory
-{
- /**
- * The plugin version.
- */
- private String version;
-
- /**
- * The minimum version of Maven to run this plugin.
- */
- private String maven;
-
- /**
- * The minimum version of the JDK to run this plugin.
- */
- private String jdk;
-
- public String getVersion()
- {
- return version;
- }
-
- public String getMaven()
- {
- return maven;
- }
-
- public String getJdk()
- {
- return jdk;
- }
-
- @Override
- public String toString()
- {
- final StringBuilder sb = new StringBuilder( "RequirementsHistory{" );
- sb.append( "version='" ).append( version ).append( '\'' );
- sb.append( ", maven='" ).append( maven ).append( '\'' );
- sb.append( ", jdk='" ).append( jdk ).append( '\'' );
- sb.append( '}' );
- return sb.toString();
- }
-}
diff --git a/maven-plugin-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor_old/EnhancedPluginDescriptorBuilder.java b/maven-plugin-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor_old/EnhancedPluginDescriptorBuilder.java
deleted file mode 100644
index 75515656..00000000
--- a/maven-plugin-plugin/src/main/java/org/apache/maven/plugins/plugin/descriptor_old/EnhancedPluginDescriptorBuilder.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.apache.maven.plugins.plugin.descriptor_old;
-
-/*
- * 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.net.URI;
-
-import org.apache.maven.plugin.descriptor.MojoDescriptor;
-import org.apache.maven.plugin.descriptor.Parameter;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
-import org.apache.maven.plugin.plugin.report_old.PluginReport;
-import org.apache.maven.rtinfo.RuntimeInformation;
-import org.apache.maven.tools.plugin.EnhancedParameterWrapper;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.configuration.PlexusConfigurationException;
-
-/**
- * Reads enhanced plugin.xml files as generated by
- * {@link org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator} and
- * used by {@link PluginReport}.
- * Populates the slightly extended {@link Parameter} object {@link EnhancedParameterWrapper}.
- */
-@Deprecated
-public class EnhancedPluginDescriptorBuilder extends PluginDescriptorBuilder
-{
- private final boolean requireAddingMissingParameterSinceField;
-
- public EnhancedPluginDescriptorBuilder( RuntimeInformation rtInfo )
- {
- this( rtInfo.isMavenVersion( "[,3.3.9]" ) );
- }
-
- EnhancedPluginDescriptorBuilder( boolean requireAddingMissingParameterSinceField )
- {
- this.requireAddingMissingParameterSinceField = requireAddingMissingParameterSinceField;
- }
-
- @Override
- public MojoDescriptor buildComponentDescriptor( PlexusConfiguration c, PluginDescriptor pluginDescriptor )
- throws PlexusConfigurationException
- {
- MojoDescriptor mojoDescriptor = super.buildComponentDescriptor( c, pluginDescriptor );
-
- // ----------------------------------------------------------------------
- // Parameters
- // ----------------------------------------------------------------------
-
- PlexusConfiguration[] parameterConfigurations = c.getChild( "parameters" ).getChildren( "parameter" );
-
- for ( PlexusConfiguration d : parameterConfigurations )
- {
- String parameterName = d.getChild( "name" ).getValue();
- // don't call getParameterMap() to not populate
- Parameter pd = mojoDescriptor.getParameterMap().get( parameterName );
- if ( requireAddingMissingParameterSinceField )
- {
- addMissingParameterSinceField( pd, d );
- }
- PlexusConfiguration configTypeJavadocUrl = d.getChild( "typeJavadocUrl", false );
- if ( configTypeJavadocUrl != null )
- {
- String parameterTypeJavadocUrl = configTypeJavadocUrl.getValue();
- EnhancedParameterWrapper enhancedParameter = new EnhancedParameterWrapper( pd );
- enhancedParameter.setTypeJavadocUrl( URI.create( parameterTypeJavadocUrl ) );
- mojoDescriptor.getParameters().set( mojoDescriptor.getParameters().indexOf( pd ), enhancedParameter );
- mojoDescriptor.getParameterMap().put( parameterName, enhancedParameter );
- }
- }
- return mojoDescriptor;
- }
-
- /**
- * Reads the plugin descriptor and adds the fix for <a href="https://issues.apache.org/jira/browse/MNG-6109">
- * MNG-6109</a> when using Maven-3.3.9 and before.
- * Method can be removed once Maven 3.5.0 is the prerequisite for this plugin.
- * @throws PlexusConfigurationException
- *
- * @since 3.5.1
- * @see <a href="https://issues.apache.org/jira/browse/MNG-6109">MNG-6109</a>
- * @see <a href="https://issues.apache.org/jira/browse/MPLUGIN-319">MPLUGIN-319</a>
- */
- void addMissingParameterSinceField( Parameter pd, PlexusConfiguration d ) throws PlexusConfigurationException
- {
- String parameterSince = d.getChild( "since" ).getValue();
- pd.setSince( parameterSince );
- }
-}
diff --git a/maven-plugin-plugin/src/main/resources/plugin-report.properties b/maven-plugin-plugin/src/main/resources/plugin-report.properties
deleted file mode 100644
index 7d9c45b5..00000000
--- a/maven-plugin-plugin/src/main/resources/plugin-report.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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.
-#
-
-report.plugin.name=Plugin Documentation
-report.plugin.description=This report provides goals and parameters documentation of a plugin.
-report.plugin.title=Plugin Documentation
-
-report.plugin.goals.nogoal=No goals defined in this plugin.
-report.plugin.goals.intro=Goals available for this plugin:
-report.plugin.goals.column.goal=Goal
-report.plugin.goals.column.isMavenReport=Report?
-report.plugin.goals.column.description=Description
-report.plugin.goal.nodescription=No description.
-report.plugin.goal.deprecated=Deprecated.
-
-report.plugin.systemrequirements=System Requirements
-report.plugin.systemrequirements.intro=The following specifies the minimum requirements to run this Maven plugin:
-report.plugin.systemrequirements.nominimum= No minimum requirement.
-report.plugin.systemrequirements.maven=Maven
-report.plugin.systemrequirements.jdk=JDK
-report.plugin.systemrequirements.memory=Memory
-report.plugin.systemrequirements.diskspace=Disk Space
-
-report.plugin.systemrequirements.history=System Requirements History
-report.plugin.systemrequirements.history.intro=The following specifies the minimum requirements to run this Maven plugin for historical versions:
-report.plugin.systemrequirements.history.version=Plugin Version
-report.plugin.systemrequirements.history.maven=Maven
-report.plugin.systemrequirements.history.jdk=JDK
-
-report.plugin.usage=Usage
-report.plugin.usage.intro=You should specify the version in your project's plugin configuration:
-report.plugin.usage.pluginManagement=To define the plugin version in your parent POM
-report.plugin.usage.plugins=To use the plugin goals in your POM or parent POM
-report.plugin.usage.reporting=To use the report goals in your POM or parent POM
-report.plugin.configuration.end=For more information, see {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html}
-
-report.plugin.isReport=Yes
-report.plugin.isNotReport=No
diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_de.properties b/maven-plugin-plugin/src/main/resources/plugin-report_de.properties
deleted file mode 100644
index e87e5c07..00000000
--- a/maven-plugin-plugin/src/main/resources/plugin-report_de.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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.
-#
-
-report.plugin.name=Plugin-Dokumentation
-report.plugin.description=Dieser Bericht dokumentiert die Goals des Plugins und deren Parameter.
-report.plugin.title=Plugin-Dokumentation
-
-report.plugin.goals.nogoal=Keine Goals verf\u00FCgbar.
-report.plugin.goals.intro=Verf\u00FCgbare Goals dieses Plugins:
-report.plugin.goals.column.goal=Goal
-report.plugin.goals.column.isMavenReport=Bericht?
-report.plugin.goals.column.description=Beschreibung
-report.plugin.goal.nodescription=Keine Beschreibung.
-report.plugin.goal.deprecated=Missbilligt.
-
-report.plugin.systemrequirements=Systemvoraussetzungen
-report.plugin.systemrequirements.intro=Die folgende Tabelle listet die Mindestanforderungen zum Ausf\u00FChren dieses Plugins auf:
-report.plugin.systemrequirements.nominimum=Keine Mindestanforderung.
-report.plugin.systemrequirements.maven=Maven
-report.plugin.systemrequirements.jdk=JDK
-report.plugin.systemrequirements.memory=Arbeitsspeicher
-report.plugin.systemrequirements.diskspace=Festplatte
-
-report.plugin.systemrequirements.history=Historie der Systemvoraussetzungen
-report.plugin.systemrequirements.history.intro=In der folgenden Tabelle sind die Mindestanforderungen zum Ausf\u00FChren dieses Plug-ins f\u00FCr historische Versionen aufgef\u00FChrt:
-report.plugin.systemrequirements.history.version=Plugin Version
-report.plugin.systemrequirements.history.maven=Maven
-report.plugin.systemrequirements.history.jdk=JDK
-
-report.plugin.usage=Gebrauch
-report.plugin.usage.intro=Geben Sie die gew\u00FCnschte Version einfach in der Plugin-Konfiguration Ihres Projekts an:
-report.plugin.usage.pluginManagement=Zum Definieren der Plugin-Version in der Eltern-POM
-report.plugin.usage.plugins=Zum Verwenden der Plugin-Goals w\u00E4hrend des Build-Vorgangs eines Projekts
-report.plugin.usage.reporting=Zum Erzeugen der Berichte f\u00FCr die Projektdokumentation
-report.plugin.configuration.end=F\u00FCr weitergehende Informationen lesen Sie bitte den Artikel {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html}.
-
-report.plugin.isReport=Ja
-report.plugin.isNotReport=Nein
diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_en.properties b/maven-plugin-plugin/src/main/resources/plugin-report_en.properties
deleted file mode 100644
index 96cf4075..00000000
--- a/maven-plugin-plugin/src/main/resources/plugin-report_en.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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:
-# This bundle is intentionally empty because English strings are provided by the base bundle via the parent chain. It
-# must be provided nevertheless such that a request for locale "en" will not errorneously pick up the bundle for the
-# JVM's default locale (which need not be "en"). See the method javadoc about
-# ResourceBundle.getBundle(String, Locale, ClassLoader)
-# for a full description of the lookup strategy.
diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_fr.properties b/maven-plugin-plugin/src/main/resources/plugin-report_fr.properties
deleted file mode 100644
index 2ac7b3fb..00000000
--- a/maven-plugin-plugin/src/main/resources/plugin-report_fr.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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.
-#
-
-report.plugin.name=Documentation du plugin
-report.plugin.description=Ce rapport fournit de la documentation sur les goals et les param\u00EAtres d'un plugin.
-report.plugin.title=Documentation du plugin
-
-report.plugin.goals.nogoal=Aucun goal disponible.
-report.plugin.goals.intro=Goals disponibles pour ce plugin :
-report.plugin.goals.column.goal=Goal
-report.plugin.goals.column.isMavenReport=Rapport?
-report.plugin.goals.column.description=Description
-report.plugin.goal.nodescription=Pas de description.
-report.plugin.goal.deprecated=Obsol\u00E8te.
-
-report.plugin.systemrequirements=Exigences Syst\u00E8mes
-report.plugin.systemrequirements.intro=Ce qui suit sp\u00E9cifie les exigences minimales pour ex\u00E9cuter ce plugin Maven :
-report.plugin.systemrequirements.nominimum= Aucune exigence minimale.
-report.plugin.systemrequirements.maven=Maven
-report.plugin.systemrequirements.jdk=JDK
-report.plugin.systemrequirements.memory=M\u00E9moire
-report.plugin.systemrequirements.diskspace=Espace Disque
-
-report.plugin.systemrequirements.history=Historique des Exigences Syst\u00E8mes
-report.plugin.systemrequirements.history.intro=Ce qui suit sp\u00E9cifie les exigences minimales pour ex\u00E9cuter ce plugin Maven pour les versions historiques:
-report.plugin.systemrequirements.history.version=Version du Plugin
-report.plugin.systemrequirements.history.maven=Maven
-report.plugin.systemrequirements.history.jdk=JDK
-
-report.plugin.usage=Utilisation
-report.plugin.usage.intro=Vous devez sp\u00E9cifier la version dans la configuration de votre projet :
-report.plugin.usage.pluginManagement=Pour d\u00E9finir la version du plugin dans le POM parent
-report.plugin.usage.plugins=Pour utiliser les goals du plugin dans votre POM ou POM parent
-report.plugin.usage.reporting=Pour utiliser les goals de rapports dans votre POM ou POM parent
-report.plugin.configuration.end=Pour plus d'informations, consultez {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html}
-
-report.plugin.isReport=Oui
-report.plugin.isNotReport=Non
diff --git a/maven-plugin-plugin/src/main/resources/plugin-report_sv.properties b/maven-plugin-plugin/src/main/resources/plugin-report_sv.properties
deleted file mode 100644
index 0e806e49..00000000
--- a/maven-plugin-plugin/src/main/resources/plugin-report_sv.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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.
-#
-
-report.plugin.name=Plugindokumentation
-report.plugin.description=Denna rapport tillhandah\u00E5ller m\u00E5l- och parameterdokumentation f\u00F6r en plugin.
-report.plugin.title=Plugindokumentation
-
-report.plugin.goals.nogoal=Inga m\u00E5l tillg\u00E4ngliga \u00E4nnu.
-report.plugin.goals.intro=Tillg\u00E4ngliga m\u00E5l f\u00F6r denna plugin:
-report.plugin.goals.column.goal=M\u00E5l
-report.plugin.goals.column.isMavenReport=Rapport?
-report.plugin.goals.column.description=Beskrivning
-report.plugin.goal.nodescription=Ingen beskrivning.
-report.plugin.goal.deprecated=F\u00F6r\u00E5ldrat.
-
-report.plugin.systemrequirements=Systemkrav
-report.plugin.systemrequirements.intro=F\u00F6ljande minimikrav st\u00E4lls f\u00F6r att k\u00F6ra denna Maven plugin:
-report.plugin.systemrequirements.nominimum= Inga minimikrav.
-report.plugin.systemrequirements.maven=Maven
-report.plugin.systemrequirements.jdk=JDK
-report.plugin.systemrequirements.memory=Minne
-report.plugin.systemrequirements.diskspace=Diskutrymme
-
-report.plugin.systemrequirements.history=Systemkravshistorik
-report.plugin.systemrequirements.history.intro=F\u00F6ljande anger minimikraven f\u00F6r att k\u00F6ra detta Maven-plugin f\u00F6r historiska versioner:
-report.plugin.systemrequirements.history.version=Plugin Version
-report.plugin.systemrequirements.history.maven=Maven
-report.plugin.systemrequirements.history.jdk=JDK
-
-report.plugin.usage=Anv\u00E4ndning
-report.plugin.usage.intro=Du b\u00F6r specificera versionen i ditt projekts pluginkonfiguration:
-report.plugin.usage.pluginManagement=F\u00F6r att definiera pluginversion i din f\u00F6r\u00E4ldra-POM
-report.plugin.usage.plugins=F\u00F6r att anv\u00E4nda plugin-m\u00E5len i din POM eller f\u00F6r\u00E4ldra-POM
-report.plugin.usage.reporting=F\u00F6r att anv\u00E4nda rapport-m\u00E5len i din POM eller f\u00F6r\u00E4ldra-POM
-report.plugin.configuration.end=F\u00F6r mer information, l\u00E4s {"Guide to Configuring Plug-ins", https://maven.apache.org/guides/mini/guide-configuring-plugins.html} (p\u00E5 engelska).
-
-report.plugin.isReport=Ja
-report.plugin.isNotReport=Nej
diff --git a/maven-plugin-report-plugin/pom.xml b/maven-plugin-report-plugin/pom.xml
index e7e66d46..a5db1628 100644
--- a/maven-plugin-report-plugin/pom.xml
+++ b/maven-plugin-report-plugin/pom.xml
@@ -55,12 +55,6 @@
<artifactId>maven-plugin-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- <version>${reportingApiVersion}</version>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
@@ -90,9 +84,14 @@
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
+ <version>2.0.0-M5</version>
</dependency>
<!-- shared -->
+ <dependency>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
@@ -229,8 +228,8 @@
<settingsFile>src/it/settings.xml</settingsFile>
<streamLogsOnFailures>true</streamLogsOnFailures>
<filterProperties>
- <sitePluginVersion>3.12.1</sitePluginVersion>
- <projectInfoReportsPlugin>3.4.1</projectInfoReportsPlugin>
+ <sitePluginVersion>4.0.0-M5</sitePluginVersion>
+ <projectInfoReportsPlugin>4.0.0-M1-SNAPSHOT</projectInfoReportsPlugin>
<antVersion>${antVersion}</antVersion>
</filterProperties>
<properties>
diff --git a/maven-plugin-plugin/src/it/mplugin-187/invoker.properties b/maven-plugin-report-plugin/src/it/mplugin-187/invoker.properties
similarity index 94%
rename from maven-plugin-plugin/src/it/mplugin-187/invoker.properties
rename to maven-plugin-report-plugin/src/it/mplugin-187/invoker.properties
index a16bae84..3b86dfb4 100644
--- a/maven-plugin-plugin/src/it/mplugin-187/invoker.properties
+++ b/maven-plugin-report-plugin/src/it/mplugin-187/invoker.properties
@@ -5,9 +5,9 @@
# 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
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals = clean plugin:report
+invoker.goals = clean plugin-report:report
diff --git a/maven-plugin-plugin/src/it/mplugin-187/pom.xml b/maven-plugin-report-plugin/src/it/mplugin-187/pom.xml
similarity index 91%
rename from maven-plugin-plugin/src/it/mplugin-187/pom.xml
rename to maven-plugin-report-plugin/src/it/mplugin-187/pom.xml
index 541ee69a..b0b1de57 100644
--- a/maven-plugin-plugin/src/it/mplugin-187/pom.xml
+++ b/maven-plugin-report-plugin/src/it/mplugin-187/pom.xml
@@ -26,7 +26,7 @@ under the License.
<artifactId>mplugin-187</artifactId>
<version>1.0-SNAPSHOT</version>
- <description>Verify that plugin:report succeeds</description>
+ <description>Verify that plugin-report:report succeeds</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -36,10 +36,10 @@ under the License.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
+ <artifactId>maven-plugin-report-plugin</artifactId>
<version>@project.version@</version>
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/maven-plugin-report-plugin/src/it/plugin-info-jdk-default-version/src/site/site.xml b/maven-plugin-report-plugin/src/it/plugin-info-jdk-default-version/src/site/site.xml
deleted file mode 100644
index c0a8d7a2..00000000
--- a/maven-plugin-report-plugin/src/it/plugin-info-jdk-default-version/src/site/site.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-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.
--->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd">
- <body>
- <menu name="Overview">
- <item name="Goals" href="plugin-info.html"/>
- </menu>
- <menu ref="reports" inherit="bottom" />
- </body>
-</project>
diff --git a/maven-plugin-report-plugin/src/it/plugin-report-annotations/pom.xml b/maven-plugin-report-plugin/src/it/plugin-report-annotations/pom.xml
index d675726e..51b2d7cc 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report-annotations/pom.xml
+++ b/maven-plugin-report-plugin/src/it/plugin-report-annotations/pom.xml
@@ -27,7 +27,7 @@ under the License.
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
- <name>MPLUGIN-105</name>
+ <name>MPLUGIN-105</name>
<description>
Test basic site generation to guard against regression.
</description>
diff --git a/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/pom.xml b/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/pom.xml
index ca0b9d6a..4340fba3 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/pom.xml
+++ b/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/pom.xml
@@ -100,9 +100,6 @@ under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
- <configuration>
- <locales>en</locales>
- </configuration>
</plugin>
</plugins>
</build>
diff --git a/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/verify.groovy b/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/verify.groovy
index 5eb43a12..9c040f6e 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/verify.groovy
+++ b/maven-plugin-report-plugin/src/it/plugin-report-with-javadoc-links/verify.groovy
@@ -21,11 +21,11 @@ def mojoDoc = new File( basedir, 'target/site/test-mojo.html' )
assert mojoDoc.isFile()
-assert mojoDoc.text.contains('<b>See also:</b> <a class="externalLink" href="https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html">java.util.Collections</a></div>') // mojo description see javadoc tag
+assert mojoDoc.text.contains('<strong>See also:</strong> <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html" class="externalLink">java.util.Collections</a></div>') // mojo description see javadoc tag
assert mojoDoc.text.contains('beans parameter leveraging <a href="apidocs/org/SimpleBean.html"><code>SimpleBean</code></a>.') // parameter description
assert mojoDoc.text.contains('<td><code><a href="apidocs/org/SimpleBean.html">Collection<SimpleBean></a></code></td>') // type link in parameter overview
-assert mojoDoc.text.contains('<li><b>Type</b>: <code><a href="apidocs/org/SimpleBean.html">java.util.Collection<org.SimpleBean></a></code></li>') // type link in parameter details
+assert mojoDoc.text.contains('<li><strong>Type</strong>: <code><a href="apidocs/org/SimpleBean.html">java.util.Collection<org.SimpleBean></a></code></li>') // type link in parameter details
assert mojoDoc.text.contains('<div>invalid javadoc reference <code>org.apache.maven.artifact.Artifact</code>.</div>') // second parameter description with link being removed (as no javadoc site associated)
diff --git a/maven-plugin-report-plugin/src/it/plugin-report/pom.xml b/maven-plugin-report-plugin/src/it/plugin-report/pom.xml
index dd95249a..e414714b 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report/pom.xml
+++ b/maven-plugin-report-plugin/src/it/plugin-report/pom.xml
@@ -27,7 +27,7 @@ under the License.
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
- <name>MPLUGIN-105</name>
+ <name>MPLUGIN-105</name>
<description>
Test basic site generation to guard against regression of MPLUGIN-105.
</description>
@@ -90,9 +90,6 @@ under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
- <configuration>
- <locales>en</locales>
- </configuration>
</plugin>
</plugins>
</build>
diff --git a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
index 9eb7ac99..672c9f47 100644
--- a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
+++ b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
@@ -138,7 +138,7 @@ public class PluginReport
* This might have the drawback that some links being generated in the report might be broken
* in case not all parameter types and javadoc link references are resolvable through the sites being given to
* goal {@code plugin:descriptor}.
- *
+ *
* @since 3.7.0
*/
@Parameter( property = "maven.plugin.report.disableInternalJavadocLinkValidation" )
@@ -550,7 +550,7 @@ public class PluginReport
sb.append( " ..." ).append( '\n' );
sb.append( "</project>" ).append( '\n' );
- verbatimText( sb.toString() );
+ verbatimSource( sb.toString() );
sink.paragraph();
linkPatternedText( getBundle( locale ).getString( "report.plugin.configuration.end" ) );
@@ -560,7 +560,7 @@ public class PluginReport
}
/**
- * Tries to determine the Maven requirement from either the plugin descriptor or (if not set) from the
+ * Tries to determine the Maven requirement from either the plugin descriptor or (if not set) from the
* Maven prerequisites element in the POM.
*
* @param project not null
diff --git a/maven-plugin-tools-generators/pom.xml b/maven-plugin-tools-generators/pom.xml
index 3a1d27ad..5d6e4320 100644
--- a/maven-plugin-tools-generators/pom.xml
+++ b/maven-plugin-tools-generators/pom.xml
@@ -51,7 +51,6 @@
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
- <version>${reportingApiVersion}</version>
</dependency>
<!-- plexus -->
@@ -67,7 +66,7 @@
<!-- other -->
<dependency>
<groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
+ <artifactId>velocity-engine-core</artifactId>
</dependency>
<dependency>
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
index 7b6f7b2c..a64c205e 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
@@ -104,20 +104,13 @@ public class PluginXdocGenerator
/**
* @param project not null.
- * @param locale not null wanted locale.
+ * @param locale not null.
*/
public PluginXdocGenerator( MavenProject project, Locale locale, File reportOutputDirectory,
boolean disableInternalJavadocLinkValidation )
{
this.project = project;
- if ( locale == null )
- {
- this.locale = Locale.ENGLISH;
- }
- else
- {
- this.locale = locale;
- }
+ this.locale = locale;
this.reportOutputDirectory = reportOutputDirectory;
this.disableInternalJavadocLinkValidation = disableInternalJavadocLinkValidation;
}
@@ -500,7 +493,7 @@ public class PluginXdocGenerator
w.startElement( "div" );
if ( StringUtils.isNotEmpty( parameter.getDescription() ) )
{
-
+
w.writeMarkup( getXhtmlWithValidatedLinks( parameter.getDescription(), context ) );
}
else
@@ -580,12 +573,12 @@ public class PluginXdocGenerator
StringBuilder shortType = new StringBuilder();
shortType.append( getShortTypeOfSimpleType( type.substring( 0, startTypeArguments ) ) );
shortType.append( "<" )
- .append( getShortTypeOfTypeArgument(
+ .append( getShortTypeOfTypeArgument(
type.substring( startTypeArguments + 1, type.lastIndexOf( ">" ) ) ) )
.append( ">" );
return shortType.toString();
}
-
+
}
private static String getShortTypeOfTypeArgument( String type )
@@ -636,8 +629,8 @@ public class PluginXdocGenerator
{
URI javadocUrl = enhancedParameter.getTypeJavadocUrl();
// optionally check if link is valid
- if ( javadocUrl.isAbsolute()
- || disableInternalJavadocLinkValidation
+ if ( javadocUrl.isAbsolute()
+ || disableInternalJavadocLinkValidation
|| JavadocLinkGenerator.isLinkValid( javadocUrl, reportOutputDirectory.toPath() ) )
{
return format( "pluginxdoc.mojodescriptor.parameter.type_link",
diff --git a/pom.xml b/pom.xml
index a16314bc..3e300bd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,20 +96,18 @@
<pluginTestingHarnessVersion>3.3.0</pluginTestingHarnessVersion>
<maven4Version>4.0.0-alpha-2</maven4Version>
<mavenVersion>3.2.5</mavenVersion>
- <!-- SLF4J version must match the version exported from the mavenVersion,
+ <!-- SLF4J version must match the version exported from the mavenVersion,
https://github.com/apache/maven/blob/12a6b3acb947671f09b81f49094c53f426d8cea1/pom.xml#L63 -->
<slf4jVersion>1.7.5</slf4jVersion>
<antVersion>1.10.12</antVersion>
<maven.site.path>plugin-tools-archives/plugin-tools-LATEST</maven.site.path>
- <!-- whenever the ASM version is updated also the
- maven-plugin-tools-annotations/src/main/java/o/a/m/tools/plugins/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor#CLASS_VERSION_TO_JAVA_STRING
+ <!-- whenever the ASM version is updated also the
+ maven-plugin-tools-annotations/src/main/java/o/a/m/tools/plugins/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor#CLASS_VERSION_TO_JAVA_STRING
needs to be updated as well -->
<asmVersion>9.4</asmVersion>
- <doxiaVersion>1.11.1</doxiaVersion>
- <doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion>
<plexusUtilsVersion>3.5.0</plexusUtilsVersion>
- <reportingApiVersion>3.1.1</reportingApiVersion>
- <reportingImplVersion>3.2.0</reportingImplVersion>
+ <reportingApiVersion>4.0.0-M4</reportingApiVersion>
+ <reportingImplVersion>4.0.0-M4</reportingImplVersion>
<project.build.outputTimestamp>2023-01-20T07:42:25Z</project.build.outputTimestamp>
</properties>
@@ -186,43 +184,16 @@
<artifactId>maven-settings</artifactId>
<version>${mavenVersion}</version>
</dependency>
- <!-- doxia -->
+ <!-- shared -->
<dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-sink-api</artifactId>
- <version>${doxiaVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-site-renderer</artifactId>
- <version>${doxia-sitetoolsVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>org.apache.maven.reporting</groupId>
+ <artifactId>maven-reporting-api</artifactId>
+ <version>${reportingApiVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>${reportingImplVersion}</version>
- <exclusions>
- <exclusion>
- <artifactId>plexus-container-default</artifactId>
- <groupId>org.codehaus.plexus</groupId>
- </exclusion>
- </exclusions>
</dependency>
@@ -250,24 +221,20 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-velocity</artifactId>
- <version>1.2</version>
+ <version>2.0</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
- <exclusion>
- <groupId>velocity</groupId>
- <artifactId>velocity</artifactId>
- </exclusion>
</exclusions>
</dependency>
<!-- other -->
<dependency>
<groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.7</version>
+ <artifactId>velocity-engine-core</artifactId>
+ <version>2.3</version>
</dependency>
<dependency>