maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1090629 - /maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/
Date Sat, 09 Apr 2011 17:00:25 GMT
Author: hboutemy
Date: Sat Apr  9 17:00:25 2011
New Revision: 1090629

URL: http://svn.apache.org/viewvc?rev=1090629&view=rev
Log:
improved javadoc

Modified:
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutor.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutorRequest.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportPlugin.java
    maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportSet.java

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java?rev=1090629&r1=1090628&r2=1090629&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
Sat Apr  9 17:00:25 2011
@@ -29,7 +29,6 @@ import java.util.TreeMap;
 
 import org.apache.maven.artifact.repository.DefaultRepositoryRequest;
 import org.apache.maven.artifact.repository.RepositoryRequest;
-import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.lifecycle.LifecycleExecutor;
 import org.apache.maven.model.Plugin;
@@ -61,41 +60,33 @@ import org.sonatype.aether.repository.Re
 import org.sonatype.aether.util.filter.ExclusionsDependencyFilter;
 
 /**
- * <p>
- *   This component will build some {@link MavenReportExecution} from {@link MavenReportExecutorRequest}.
- *   If a {@link MavenReport} need to fork a lifecycle, this fork is executed here. 
- *   It will ask the core to get some informations in order to correctly setup {@link MavenReport}.
- * </p>
- * <p>
- *   <b>Note</b> if no version is defined in the report plugin the version will
be search 
- *   with method {@link #getPluginVersion(ReportPlugin, RepositoryRequest, MavenReportExecutorRequest)}
- *   Steps to find a plugin version stop after each step if a non <code>null</code>
value has been found:
- *   <ul>
- *     <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>  
- *   </ul>
- * </p>
- * <p>
- *   Following steps are done
- *   <ul>
- *     <li>get {@link PluginDescriptor} from the {@link MavenPluginManager#getPluginDescriptor(Plugin,
RepositoryRequest)}</li>
- *     <li>setup a {@link ClassLoader} with the Mojo Site plugin {@link ClassLoader}
as parent for the report execution. 
- *       You must note some classes are imported from the current Site Mojo {@link ClassRealm}
see {@link #IMPORTS}.
- *       The artifact resolution excludes the following artifacts (with using an {@link ExclusionSetFilter}:

- *       doxia-site-renderer, doxia-sink-api, maven-reporting-api.
- *       done using {@link MavenPluginManager#setupPluginRealm(PluginDescriptor, org.apache.maven.execution.MavenSession,
ClassLoader, List, org.apache.maven.artifact.resolver.filter.ArtifactFilter)}
- *     </li>
- *     <li>
- *       setup the mojo using {@link MavenPluginManager#getConfiguredMojo(Class, org.apache.maven.execution.MavenSession,
MojoExecution)}
- *     </li>
- *     <li>
- *       verify with {@link LifecycleExecutor#calculateForkedExecutions(MojoExecution, org.apache.maven.execution.MavenSession)}
- *       if any forked execution is needed: if yes executes the forked execution here
- *     </li>
- *   </ul>
- * </p>
+ * This component builds some {@link MavenReportExecution} from {@link MavenReportExecutorRequest}.
+ * If a {@link MavenReport} need to fork a lifecycle, this fork is executed here. 
+ * The component asks the core to get some informations on the plugin configuration in order
to correctly setup
+ * the {@link MavenReport}.
+ * 
+ * <h3>version resolution</h3>
+ * If no version is defined for the report plugin, the version will be searched 
+ * with {@link #getPluginVersion(ReportPlugin, RepositoryRequest, MavenReportExecutorRequest)}
method.
+ * 
+ * <h3>component execution</h3>
+ * Following steps are executed:
+ * <ul>
+ *   <li>get {@link PluginDescriptor} from the {@link MavenPluginManager#getPluginDescriptor(Plugin,
RepositoryRequest)} core method</li>
+ *   <li>setup a {@link ClassLoader} with the Maven Site plugin {@link ClassLoader}
as parent for the report execution,
+ *     using {@link MavenPluginManager#setupPluginRealm(PluginDescriptor, org.apache.maven.execution.MavenSession,
ClassLoader, List, org.apache.maven.artifact.resolver.filter.ArtifactFilter)} 
+ *     Note that some classes are imported from the current Site Mojo {@link ClassRealm}
- see {@link #IMPORTS},
+ *     and the artifact resolution excludes some artifacts - see {@link #EXCLUDES}.
+ *   </li>
+ *   <li>
+ *     setup the mojo using {@link MavenPluginManager#getConfiguredMojo(Class, org.apache.maven.execution.MavenSession,
MojoExecution)}
+ *   </li>
+ *   <li>
+ *     verify with {@link LifecycleExecutor#calculateForkedExecutions(MojoExecution, org.apache.maven.execution.MavenSession)}
+ *     if any forked execution is needed: if yes, execute the forked execution here
+ *   </li>
+ * </ul>
+ * 
  * @author Olivier Lamy
  * @since 3.0-beta-1
  */
@@ -115,15 +106,15 @@ public class DefaultMavenReportExecutor
     @Requirement
     protected PluginVersionResolver pluginVersionResolver;
 
-    private static final List<String> IMPORTS = Arrays.asList( "org.apache.maven.reporting.MavenReport",
-                                                               "org.apache.maven.reporting.MavenMultiPageReport",
-                                                               "org.apache.maven.doxia.siterenderer.Renderer",
-                                                               "org.apache.maven.doxia.sink.SinkFactory",
-                                                               "org.codehaus.doxia.sink.Sink",
-                                                               "org.apache.maven.doxia.sink.Sink",
-                                                               "org.apache.maven.doxia.sink.SinkEventAttributes"
);
+    protected static final List<String> IMPORTS = Arrays.asList( "org.apache.maven.reporting.MavenReport",
+                                                                 "org.apache.maven.reporting.MavenMultiPageReport",
+                                                                 "org.apache.maven.doxia.siterenderer.Renderer",
+                                                                 "org.apache.maven.doxia.sink.SinkFactory",
+                                                                 "org.codehaus.doxia.sink.Sink",
+                                                                 "org.apache.maven.doxia.sink.Sink",
+                                                                 "org.apache.maven.doxia.sink.SinkEventAttributes"
);
 
