This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git


The following commit(s) were added to refs/heads/master by this push:
     new 664c16e2 [MPLUGIN-431] Remove deprecated items from new 
maven-plugin-report-plugin
664c16e2 is described below

commit 664c16e2692a79e069e816dca44f9789839927a9
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Wed Oct 26 14:07:09 2022 +0200

    [MPLUGIN-431] Remove deprecated items from new maven-plugin-report-plugin
---
 .../maven/plugin/plugin/AbstractGeneratorMojo.java |   6 +-
 .../plugin/plugin/DescriptorGeneratorMojoTest.java |  40 +++--
 .../src/it/plugin-info-jdk/pom.xml                 |   1 -
 .../src/it/plugin-info-jdk/requirement/pom.xml     |  78 ---------
 .../resources/META-INF/maven/plugin-enhanced.xml   |  69 --------
 .../src/it/plugin-info-jdk/verify.groovy           |   3 +-
 .../src/it/plugin-report/verify.groovy             |   3 +-
 .../maven/plugin/plugin/report/PluginReport.java   | 175 ++-------------------
 .../maven/plugin/plugin/report/Requirements.java   |  94 -----------
 .../src/main/resources/plugin-report.properties    |   3 -
 .../src/main/resources/plugin-report_de.properties |   3 -
 .../src/main/resources/plugin-report_fr.properties |   3 -
 .../src/main/resources/plugin-report_sv.properties |   3 -
 13 files changed, 51 insertions(+), 430 deletions(-)

diff --git 
a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
 
