maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r680865 - in /maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc: AbstractJavadocMojo.java TestJavadocReport.java
Date Tue, 29 Jul 2008 22:29:30 GMT
Author: vsiveton
Date: Tue Jul 29 15:29:29 2008
New Revision: 680865

URL: http://svn.apache.org/viewvc?rev=680865&view=rev
Log:
MJAVADOC-202: Links ../apidocs from javadoc:javadoc to javadoc:test-javadoc

o links to apidocs
o Note: the prerequisite is that the main report is in apidocs

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java?rev=680865&r1=680864&r2=680865&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
Tue Jul 29 15:29:29 2008
@@ -804,7 +804,7 @@
      *
      * @parameter expression="${links}"
      */
-    private ArrayList links;
+    protected ArrayList links;
 
     /**
      * This option is a variation of -link; they both create links to javadoc-generated documentation
for external

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java?rev=680865&r1=680864&r2=680865&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
Tue Jul 29 15:29:29 2008
@@ -27,6 +27,8 @@
 import java.util.ResourceBundle;
 
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -137,6 +139,25 @@
     // ----------------------------------------------------------------------
 
     /** {@inheritDoc} */
+    public void execute()
+        throws MojoExecutionException, MojoFailureException
+    {
+        if ( links == null )
+        {
+            links = new ArrayList();
+        }
+
+        // TODO the prerequisite is that the main report is in apidocs
+        File apidocs = new File( getReportOutputDirectory().getParentFile(), "apidocs" );
+        if ( apidocs.exists() && apidocs.isDirectory() && !links.contains(
"../apidocs" ) )
+        {
+            links.add( "../apidocs" );
+        }
+
+        super.execute();
+    }
+
+    /** {@inheritDoc} */
     public String getName( Locale locale )
     {
         if ( StringUtils.isEmpty( testName ) )



Mime
View raw message