You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2013/03/24 09:44:25 UTC

svn commit: r1460285 - /maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java

Author: hboutemy
Date: Sun Mar 24 08:44:25 2013
New Revision: 1460285

URL: http://svn.apache.org/r1460285
Log:
code simplification

Modified:
    maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java

Modified: maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java?rev=1460285&r1=1460284&r2=1460285&view=diff
==============================================================================
--- maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java (original)
+++ maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java Sun Mar 24 08:44:25 2013
@@ -68,13 +68,13 @@ import org.sonatype.aether.util.filter.E
  * </p>
  * <p>
  *   <b>Note</b> if no version is defined in the report plugin, the version will be searched
- *   with method {@link #getPluginVersion(ReportPlugin, RepositoryRequest, MavenReportExecutorRequest)}
+ *   with method {@link #getPluginVersion(ReportPlugin, MavenReportExecutorRequest)}
  *   Steps to find a plugin version stop after each step if a non <code>null</code> value has been found:
  *   <ol>
  *     <li>use the one defined in the reportPlugin configuration,</li>
  *     <li>search similar (same groupId and artifactId) mojo in the build/plugins section of the pom,</li>
  *     <li>search similar (same groupId and artifactId) mojo in the build/pluginManagement section of the pom,</li>
- *     <li>ask {@link PluginVersionResolver} to get a version and display a warning as it's not a recommended use.</li>  
+ *     <li>ask {@link PluginVersionResolver} to get a fallback version and display a warning as it's not a recommended use.</li>  
  *   </ol>
  * </p>
  * <p>
@@ -178,7 +178,7 @@ public class DefaultMavenReportExecutor
         repositoryRequest.setLocalRepository( mavenReportExecutorRequest.getLocalRepository() );
         repositoryRequest.setRemoteRepositories( mavenReportExecutorRequest.getProject().getPluginArtifactRepositories() );
 
-        plugin.setVersion( getPluginVersion( reportPlugin, repositoryRequest, mavenReportExecutorRequest ) );
+        plugin.setVersion( getPluginVersion( reportPlugin, mavenReportExecutorRequest ) );
 
         mergePluginToReportPlugin( mavenReportExecutorRequest, plugin, reportPlugin );
 
@@ -442,20 +442,18 @@ public class DefaultMavenReportExecutor
      * Resolve report plugin version. 
      * Steps to find a plugin version stop after each step if a non <code>null</code> value has been found:
      * <ol>
-     *   <li>use the one defined in the reportPlugin configuration</li>
-     *   <li>search similar (same groupId and artifactId) mojo in the build/plugins section of the pom</li>
-     *   <li>search similar (same groupId and artifactId) mojo in the build/pluginManagement section of the pom</li>
-     *   <li>ask {@link PluginVersionResolver} to get a version and display a warning as it's not a recommended use</li>  
+     *   <li>use the one defined in the reportPlugin configuration,</li>
+     *   <li>search similar (same groupId and artifactId) mojo in the build/plugins section of the pom,</li>
+     *   <li>search similar (same groupId and artifactId) mojo in the build/pluginManagement section of the pom,</li>
+     *   <li>ask {@link PluginVersionResolver} to get a fallback version and display a warning as it's not a recommended use.</li>  
      * </ol>
      *
      * @param reportPlugin the report plugin to resolve the version
-     * @param repositoryRequest TODO: unused, to be removed?
      * @param mavenReportExecutorRequest the current report execution context
      * @return the report plugin version
      * @throws PluginVersionResolutionException
      */
-    protected String getPluginVersion( ReportPlugin reportPlugin, RepositoryRequest repositoryRequest,
-                                       MavenReportExecutorRequest mavenReportExecutorRequest )
+    protected String getPluginVersion( ReportPlugin reportPlugin, MavenReportExecutorRequest mavenReportExecutorRequest )
         throws PluginVersionResolutionException
     {
         String reportPluginKey = reportPlugin.getGroupId() + ':' + reportPlugin.getArtifactId();