-    private static final ExclusionsDependencyFilter EXCLUDES =
+    protected static final ExclusionsDependencyFilter EXCLUDES =
         new ExclusionsDependencyFilter( Arrays.asList( "doxia-site-renderer", "doxia-sink-api",
"maven-reporting-api" ) );
 
     public List<MavenReportExecution> buildMavenReports( MavenReportExecutorRequest
mavenReportExecutorRequest )
@@ -437,13 +428,13 @@ 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:
+     * Resolve report plugin version.
+     * These steps are followed, stopping 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 <code>reportPlugin</code> configuration,</li>
+     *   <li>search similar (same groupId and artifactId) mojo in the <code>build/plugins</code>
section of the pom,</li>
+     *   <li>search similar (same groupId and artifactId) mojo in the <code>build/pluginManagement</code>
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>  
      * </ol>
      *
      * @param reportPlugin the report plugin to resolve the version

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java?rev=1090629&r1=1090628&r2=1090629&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecution.java
Sat Apr  9 17:00:25 2011
@@ -23,22 +23,18 @@ import org.apache.maven.model.Plugin;
 import org.apache.maven.reporting.MavenReport;
 
 /**
- * <p>
- *   Since maven 3 reporting plugin {@link MavenReport} are not anymore injected by maven
core
- *   This class will store all necessary information for {@link MavenReport} execution :
- *   <ul>
- *     <li>a build {@link MavenReport}</li>
- *     <li>The associated {@link ClassLoader} for the Report Mojo execution</li>
- *     <li>The {@link Plugin} associated to the {@link MavenReport}</li>
- *   </ul> 
- * </p>
- * <p>
- *   With this it's possible to execute the {@link MavenReport} generate with settings
- *   the current {@link Thread} classLoader first with {@link #classLoader}
- * </p>
- * <p>
- *   This beans will be build by {@link MavenReportExecutor}.
- * </p>
+ * Since reporting plugin {@link MavenReport} are not any more injected by Maven 3 core,
+ * this class stores every necessary information for {@link MavenReport} execution:
+ * <ul>
+ *   <li>a build {@link MavenReport}</li>
+ *   <li>The associated {@link ClassLoader} for the Report Mojo execution</li>
+ *   <li>The {@link Plugin} associated to the {@link MavenReport}</li>
+ * </ul>
+ *  
+ * With this it's possible to execute the {@link MavenReport} generate with settings
+ * the current {@link Thread} classLoader first with {@link #classLoader}
+ *
+ * This beans is built by {@link MavenReportExecutor}.
  * 
  * @author Olivier Lamy
  * @since 3.0-beta-1

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutor.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutor.java?rev=1090629&r1=1090628&r2=1090629&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutor.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutor.java
Sat Apr  9 17:00:25 2011
@@ -22,8 +22,12 @@ package org.apache.maven.reporting.exec;
 import java.util.List;
 
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.reporting.MavenReport;
 
 /**
+ * This component builds some {@link MavenReportExecution} from {@link MavenReportExecutorRequest}.
+ * If a {@link MavenReport} need to fork a lifecycle, this fork is executed here. 
+ * The component asks the core to get some informations on the plugin configuration in order
to correctly setup {@link MavenReport}.
  *
  * @author Olivier Lamy
  * @since 3.0-beta-1

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutorRequest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutorRequest.java?rev=1090629&r1=1090628&r2=1090629&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutorRequest.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/MavenReportExecutorRequest.java
Sat Apr  9 17:00:25 2011
@@ -24,11 +24,10 @@ import org.apache.maven.execution.MavenS
 import org.apache.maven.project.MavenProject;
 
 /**
- * <p>
- *   Bean which contains necessay informations for build {@link MavenReportExecution} 
- *   with {@link MavenReportExecutor}.
- *   The goal is to store some informations regarding the current maven execution.
- * </p>
+ * Bean which contains necessary informations to build {@link MavenReportExecution} 
+ * with {@link MavenReportExecutor}.
+ * The rationale is to store some informations regarding the current Maven execution.
+ *
  * @author <a href="mailto:olamy@apache.org">olamy</a>
  * @since 3.0-beta-1
  * @version $Id$

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportPlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportPlugin.java?rev=1090629&r1=1090628&r2=1090629&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportPlugin.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportPlugin.java
Sat Apr  9 17:00:25 2011
@@ -27,10 +27,9 @@ import org.apache.maven.model.Plugin;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 
 /**
- * <p>
  * Represents a reporting plugin and its executions. It basically contains similar informations
- * as a {@link Plugin} but in order to decoupled reporting stuff from core some values are
copied.
- * </p>
+ * as a {@link Plugin} but in order to decoupled reporting stuff from core, some values are
copied.
+ *
  * @since 3.0-beta-1
  */
 public class ReportPlugin

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportSet.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportSet.java?rev=1090629&r1=1090628&r2=1090629&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportSet.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/reporting/exec/ReportSet.java
Sat Apr  9 17:00:25 2011
@@ -26,6 +26,7 @@ import org.codehaus.plexus.configuration
 
 /**
  * Represents a set of reports and configuration to be used to generate them.
+ * 
  * @since 3.0-beta-1
  */
 public class ReportSet



Mime
View raw message