b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
index 83c5bd11..adf2ffc5 100644
--- 
a/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
+++ 
b/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
@@ -107,7 +107,11 @@ public abstract class AbstractGeneratorMojo
     static String getDefaultGoalPrefix( MavenProject project )
     {
         String defaultGoalPrefix;
-        if ( "maven-plugin".equalsIgnoreCase( project.getArtifactId() ) )
+        if ( "maven-plugin-report-plugin".equalsIgnoreCase( 
project.getArtifactId() ) )
+        {
+            defaultGoalPrefix = "plugin-report";
+        }
+        else if ( "maven-plugin".equalsIgnoreCase( project.getArtifactId() ) )
         {
             defaultGoalPrefix = project.getGroupId().substring( 
project.getGroupId().lastIndexOf( '.' ) + 1 );
         }
diff --git 
a/maven-plugin-plugin/src/test/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojoTest.java
 
b/maven-plugin-plugin/src/test/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojoTest.java
index cf310503..71444a61 100644
--- 
a/maven-plugin-plugin/src/test/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojoTest.java
+++ 
b/maven-plugin-plugin/src/test/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojoTest.java
@@ -19,27 +19,39 @@ package org.apache.maven.plugin.plugin;
  * under the License.
  */
 
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.CoreMatchers.is;
+import java.util.stream.Stream;
 
 import org.apache.maven.project.MavenProject;
-import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.params.provider.Arguments.arguments;
 
 // at least one test class must be public for test-javadoc report
 public class DescriptorGeneratorMojoTest
 {
-    @Test
-    void defaultGoalPrefix()
+    public static Stream<Arguments> goalPrefixes()
+    {
+        return Stream.of(
+            arguments( null, "maven-plugin-plugin", "plugin" ),
+            arguments( null, "maven-plugin-report-plugin", "plugin-report" ),
+            arguments( null, "maven-default-plugin", "default" ),
+            arguments( null, "default-maven-plugin", "default" ),
+            arguments( null, "default-maven-plugin", "default" ),
+            arguments( "foo.bar", "maven-plugin", "bar" ),
+            arguments( "foo", "maven-plugin", "foo" )
+        );
+    }
+
+    @ParameterizedTest
+    @MethodSource("goalPrefixes")
+    void defaultGoalPrefix(String groupId, String artifactId, String 
expectedGoal)
     {
-        assertThat( DescriptorGeneratorMojo.getDefaultGoalPrefix( newProject( 
null, "maven-plugin-plugin" ) ),
-                    is( "plugin" ) );
-        assertThat( DescriptorGeneratorMojo.getDefaultGoalPrefix( newProject( 
null, "maven-default-plugin" ) ),
-                    is( "default" ) );
-        assertThat( DescriptorGeneratorMojo.getDefaultGoalPrefix( newProject( 
null, "default-maven-plugin" ) ),
-                    is( "default" ) );
-        assertThat( DescriptorGeneratorMojo.getDefaultGoalPrefix( newProject( 
"foo.bar", "maven-plugin" ) ),
-                    is( "bar" ) );
-        assertThat( DescriptorGeneratorMojo.getDefaultGoalPrefix( newProject( 
"foo", "maven-plugin" ) ), is( "foo" ) );
+        assertThat( DescriptorGeneratorMojo.getDefaultGoalPrefix( newProject( 
groupId, artifactId ) ),
+                    is( expectedGoal ) );
     }
     
     private MavenProject newProject( final String groupId, final String 
artifactId )
diff --git a/maven-plugin-report-plugin/src/it/plugin-info-jdk/pom.xml 
b/maven-plugin-report-plugin/src/it/plugin-info-jdk/pom.xml
index eaa1359d..62ed497e 100644
--- a/maven-plugin-report-plugin/src/it/plugin-info-jdk/pom.xml
+++ b/maven-plugin-report-plugin/src/it/plugin-info-jdk/pom.xml
@@ -45,7 +45,6 @@ under the License.
     <module>propertyRelease</module>
     <module>pluginManagement</module>
     <module>plugin</module>
-    <module>requirement</module>
   </modules>
 
   <build>
diff --git 
a/maven-plugin-report-plugin/src/it/plugin-info-jdk/requirement/pom.xml 
b/maven-plugin-report-plugin/src/it/plugin-info-jdk/requirement/pom.xml
deleted file mode 100644
index 96974c08..00000000
--- a/maven-plugin-report-plugin/src/it/plugin-info-jdk/requirement/pom.xml
+++ /dev/null
@@ -1,78 +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/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
-    <artifactId>parent</artifactId>
-    <version>1.0-SNAPSHOT</version>
-  </parent>
-  <artifactId>requirement</artifactId>
-  <name>target bytecode defined by report jdk requirement configuration</name>
-  <packaging>maven-plugin</packaging>
-
-  <properties><!-- will be overridden -->
-    <maven.compiler.source>1.3</maven.compiler.source>
-    <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
-  </properties>
-
-  <build>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-compiler-plugin</artifactId>
-          <configuration><!-- will be overridden -->
-            <source>1.4</source>
-            <target>1.4</target>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration><!-- will be overridden -->
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-plugin-report-plugin</artifactId>
-        <configuration>
-          <requirements>
-            <jdk>1.8</jdk>
-          </requirements>
-        </configuration>
-      </plugin>
-    </plugins>
-  </reporting>
-</project>
diff --git 
a/maven-plugin-report-plugin/src/it/plugin-info-jdk/requirement/src/main/resources/META-INF/maven/plugin-enhanced.xml
 
b/maven-plugin-report-plugin/src/it/plugin-info-jdk/requirement/src/main/resources/META-INF/maven/plugin-enhanced.xml
deleted file mode 100644
index 0c19b025..00000000
--- 
a/maven-plugin-report-plugin/src/it/plugin-info-jdk/requirement/src/main/resources/META-INF/maven/plugin-enhanced.xml
+++ /dev/null
@@ -1,69 +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.
--->
-
-<plugin>
-  <name>target bytecode defined by report jdk requirement configuration</name>
-  <description></description>
-  <groupId>org.apache.maven.its.plugin-info-jdk</groupId>
-  <artifactId>requirement</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <goalPrefix>requirement</goalPrefix>
-  <isolatedRealm>false</isolatedRealm>
-  <inheritedByDefault>true</inheritedByDefault>
-  <mojos>
-    <mojo>
-      <goal>touch</goal>
-      <description>Goal which touches a timestamp file.</description>
-      <requiresDirectInvocation>false</requiresDirectInvocation>
-      <requiresProject>true</requiresProject>
-      <requiresReports>false</requiresReports>
-      <aggregator>false</aggregator>
-      <requiresOnline>false</requiresOnline>
-      <inheritedByDefault>true</inheritedByDefault>
-      <phase>process-sources</phase>
-      
<implementation>org.apache.maven.plugins.issues.plugin.MyMojo</implementation>
-      <language>java</language>
-      <instantiationStrategy>per-lookup</instantiationStrategy>
-      <executionStrategy>once-per-session</executionStrategy>
-      <threadSafe>false</threadSafe>
-      <parameters>
-        <parameter>
-          <name>outputDirectory</name>
-          <type>java.io.File</type>
-          <required>true</required>
-          <editable>true</editable>
-          <description>Location of the file.</description>
-        </parameter>
-      </parameters>
-      <configuration>
-        <outputDirectory 
implementation="java.io.File">${project.build.directory}</outputDirectory>
-      </configuration>
-    </mojo>
-  </mojos>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-      <type>jar</type>
-      <version>2.0</version>
-    </dependency>
-  </dependencies>
-</plugin>
\ No newline at end of file
diff --git a/maven-plugin-report-plugin/src/it/plugin-info-jdk/verify.groovy 
b/maven-plugin-report-plugin/src/it/plugin-info-jdk/verify.groovy
index 947dded0..5afea34b 100644
--- a/maven-plugin-report-plugin/src/it/plugin-info-jdk/verify.groovy
+++ b/maven-plugin-report-plugin/src/it/plugin-info-jdk/verify.groovy
@@ -21,6 +21,5 @@ assert new File( basedir, 
'property/target/site/plugin-info.html' ).text.contain
 assert new File( basedir, 'propertyRelease/target/site/plugin-info.html' 
).text.contains( '<td>8</td>' )
 assert new File( basedir, 'pluginManagement/target/site/plugin-info.html' 
).text.contains( '<td>1.4</td>' )
 assert new File( basedir, 'plugin/target/site/plugin-info.html' 
).text.contains( '<td>1.5</td>' )
-assert new File( basedir, 'requirement/target/site/plugin-info.html' 
).text.contains( '<td>1.8</td>' )
 
-return true;
\ No newline at end of file
+return true;
diff --git a/maven-plugin-report-plugin/src/it/plugin-report/verify.groovy 
b/maven-plugin-report-plugin/src/it/plugin-report/verify.groovy
index 0da48db4..4e29ff06 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report/verify.groovy
+++ b/maven-plugin-report-plugin/src/it/plugin-report/verify.groovy
@@ -25,4 +25,5 @@ assert pluginInfo.isFile()
 
 assert !pluginInfo.text.contains('Memory')
 assert !pluginInfo.text.contains('Disk Space')
-assert !pluginInfo.text.contains('No minimum requirement.')
+// missing prerequisites in pom
+assert pluginInfo.text.contains('No minimum requirement.')
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 c865899c..63da351a 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
@@ -28,10 +28,12 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Optional;
 import java.util.ResourceBundle;
 
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.model.Plugin;
+import org.apache.maven.model.Prerequisites;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
@@ -73,85 +75,12 @@ public class PluginReport
 {
     /**
      * Report output directory for mojos' documentation.
+     *
+     * @since 3.7.0
      */
     @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.
-     *
-     * @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.
      *
@@ -189,23 +118,9 @@ public class PluginReport
     @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.7.0
-     * @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)
      *
@@ -241,7 +156,7 @@ public class PluginReport
     protected void executeReport( Locale locale )
         throws MavenReportException
     {
-        if ( skip || skipReport )
+        if ( skip  )
         {
             getLog().info( "Maven Plugin Plugin Report generation skipped." );
             return;
@@ -254,7 +169,7 @@ public class PluginReport
 
         // Write the overview
         PluginOverviewRenderer r =
-            new PluginOverviewRenderer( getProject(), requirements, 
requirementsHistories, getSink(),
+            new PluginOverviewRenderer( getProject(), requirementsHistories, 
getSink(),
                                         pluginDescriptor, locale, 
hasExtensionsToLoad );
         r.render();
     }
@@ -346,8 +261,6 @@ public class PluginReport
     {
         private final MavenProject project;
 
-        private final Requirements requirements;
-
         private final List<RequirementsHistory> requirementsHistories;
 
         private final PluginDescriptor pluginDescriptor;
@@ -358,13 +271,12 @@ public class PluginReport
 
         /**
          * @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,
+        PluginOverviewRenderer( MavenProject project,
                                 List<RequirementsHistory> 
requirementsHistories, Sink sink,
                                 PluginDescriptor pluginDescriptor, Locale 
locale, boolean hasExtensionsToLoad )
         {
@@ -372,8 +284,6 @@ public class PluginReport
 
             this.project = project;
 
-            this.requirements = ( requirements == null ? new Requirements() : 
requirements );
-
             this.requirementsHistories = requirementsHistories;
 
             this.pluginDescriptor = pluginDescriptor;
@@ -492,7 +402,7 @@ public class PluginReport
 
             startTable();
 
-            String maven = discoverMavenRequirement( project, requirements );
+            String maven = discoverMavenRequirement( project );
             sink.tableRow();
             tableCell( getBundle( locale ).getString( 
"report.plugin.systemrequirements.maven" ) );
             tableCell( ( maven != null
@@ -500,45 +410,13 @@ public class PluginReport
                 : getBundle( locale ).getString( 
"report.plugin.systemrequirements.nominimum" ) ) );
             sink.tableRow_();
 
-            String jdk = discoverJdkRequirement( project, requirements );
+            String jdk = discoverJdkRequirement( project );
             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();
@@ -668,25 +546,15 @@ public class PluginReport
 
         /**
          * 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
+         * @return the Maven version or null if not specified
          */
-        private static String discoverMavenRequirement( MavenProject project, 
Requirements requirements )
+        private static String discoverMavenRequirement( MavenProject project )
         {
-            String maven = requirements.getMaven();
-            if ( maven == null )
-            {
-                maven = ( project.getPrerequisites() != null ? 
project.getPrerequisites().getMaven() : null );
-            }
-            if ( maven == null )
-            {
-                maven = "2.0";
-            }
-
-            return maven;
+            return Optional.ofNullable( project.getPrerequisites() )
+                .map( Prerequisites::getMaven )
+                .orElse( null );
         }
 
         /**
@@ -699,17 +567,10 @@ public class PluginReport
          * </ol>
          *
          * @param project      not null
-         * @param requirements not null
          * @return the JDK version
          */
-        private static String discoverJdkRequirement( MavenProject project, 
Requirements requirements )
+        private static String discoverJdkRequirement( MavenProject project )
         {
-            String jdk = requirements.getJdk();
-
-            if ( jdk != null )
-            {
-                return jdk;
-            }
 
             Plugin compiler = getCompilerPlugin( 
project.getBuild().getPluginsAsMap() );
             if ( compiler == null )
@@ -717,7 +578,7 @@ public class PluginReport
                 compiler = getCompilerPlugin( 
project.getPluginManagement().getPluginsAsMap() );
             }
 
-            jdk = getPluginParameter( compiler, "release" );
+            String jdk = getPluginParameter( compiler, "release" );
             if ( jdk != null )
             {
                 return jdk;
@@ -742,8 +603,6 @@ public class PluginReport
                 return jdk;
             }
 
-            // return "1.5" by default?
-
             String version = ( compiler == null ) ? null : 
compiler.getVersion();
 
             if ( version != null )
@@ -751,7 +610,7 @@ public class PluginReport
                 return "Default target for maven-compiler-plugin version " + 
version;
             }
 
-            return "Unknown";
+            return null;
         }
 
         private static Plugin getCompilerPlugin( Map<String, Plugin> 
pluginsAsMap )
diff --git 
a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java
 
b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java
deleted file mode 100644
index 7e0b99e5..00000000
--- 
a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/Requirements.java
+++ /dev/null
@@ -1,94 +0,0 @@
-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.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 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-report-plugin/src/main/resources/plugin-report.properties 
b/maven-plugin-report-plugin/src/main/resources/plugin-report.properties
index 7d9c45b5..a483e7a0 100644
--- a/maven-plugin-report-plugin/src/main/resources/plugin-report.properties
+++ b/maven-plugin-report-plugin/src/main/resources/plugin-report.properties
@@ -34,9 +34,6 @@ report.plugin.systemrequirements.intro=The following 
specifies the minimum requi
 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
diff --git 
a/maven-plugin-report-plugin/src/main/resources/plugin-report_de.properties 
b/maven-plugin-report-plugin/src/main/resources/plugin-report_de.properties
index e87e5c07..9db52af4 100644
--- a/maven-plugin-report-plugin/src/main/resources/plugin-report_de.properties
+++ b/maven-plugin-report-plugin/src/main/resources/plugin-report_de.properties
@@ -34,9 +34,6 @@ report.plugin.systemrequirements.intro=Die folgende Tabelle 
listet die Mindestan
 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
diff --git 
a/maven-plugin-report-plugin/src/main/resources/plugin-report_fr.properties 
b/maven-plugin-report-plugin/src/main/resources/plugin-report_fr.properties
index 2ac7b3fb..bb94b168 100644
--- a/maven-plugin-report-plugin/src/main/resources/plugin-report_fr.properties
+++ b/maven-plugin-report-plugin/src/main/resources/plugin-report_fr.properties
@@ -34,9 +34,6 @@ report.plugin.systemrequirements.intro=Ce qui suit 
sp\u00E9cifie les exigences m
 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
diff --git 
a/maven-plugin-report-plugin/src/main/resources/plugin-report_sv.properties 
b/maven-plugin-report-plugin/src/main/resources/plugin-report_sv.properties
index 0e806e49..f534e8d2 100644
--- a/maven-plugin-report-plugin/src/main/resources/plugin-report_sv.properties
+++ b/maven-plugin-report-plugin/src/main/resources/plugin-report_sv.properties
@@ -34,9 +34,6 @@ report.plugin.systemrequirements.intro=F\u00F6ljande 
minimikrav st\u00E4lls f\u0
 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

Reply via email to