You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2009/07/16 23:59:46 UTC

svn commit: r794885 [1/2] - in /maven/plugins/trunk/maven-javadoc-plugin/src: main/java/org/apache/maven/plugin/javadoc/ site/ site/apt/examples/ test/java/org/apache/maven/plugin/javadoc/ test/java/org/apache/maven/plugin/javadoc/stubs/ test/resources...

Author: vsiveton
Date: Thu Jul 16 21:59:44 2009
New Revision: 794885

URL: http://svn.apache.org/viewvc?rev=794885&view=rev
Log:
MJAVADOC-216: Stylesheet file loaded from classpath
MJAVADOC-239: Helpfile loaded from classpath

o added a feature to load resource from a project directories (i.e. src/main/java, src/main/resources or src/main/javadoc) and from javadoc plugin dependencies
o added test cases
o added/updated documentation

Added:
    maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.jar   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/com/mycompany/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/com/mycompany/app/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/com/mycompany/app/javadoc/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/com/mycompany/app/javadoc/helpfile2/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/resources/com/mycompany/app/javadoc/helpfile2/help-doc.html   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/maven-metadata-local.xml   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/stylesheetfile-test-1.0-SNAPSHOT.jar   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/1.0-SNAPSHOT/stylesheetfile-test-1.0-SNAPSHOT.pom   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/stylesheetfile-test/maven-metadata-local.xml   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/pom.xml   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/java/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/java/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/java/com/mycompany/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/java/com/mycompany/app/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/java/com/mycompany/app/App.java   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/javadoc/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/javadoc/css/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/javadoc/css/stylesheet.css   (with props)
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/javadoc/css3/
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/javadoc/css3/stylesheet.css   (with props)
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/JavadocUtil.java
    maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/stylesheet-configuration.apt
    maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/jdk5-test/jdk5-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/jdk6-test/jdk6-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/newline-test/newline-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/pom-test/pom-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/proxy-test/proxy-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/resources-test/resources-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/resources-with-excludes-test/resources-with-excludes-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/tag-test/tag-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/validate-options-test/conflict-options-test-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/validate-options-test/wrong-encoding-test-plugin-config.xml

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=794885&r1=794884&r2=794885&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 Thu Jul 16 21:59:44 2009
@@ -20,11 +20,12 @@
  */
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLClassLoader;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;
@@ -55,6 +56,9 @@
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.execution.MavenSession;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.Resource;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.DefaultPluginManager;
 import org.apache.maven.plugin.javadoc.options.BootclasspathArtifact;
@@ -81,7 +85,6 @@
 import org.codehaus.plexus.archiver.manager.ArchiverManager;
 import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
@@ -852,6 +855,40 @@
      * <br/>
      * <b>Note</b>: could be in conflict with &lt;nohelp/&gt;.
      * <br/>
+     * The <code>helpfile</code> could be an absolute File path.
+     * <br/>
+     * Since 2.6, it could be also be a path from a resource in the current project source directories
+     * (i.e. <code>src/main/java</code>, <code>src/main/resources</code> or <code>src/main/javadoc</code>)
+     *  or from a resource in the Javadoc plugin dependencies, for instance:
+     * <pre>
+     * &lt;helpfile&gt;path/to/your/resource/yourhelp-doc.html&lt;/helpfile&gt;
+     * </pre>
+     * Where <code>path/to/your/resource/yourhelp-doc.html</code> could be in <code>src/main/javadoc</code>.
+     * <pre>
+     * &lt;build&gt;
+     *   &lt;plugins&gt;
+     *     &lt;plugin&gt;
+     *       &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+     *       &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
+     *       &lt;configuration&gt;
+     *         &lt;stylesheetfile&gt;path/to/your/resource/yourhelp-doc.html&lt;/stylesheetfile&gt;
+     *         ...
+     *       &lt;/configuration&gt;
+     *       &lt;dependencies&gt;
+     *         &lt;dependency&gt;
+     *           &lt;groupId&gt;groupId&lt;/groupId&gt;
+     *           &lt;artifactId&gt;artifactId&lt;/artifactId&gt;
+     *           &lt;version&gt;version&lt;/version&gt;
+     *         &lt;/dependency&gt;
+     *       &lt;/dependencies&gt;
+     *     &lt;/plugin&gt;
+     *     ...
+     *   &lt;plugins&gt;
+     * &lt;/build&gt;
+     * </pre>
+     * Where <code>path/to/your/resource/yourhelp-doc.html</code> is defined in the
+     * <code>groupId:artifactId:version</code> javadoc plugin dependency.
+     * <br/>
      * See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#helpfile">helpfile</a>.
      *
      * @parameter expression="${helpfile}"
@@ -1109,8 +1146,10 @@
     private boolean splitindex;
 
     /**
-     * Specifies whether the stylesheet to be used is the maven javadoc stylesheet or java's default stylesheet
-     * when a <i>stylesheetfile</i> parameter is not specified. Possible values: "maven" or "java".
+     * Specifies whether the stylesheet to be used is the <code>maven</code>'s javadoc stylesheet or
+     * <code>java</code>'s default stylesheet when a <i>stylesheetfile</i> parameter is not specified.
+     * <br/>
+     * Possible values: <code>maven<code> or <code>java</code>.
      * <br/>
      *
      * @parameter expression="${stylesheet}" default-value="java"
@@ -1120,6 +1159,40 @@
     /**
      * Specifies the path of an alternate HTML stylesheet file.
      * <br/>
+     * The <code>stylesheetfile</code> could be an absolute File path.
+     * <br/>
+     * Since 2.6, it could be also be a path from a resource in the current project source directories
+     * (i.e. <code>src/main/java</code>, <code>src/main/resources</code> or <code>src/main/javadoc</code>)
+     *  or from a resource in the Javadoc plugin dependencies, for instance:
+     * <pre>
+     * &lt;stylesheetfile&gt;path/to/your/resource/yourstylesheet.css&lt;/stylesheetfile&gt;
+     * </pre>
+     * Where <code>path/to/your/resource/yourstylesheet.css</code> could be in <code>src/main/javadoc</code>.
+     * <pre>
+     * &lt;build&gt;
+     *   &lt;plugins&gt;
+     *     &lt;plugin&gt;
+     *       &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+     *       &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
+     *       &lt;configuration&gt;
+     *         &lt;stylesheetfile&gt;path/to/your/resource/yourstylesheet.css&lt;/stylesheetfile&gt;
+     *         ...
+     *       &lt;/configuration&gt;
+     *       &lt;dependencies&gt;
+     *         &lt;dependency&gt;
+     *           &lt;groupId&gt;groupId&lt;/groupId&gt;
+     *           &lt;artifactId&gt;artifactId&lt;/artifactId&gt;
+     *           &lt;version&gt;version&lt;/version&gt;
+     *         &lt;/dependency&gt;
+     *       &lt;/dependencies&gt;
+     *     &lt;/plugin&gt;
+     *     ...
+     *   &lt;plugins&gt;
+     * &lt;/build&gt;
+     * </pre>
+     * Where <code>path/to/your/resource/yourstylesheet.css</code> is defined in the
+     * <code>groupId:artifactId:version</code> javadoc plugin dependency.
+     * <br/>
      * See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#stylesheetfile">
      * stylesheetfile</a>.
      *
@@ -2052,21 +2125,67 @@
     }
 
     /**
-     * Method to get the stylesheet path file to be used in the javadocs. If a custom stylesheet file is not specified,
-     * either the stylesheet included in the plugin or the stylesheet file used by the javadoc tool will be used.
+     * Method to get the stylesheet path file to be used by the Javadoc Tool.
+     * <br/>
+     * If the {@link #stylesheetfile} is empty, return the file as String definded by {@link #stylesheet} value.
+     * <br/>
+     * If the {@link #stylesheetfile} is defined, return the file as String.
+     * <br/>
+     * Note: since 2.6, the {@link #stylesheetfile} could be a path from a resource in the project source
+     * directories (i.e. <code>src/main/java</code>, <code>src/main/resources</code> or <code>src/main/javadoc</code>)
+     * or from a resource in the Javadoc plugin dependencies.
+     *
+     * @param javadocOutputDirectory the output directory
+     * @return the stylesheet file absolute path as String.
+     * @see #getResource(List, String)
+     */
+    private String getStylesheetFile( final File javadocOutputDirectory )
+    {
+        if ( StringUtils.isEmpty( stylesheetfile ) )
+        {
+            if ( "java".equalsIgnoreCase( stylesheet ) )
+            {
+                // use the default Javadoc tool stylesheet
+                return null;
+            }
+
+            // maven, see #copyDefaultStylesheet(File)
+            return new File( javadocOutputDirectory, DEFAULT_CSS_NAME ).getAbsolutePath();
+        }
+
+        if ( new File( stylesheetfile ).exists() )
+        {
+            return new File( stylesheetfile ).getAbsolutePath();
+        }
+
+        return getResource( new File( javadocOutputDirectory, DEFAULT_CSS_NAME ), stylesheetfile );
+    }
+
+    /**
+     * Method to get the help file to be used by the Javadoc Tool.
+     * <br/>
+     * Since 2.6, the {@link #helpfile} could be a path from a resource in the project source
+     * directories (i.e. <code>src/main/java</code>, <code>src/main/resources</code> or <code>src/main/javadoc</code>)
+     * or from a resource in the Javadoc plugin dependencies.
      *
-     * @param javadocOutputDirectory the base directory of the plugin
-     * @return a String that contains the path to the stylesheet file
+     * @param javadocOutputDirectory the output directory.
+     * @return the help file absolute path as String.
+     * @since 2.6
+     * @see #getResource(File, String)
      */
-    private String getStylesheetFile( File javadocOutputDirectory )
+    private String getHelpFile( final File javadocOutputDirectory )
     {
-        String stylesheetfilePath = this.stylesheetfile;
-        if ( StringUtils.isEmpty( stylesheetfilePath ) && "maven".equals( stylesheet ) )
+        if ( StringUtils.isEmpty( helpfile ) )
+        {
+            return null;
+        }
+
+        if ( new File( helpfile ).exists() )
         {
-            stylesheetfilePath = javadocOutputDirectory + File.separator + DEFAULT_CSS_NAME;
+            return new File( helpfile ).getAbsolutePath();
         }
 
-        return stylesheetfilePath;
+        return getResource( new File( javadocOutputDirectory, "help-doc.html" ), helpfile );
     }
 
     /**
@@ -2993,19 +3112,6 @@
     }
 
     /**
-     * Returns an input stream for reading the specified resource from the
-     * current class loader.
-     *
-     * @param resource the resource
-     * @return InputStream An input stream for reading the resource, or <tt>null</tt>
-     * if the resource could not be found
-     */
-    private InputStream getStream( String resource )
-    {
-        return getClass().getClassLoader().getResourceAsStream( resource );
-    }
-
-    /**
      * Coppy all resources to the output directory
      *
      * @param javadocOutputDirectory not null
@@ -3058,42 +3164,31 @@
     }
 
     /**
-     * Method that copy the <code>DEFAULT_STYLESHEET_NAME</code> file from the current class
-     * loader to the <code>outputDirectory</code>.
+     * Copies the {@link #DEFAULT_CSS_NAME} css file from the current class
+     * loader to the <code>outputDirectory</code> only if {@link #stylesheetfile} is empty and
+     * {@link #stylesheet} is equals to <code>maven</code>.
      *
      * @param anOutputDirectory the output directory
      * @throws java.io.IOException if any
      * @see #DEFAULT_CSS_NAME
+     * @see #copyResource(File, URL)
      */
     private void copyDefaultStylesheet( File anOutputDirectory )
         throws IOException
     {
-        if ( anOutputDirectory == null || !anOutputDirectory.exists() )
-        {
-            throw new IOException( "The outputDirectory " + anOutputDirectory + " doesn't exists." );
-        }
-
-        InputStream is = getStream( RESOURCE_CSS_DIR + "/" + DEFAULT_CSS_NAME );
-
-        if ( is == null )
+        if ( StringUtils.isNotEmpty( stylesheetfile ) )
         {
-            throw new IOException( "The resource " + DEFAULT_CSS_NAME + " doesn't exists." );
+            return;
         }
 
-        File outputFile = new File( anOutputDirectory, DEFAULT_CSS_NAME );
-
-        if ( !outputFile.getParentFile().exists() )
+        if ( !stylesheet.equalsIgnoreCase( "maven" ) )
         {
-            outputFile.getParentFile().mkdirs();
+            return;
         }
 
-        FileOutputStream w = new FileOutputStream( outputFile );
-
-        IOUtil.copy( is, w );
-
-        IOUtil.close( is );
-
-        IOUtil.close( w );
+        URL url = getClass().getClassLoader().getResource( RESOURCE_CSS_DIR + "/" + DEFAULT_CSS_NAME );
+        File outFile = new File( anOutputDirectory, DEFAULT_CSS_NAME );
+        JavadocUtil.copyResource( url, outFile );
     }
 
     /**
@@ -3447,10 +3542,6 @@
         {
             throw new MavenReportException( "Option <nohelp/> conflicts with <helpfile/>" );
         }
-        if ( ( StringUtils.isNotEmpty( helpfile ) ) && ( !new File( helpfile ).exists() ) )
-        {
-            throw new MavenReportException( "File not found: " + helpfile );
-        }
 
         // overview
         if ( ( getOverview() != null ) && nooverview )
@@ -3463,6 +3554,13 @@
         {
             throw new MavenReportException( "Option <noindex/> conflicts with <splitindex/>" );
         }
+
+        // stylesheet
+        if ( StringUtils.isNotEmpty( stylesheet )
+            && !( stylesheet.equalsIgnoreCase( "maven" ) || stylesheet.equalsIgnoreCase( "java" ) ) )
+        {
+            throw new MavenReportException( "Option <stylesheet/> supports only \"maven\" or \"java\" value." );
+        }
     }
 
     /**
@@ -3517,8 +3615,7 @@
      * @param arguments not null
      * @param sourcePaths not null
      * @throws MavenReportException if any
-     * @see <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#javadocoptions">
-     * http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#javadocoptions</a>
+     * @see <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#javadocoptions">http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#javadocoptions</a>
      */
     private void addJavadocOptions( List arguments, List sourcePaths )
         throws MavenReportException
@@ -3650,7 +3747,8 @@
 
         addArgIfNotEmpty( arguments, "-header", JavadocUtil.quotedArgument( header ), false, false );
 
-        addArgIfNotEmpty( arguments, "-helpfile", JavadocUtil.quotedPathArgument( helpfile ) );
+        addArgIfNotEmpty( arguments, "-helpfile",
+                          JavadocUtil.quotedPathArgument( getHelpFile( javadocOutputDirectory ) ) );
 
         addArgIf( arguments, keywords, "-keywords", SINCE_JAVADOC_1_4_2 );
 
@@ -4027,4 +4125,133 @@
             }
         }
     }
+
+    /**
+     * @param outputFile not nul
+     * @param inputResourceName a not null resource in <code>src/main/java</code>, <code>src/main/resources</code> or <code>src/main/javadoc</code>
+     * or in the Javadoc plugin dependencies.
+     * @return the resource file absolute path as String
+     * @since 2.6
+     */
+    private String getResource( File outputFile, String inputResourceName )
+    {
+        if ( inputResourceName.startsWith( "/" ) )
+        {
+            inputResourceName = inputResourceName.replaceFirst( "//*", "" );
+        }
+
+        List classPath = new ArrayList();
+        classPath.add( project.getBuild().getSourceDirectory() );
+
+        URL resourceURL = getResource( classPath, inputResourceName );
+        if ( resourceURL != null )
+        {
+            getLog().debug( inputResourceName + " found in the main src directory of the project." );
+            return resourceURL.getFile();
+        }
+
+        classPath.clear();
+        for ( Iterator it = project.getBuild().getResources().iterator(); it.hasNext(); )
+        {
+            Resource resource = (Resource) it.next();
+
+            classPath.add( resource.getDirectory() );
+        }
+        resourceURL = getResource( classPath, inputResourceName );
+        if ( resourceURL != null )
+        {
+            getLog().debug( inputResourceName + " found in the main resources directories of the project." );
+            return resourceURL.getFile();
+        }
+
+        if ( javadocDirectory.exists() )
+        {
+            classPath.clear();
+            classPath.add( javadocDirectory.getAbsolutePath() );
+            resourceURL = getResource( classPath, inputResourceName );
+            if ( resourceURL != null )
+            {
+                getLog().debug( inputResourceName + " found in the main javadoc directory of the project." );
+                return resourceURL.getFile();
+            }
+        }
+
+        classPath.clear();
+        Plugin javadocPlugin =
+            (Plugin) project.getBuild().getPluginsAsMap().get( "org.apache.maven.plugins:maven-javadoc-plugin" );
+        if ( javadocPlugin != null && javadocPlugin.getDependencies() != null )
+        {
+            for ( Iterator it = javadocPlugin.getDependencies().iterator(); it.hasNext(); )
+            {
+                Dependency dependency = (Dependency) it.next();
+
+                JavadocPathArtifact javadocPathArtifact = new JavadocPathArtifact();
+                javadocPathArtifact.setGroupId( dependency.getGroupId() );
+                javadocPathArtifact.setArtifactId( dependency.getArtifactId() );
+                javadocPathArtifact.setVersion( dependency.getVersion() );
+                Artifact artifact = null;
+                try
+                {
+                    artifact = createAndResolveArtifact( javadocPathArtifact );
+                }
+                catch ( Exception e )
+                {
+                    getLog().error( "Unable to retrieve the dependency: " + dependency + ". Ignored." );
+                }
+
+                if ( artifact != null && artifact.getFile().exists() )
+                {
+                    classPath.add( artifact.getFile().getAbsolutePath() );
+                }
+            }
+            resourceURL = getResource( classPath, inputResourceName );
+            if ( resourceURL != null )
+            {
+                getLog().debug( inputResourceName + " found in javadoc plugin dependencies." );
+                try
+                {
+                    JavadocUtil.copyResource( resourceURL, outputFile );
+
+                    return outputFile.getAbsolutePath();
+                }
+                catch ( IOException e )
+                {
+                    getLog().error( "IOException: " + e.getMessage() );
+                }
+            }
+        }
+
+        getLog()
+                .warn( "Unable to find the resource '" + inputResourceName + "'. Using default Javadoc resources." );
+
+        return null;
+    }
+
+    /**
+     * @param classPath a not null class path list where resource will be look up.
+     * @param resource a not null ressource to find in the class path.
+     * @return the resource from the given classpath or null if not found
+     * @see ClassLoader#getResource(String)
+     * @since 2.6
+     */
+    private URL getResource( final List classPath, final String resource )
+    {
+        List urls = new ArrayList( classPath.size() );
+        Iterator iter = classPath.iterator();
+        while ( iter.hasNext() )
+        {
+            try
+            {
+                urls.add( new File( ( (String) iter.next() ) ).toURL() );
+            }
+            catch ( MalformedURLException e )
+            {
+                getLog().error( "MalformedURLException: " + e.getMessage() );
+            }
+        }
+
+        ClassLoader javadocClassLoader = new URLClassLoader( (URL[]) urls.toArray( new URL[urls.size()] ), null );
+
+        return javadocClassLoader.getResource( resource );
+    }
 }

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=794885&r1=794884&r2=794885&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java Thu Jul 16 21:59:44 2009
@@ -23,6 +23,7 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -886,6 +887,52 @@
         return tagletClasses;
     }
 
+    /**
+     * Copy the given url to the given file.
+     *
+     * @param url not null url
+     * @param file not null file where the url will be created
+     * @throws IOException if any
+     * @since 2.6
+     */
+    protected static void copyResource( URL url, File file )
+        throws IOException
+    {
+        if ( file == null )
+        {
+            throw new IOException( "The file " + file + " can't be null." );
+        }
+        if ( url == null )
+        {
+            throw new IOException( "The url " + url + " could not be null." );
+        }
+
+        InputStream is = url.openStream();
+        if ( is == null )
+        {
+            throw new IOException( "The resource " + url + " doesn't exists." );
+        }
+
+        if ( !file.getParentFile().exists() )
+        {
+            file.getParentFile().mkdirs();
+        }
+
+        FileOutputStream os = null;
+        try
+        {
+            os = new FileOutputStream( file );
+
+            IOUtil.copy( is, os );
+        }
+        finally
+        {
+            IOUtil.close( is );
+
+            IOUtil.close( os );
+        }
+    }
+
     // ----------------------------------------------------------------------
     // private methods
     // ----------------------------------------------------------------------

Added: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt Thu Jul 16 21:59:44 2009
@@ -0,0 +1,120 @@
+ ------
+ Configuring Help
+ ------
+ Vincent Siveton
+ ------
+ 2009-07-16
+ ------
+
+~~ 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: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Configuring Help File
+
+ If a custom \<helpfile/\> parameter is specified, you will be able to use it:
+
+ * if \<helpfile/\> is a given file, you could use an absolute or a  relative path, for instance:
+
++-----+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <helpfile>${basedir}/path/to/your/helpfile</helpfile>
+          ...
+        </configuration>
+      </plugin>
+    </plugins>
+    ...
+  </reporting>
+  ...
+</project>
++-----+
+
+ * since 2.6, \<helpfile/\> could be a resource in your project directory, i.e. <<<src/main/java>>>,
+ <<<src/main/resources>>> or <<<src/main/javadoc>>>, for instance:
+
++-----+
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <helpfile>path/to/your/resource/help-doc.html</helpfile>
+          ...
+        </configuration>
+      </plugin>
+    </plugins>
+    ...
+  </build>
+  ...
+  <!-- Or the following
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <helpfile>path/to/your/resource/help-doc.html</helpfile>
+          ...
+        </configuration>
+      </plugin>
+    </plugins>
+    ...
+  </reporting>
+  -->
+  ...
+</project>
++-----+
+
+ * since 2.6, \<helpfile/\> could be a resource in the Javadoc plugin dependencies, for instance:
+
++-----+
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <helpfile>path/to/your/resource/help-doc.html</helpfile>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>groupId</groupId>
+            <artifactId>artifactId</artifactId>
+            <version>version</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+    ...
+  </build>
+  ...
+</project>
++-----+
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/help-configuration.apt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/stylesheet-configuration.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/stylesheet-configuration.apt?rev=794885&r1=794884&r2=794885&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/stylesheet-configuration.apt (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/stylesheet-configuration.apt Thu Jul 16 21:59:44 2009
@@ -2,8 +2,9 @@
  Configuring Stylesheets
  ------
  Maria Odea Ching
+ Vincent Siveton
  ------
- 2008-07-31
+ 2009-07-16
  ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -43,7 +44,6 @@
         <artifactId>maven-javadoc-plugin</artifactId>
         <version>2.5</version>
         <configuration>
-          ...
           <stylesheet>maven</stylesheet>
           ...
         </configuration>
@@ -55,3 +55,95 @@
 </project>
 +-----+
 
+Configuring Stylesheets File
+
+ If a custom \<stylesheetfile/\> parameter is specified, you will be able to use it:
+
+ * if \<stylesheetfile/\> is a given file, you could use an absolute or a  relative path, for instance:
+
++-----+
+<project>
+  ...
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <stylesheetfile>${basedir}/path/to/your/stylesheetfile.css</stylesheetfile>
+          ...
+        </configuration>
+      </plugin>
+    </plugins>
+    ...
+  </reporting>
+  ...
+</project>
++-----+
+
+ * since 2.6, \<stylesheetfile/\> could be a resource in your project directory, i.e. <<<src/main/java>>>,
+ <<<src/main/resources>>> or <<<src/main/javadoc>>>, for instance:
+
++-----+
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <stylesheetfile>path/to/your/stylesheet.css</stylesheetfile>
+          ...
+        </configuration>
+      </plugin>
+    </plugins>
+    ...
+  </build>
+  ...
+  <!-- Or the following
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <stylesheetfile>path/to/your/stylesheet.css</stylesheetfile>
+          ...
+        </configuration>
+      </plugin>
+    </plugins>
+    ...
+  </reporting>
+  -->
+  ...
+</project>
++-----+
+
+ * since 2.6, \<stylesheetfile/\> could be a resource in the Javadoc plugin dependencies, for instance:
+
++-----+
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <stylesheetfile>path/to/your/stylesheet.css</stylesheetfile>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>groupId</groupId>
+            <artifactId>artifactId</artifactId>
+            <version>version</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+    ...
+  </build>
+  ...
+</project>
++-----+
\ No newline at end of file

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml?rev=794885&r1=794884&r2=794885&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml Thu Jul 16 21:59:44 2009
@@ -41,6 +41,7 @@
       <item name="Using Javadoc Resources" href="/examples/javadoc-resources.html"/>
       <item name="Using Alternative Output Directory" href="/examples/output-configuration.html"/>
       <item name="Configuring Stylesheets" href="/examples/stylesheet-configuration.html"/>
+      <item name="Configuring Helpfile" href="/examples/help-configuration.html"/>
       <item name="Configuring Custom Tags" href="/examples/tag-configuration.html"/>
       <item name="Configuring Custom Taglets" href="/examples/taglet-configuration.html"/>
       <item name="Generating Test Javadocs" href="/examples/test-javadocs.html"/>

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java?rev=794885&r1=794884&r2=794885&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java Thu Jul 16 21:59:44 2009
@@ -23,6 +23,8 @@
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
 
 import org.apache.commons.lang.SystemUtils;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -67,81 +69,78 @@
     private void createTestRepo()
         throws IOException
     {
+        File localRepo = new File( getBasedir(), "target/local-repo/" );
+        if ( localRepo.exists() )
+        {
+            return;
+        }
+
+        localRepo.mkdirs();
+
         // ----------------------------------------------------------------------
         // UMLGraph
         // ----------------------------------------------------------------------
 
-        File f = new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph/2.1" );
-        f.mkdirs();
-
-        FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/doclet-test/artifact-doclet/umlgraph/UMLGraph/maven-metadata-local.xml" ),
-                       new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph/maven-metadata-local.xml" ) );
-
-        FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/doclet-test/artifact-doclet/umlgraph/UMLGraph/2.1/UMLGraph-2.1.jar" ),
-                       new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph/2.1/UMLGraph-2.1.jar" ) );
-
-        FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/doclet-test/artifact-doclet/umlgraph/UMLGraph/2.1/UMLGraph-2.1.pom" ),
-                       new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph/2.1/UMLGraph-2.1.pom" ) );
+        FileUtils.copyDirectoryStructure( new File( getBasedir(),
+                                                    "src/test/resources/unit/doclet-test/artifact-doclet" ),
+                                          localRepo );
 
         // ----------------------------------------------------------------------
         // UMLGraph-bis
         // ----------------------------------------------------------------------
 
-        f = new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph-bis/2.1" );
-        f.mkdirs();
-
-        FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/doclet-path-test/artifact-doclet/umlgraph/UMLGraph-bis/maven-metadata-local.xml" ),
-                       new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph-bis/maven-metadata-local.xml" ) );
-
-        FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/doclet-path-test/artifact-doclet/umlgraph/UMLGraph-bis/2.1/UMLGraph-bis-2.1.jar" ),
-                       new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph-bis/2.1/UMLGraph-bis-2.1.jar" ) );
-
-        FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/doclet-path-test/artifact-doclet/umlgraph/UMLGraph-bis/2.1/UMLGraph-bis-2.1.pom" ),
-                       new File( getBasedir(), "target/local-repo/umlgraph/UMLGraph-bis/2.1/UMLGraph-bis-2.1.pom" ) );
+        FileUtils.copyDirectoryStructure( new File( getBasedir(),
+                                                    "src/test/resources/unit/doclet-path-test/artifact-doclet" ),
+                                          localRepo );
 
         // ----------------------------------------------------------------------
         // commons-attributes-compiler
         // http://www.tullmann.org/pat/taglets/
         // ----------------------------------------------------------------------
 
-        f = new File( getBasedir(), "target/local-repo/org/tullmann/taglets/1.0" );
-        f.mkdirs();
-
         FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/taglet-test/artifact-taglet/org/tullmann/taglets/maven-metadata-local.xml" ),
-                       new File( getBasedir(), "target/local-repo/org/tullmann/taglets/maven-metadata-local.xml" ) );
+                 .copyDirectoryStructure(
+                                          new File( getBasedir(),
+                                                    "src/test/resources/unit/taglet-test/artifact-taglet" ),
+                                          localRepo );
+
+        // ----------------------------------------------------------------------
+        // stylesheetfile-test
+        // ----------------------------------------------------------------------
 
         FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/taglet-test/artifact-taglet/org/tullmann/taglets/1.0/taglets-1.0.jar" ),
-                       new File( getBasedir(), "target/local-repo/org/tullmann/taglets/1.0/taglets-1.0.jar" ) );
+                 .copyDirectoryStructure(
+                                          new File( getBasedir(),
+                                                    "src/test/resources/unit/stylesheetfile-test/artifact-stylesheetfile" ),
+                                          localRepo );
+
+        // ----------------------------------------------------------------------
+        // helpfile-test
+        // ----------------------------------------------------------------------
 
         FileUtils
-            .copyFile(
-                       new File( getBasedir(),
-                                 "src/test/resources/unit/taglet-test/artifact-taglet/org/tullmann/taglets/1.0/taglets-1.0.pom" ),
-                       new File( getBasedir(), "target/local-repo/org/tullmann/taglets/1.0/taglets-1.0.pom" ) );
+                 .copyDirectoryStructure(
+                                          new File( getBasedir(),
+                                                    "src/test/resources/unit/helpfile-test/artifact-helpfile" ),
+                                          localRepo );
+
+        // Remove SCM files
+        List files =
+            FileUtils.getFileAndDirectoryNames( localRepo, FileUtils.getDefaultExcludesAsString(), null, true,
+                                                true, true, true );
+        for ( Iterator it = files.iterator(); it.hasNext(); )
+        {
+            File file = new File( it.next().toString() );
+
+            if ( file.isDirectory() )
+            {
+                FileUtils.deleteDirectory( file );
+            }
+            else
+            {
+                file.delete();
+            }
+        }
     }
 
     /**
@@ -974,4 +973,118 @@
         assertTrue( options.indexOf( "org.codehaus.plexus.javadoc.PlexusRequirementTaglet" ) != -1 );
         assertTrue( options.indexOf( "org.codehaus.plexus.javadoc.PlexusComponentTaglet" ) != -1 );
     }
+
+    /**
+     * Method to test the <code>&lt;stylesheetfile/&gt;</code> parameter.
+     *
+     * @throws Exception if any
+     */
+    public void testStylesheetfile()
+        throws Exception
+    {
+        File testPom = new File( getBasedir(), "src/test/resources/unit/stylesheetfile-test/pom.xml" );
+
+        JavadocReport mojo = (JavadocReport) lookupMojo( "javadoc", testPom );
+        assertNotNull( mojo );
+
+        setVariableValueToObject( mojo, "remoteRepositories", mojo.project.getRemoteArtifactRepositories() );
+
+        File stylesheetfile =
+            new File( getBasedir(), "target/test/unit/stylesheetfile-test/target/site/apidocs/stylesheet.css" );
+
+        // stylesheet == maven OR java
+        setVariableValueToObject( mojo, "stylesheet", "javamaven" );
+
+        try
+        {
+            mojo.execute();
+            assertTrue( false );
+        }
+        catch ( Exception e )
+        {
+            assertTrue( true );
+        }
+
+        // stylesheet == java
+        setVariableValueToObject( mojo, "stylesheet", "java" );
+        mojo.execute();
+
+        String content = readFile( stylesheetfile );
+        assertTrue( content.indexOf( "/* Javadoc style sheet */" ) != -1 );
+
+        // stylesheet == maven
+        setVariableValueToObject( mojo, "stylesheet", "maven" );
+        mojo.execute();
+
+        content = readFile( stylesheetfile );
+        assertTrue( content.indexOf( "/* Javadoc style sheet */" ) != -1
+            && content.indexOf( "Licensed to the Apache Software Foundation (ASF) under one" ) != -1 );
+
+        // stylesheetfile defined as a project resource
+        setVariableValueToObject( mojo, "stylesheet", null );
+        setVariableValueToObject( mojo, "stylesheetfile", "com/mycompany/app/javadoc/css/stylesheet.css" );
+        mojo.execute();
+
+        content = readFile( stylesheetfile );
+        assertTrue( content.indexOf( "/* Custom Javadoc style sheet in project */" ) != -1 );
+
+        // stylesheetfile defined in a javadoc plugin dependency
+        setVariableValueToObject( mojo, "stylesheetfile", "com/mycompany/app/javadoc/css2/stylesheet.css" );
+        mojo.execute();
+
+        content = readFile( stylesheetfile );
+        assertTrue( content.indexOf( "/* Custom Javadoc style sheet in artefact */" ) != -1 );
+
+        // stylesheetfile defined as file
+        File css =
+            new File( getBasedir(),
+                      "src/test/resources/unit/stylesheetfile-test/src/main/resources/com/mycompany/app/javadoc/css3/stylesheet.css" );
+        setVariableValueToObject( mojo, "stylesheetfile", css.getAbsolutePath() );
+        mojo.execute();
+
+        content = readFile( stylesheetfile );
+        assertTrue( content.indexOf( "/* Custom Javadoc style sheet as file */" ) != -1 );
+    }
+
+    /**
+     * Method to test the <code>&lt;helpfile/&gt;</code> parameter.
+     *
+     * @throws Exception if any
+     */
+    public void testHelpfile()
+        throws Exception
+    {
+        File testPom = new File( getBasedir(), "src/test/resources/unit/helpfile-test/pom.xml" );
+
+        JavadocReport mojo = (JavadocReport) lookupMojo( "javadoc", testPom );
+        assertNotNull( mojo );
+
+        setVariableValueToObject( mojo, "remoteRepositories", mojo.project.getRemoteArtifactRepositories() );
+
+        File helpfile =
+            new File( getBasedir(), "target/test/unit/helpfile-test/target/site/apidocs/help-doc.html" );
+
+        // helpfile by default
+        mojo.execute();
+
+        String content = readFile( helpfile );
+        assertTrue( content.indexOf( "<!-- Generated by javadoc" ) != -1 );
+
+        // helpfile defined in a javadoc plugin dependency
+        setVariableValueToObject( mojo, "helpfile", "com/mycompany/app/javadoc/helpfile/help-doc.html" );
+        mojo.execute();
+
+        content = readFile( helpfile );
+        assertTrue( content.indexOf( "<!--  Help file from artefact -->" ) != -1 );
+
+        // helpfile defined as file
+        File css =
+            new File( getBasedir(),
+                      "src/test/resources/unit/helpfile-test/src/main/resources/com/mycompany/app/javadoc/helpfile2/help-doc.html" );
+        setVariableValueToObject( mojo, "helpfile", css.getAbsolutePath() );
+        mojo.execute();
+
+        content = readFile( helpfile );
+        assertTrue( content.indexOf( "<!--  Help file from file -->" ) != -1 );
+    }
 }

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java Thu Jul 16 21:59:44 2009
@@ -0,0 +1,96 @@
+package org.apache.maven.plugin.javadoc.stubs;
+
+/*
+ * 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 org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class HelpFileMavenProjectStub extends MavenProjectStub
+{
+    private Build build;
+
+    public HelpFileMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/helpfile-test/target" );
+        Resource resource = new Resource();
+        resource.setDirectory( getBasedir() + "/src/main/resources" );
+        build.addResource( resource );
+
+        build.setPlugins( getModel().getBuild().getPlugins() );
+        setBuild( build );
+
+        List compileSourceRoots = new ArrayList();
+        compileSourceRoots.add( getBasedir() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Build getBuild()
+    {
+        return build;
+    }
+
+    /** {@inheritDoc} */
+    public void setBuild( Build build )
+    {
+        this.build = build;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/helpfile-test" );
+    }
+
+    /** {@inheritDoc} */
+    public List getRemoteArtifactRepositories()
+    {
+        ArtifactRepository repository =
+            new DefaultArtifactRepository( "central", "http://repo1.maven.org/maven2",
+                                           new DefaultRepositoryLayout() );
+
+        return Collections.singletonList( repository );
+    }
+}

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/HelpFileMavenProjectStub.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java Thu Jul 16 21:59:44 2009
@@ -0,0 +1,96 @@
+package org.apache.maven.plugin.javadoc.stubs;
+
+/*
+ * 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 org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class StylesheetFileMavenProjectStub extends MavenProjectStub
+{
+    private Build build;
+
+    public StylesheetFileMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "pom.xml" ) );
+
+        setGroupId( getModel().getGroupId() );
+        setArtifactId( getModel().getArtifactId() );
+        setVersion( getModel().getVersion() );
+        setName( getModel().getName() );
+        setUrl( getModel().getUrl() );
+        setPackaging( getModel().getPackaging() );
+
+        Build build = new Build();
+        build.setFinalName( getModel().getArtifactId() );
+        build.setSourceDirectory( getBasedir() + "/src/main/java" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/stylesheetfile-test/target" );
+        Resource resource = new Resource();
+        resource.setDirectory( getBasedir() + "/src/main/resources" );
+        build.addResource( resource );
+
+        build.setPlugins( getModel().getBuild().getPlugins() );
+        setBuild( build );
+
+        List compileSourceRoots = new ArrayList();
+        compileSourceRoots.add( getBasedir() + "/src/main/java" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    public Build getBuild()
+    {
+        return build;
+    }
+
+    /** {@inheritDoc} */
+    public void setBuild( Build build )
+    {
+        this.build = build;
+    }
+
+    /** {@inheritDoc} */
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/stylesheetfile-test" );
+    }
+
+    /** {@inheritDoc} */
+    public List getRemoteArtifactRepositories()
+    {
+        ArtifactRepository repository =
+            new DefaultArtifactRepository( "central", "http://repo1.maven.org/maven2",
+                                           new DefaultRepositoryLayout() );
+
+        return Collections.singletonList( repository );
+    }
+}

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/StylesheetFileMavenProjectStub.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml?rev=794885&r1=794884&r2=794885&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml Thu Jul 16 21:59:44 2009
@@ -50,6 +50,7 @@
           <javadocDirectory>${basedir}/src/test/resources/unit/aggregate-resources-test/src/main/javadoc</javadocDirectory>
           <debug>true</debug>
           <docfilessubdirs>true</docfilessubdirs>
+          <stylesheet>java</stylesheet>
           <failOnError>true</failOnError>
         </configuration>
       </plugin>

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml?rev=794885&r1=794884&r2=794885&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/header-footer-test/header-footer-test-plugin-config.xml Thu Jul 16 21:59:44 2009
@@ -61,6 +61,7 @@
 </table>
               ]]>
           </footer>
+          <stylesheet>java</stylesheet>
           <quiet>true</quiet>
           <debug>true</debug>
           <failOnError>true</failOnError>

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.jar?rev=794885&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom Thu Jul 16 21:59:44 2009
@@ -0,0 +1,81 @@
+<!--
+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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+  <artifactId>helpfile-test</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2009</inceptionYear>
+  <name>Maven Javadoc Plugin helpfile Test</name>
+  <url>http://maven.apache.org</url>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <project implementation="org.apache.maven.plugin.javadoc.stubs.HelpFileMavenProjectStub"/>
+          <localRepository>${localRepository}</localRepository>
+          <outputDirectory>${basedir}/target/test/unit/helpfile-test/target/site/apidocs</outputDirectory>
+          <javadocDirectory>${basedir}/src/test/resources/unit/helpfile-test/src/main/javadoc</javadocDirectory>
+          <breakiterator>false</breakiterator>
+          <old>false</old>
+          <show>protected</show>
+          <quiet>true</quiet>
+          <verbose>false</verbose>
+          <author>true</author>
+          <encoding>ISO-8859-1</encoding>
+          <docfilessubdirs>false</docfilessubdirs>
+          <linksource>false</linksource>
+          <nocomment>false</nocomment>
+          <nodeprecated>false</nodeprecated>
+          <nodeprecatedlist>false</nodeprecatedlist>
+          <nohelp>false</nohelp>
+          <noindex>false</noindex>
+          <nonavbar>false</nonavbar>
+          <nosince>false</nosince>
+          <notree>false</notree>
+          <serialwarn>false</serialwarn>
+          <splitindex>false</splitindex>
+          <groups/>
+          <tags/>
+          <use>true</use>
+          <version>true</version>
+          <windowtitle>Maven Javadoc Plugin Stylesheetfile Test 1.0-SNAPSHOT API</windowtitle>
+          <links>
+             <param>http://java.sun.com/j2se/1.4.2/docs/api</param>
+          </links>
+          <debug>true</debug>
+          <failOnError>true</failOnError>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+            <artifactId>helpfile-test</artifactId>
+            <version>1.0-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/helpfile-test-1.0-SNAPSHOT.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml Thu Jul 16 21:59:44 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+  <artifactId>helpfile-test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <localCopy>true</localCopy>
+    </snapshot>
+    <lastUpdated>20090716155639</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/1.0-SNAPSHOT/maven-metadata-local.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml Thu Jul 16 21:59:44 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+  <artifactId>helpfile-test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <versioning>
+    <versions>
+      <version>1.0-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20090716155639</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/artifact-helpfile/org/apache/maven/plugins/maven-javadoc-plugin/unit/helpfile-test/maven-metadata-local.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml Thu Jul 16 21:59:44 2009
@@ -0,0 +1,82 @@
+<!--
+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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+  <artifactId>helpfile-test</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2009</inceptionYear>
+  <name>Maven Javadoc Plugin helpfile Test</name>
+  <url>http://maven.apache.org</url>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <project implementation="org.apache.maven.plugin.javadoc.stubs.HelpFileMavenProjectStub"/>
+          <localRepository>${localRepository}</localRepository>
+          <outputDirectory>${basedir}/target/test/unit/helpfile-test/target/site/apidocs</outputDirectory>
+          <javadocDirectory>${basedir}/src/test/resources/unit/helpfile-test/src/main/javadoc</javadocDirectory>
+          <breakiterator>false</breakiterator>
+          <old>false</old>
+          <show>protected</show>
+          <quiet>true</quiet>
+          <verbose>false</verbose>
+          <author>true</author>
+          <encoding>ISO-8859-1</encoding>
+          <docfilessubdirs>false</docfilessubdirs>
+          <linksource>false</linksource>
+          <nocomment>false</nocomment>
+          <nodeprecated>false</nodeprecated>
+          <nodeprecatedlist>false</nodeprecatedlist>
+          <nohelp>false</nohelp>
+          <noindex>false</noindex>
+          <nonavbar>false</nonavbar>
+          <nosince>false</nosince>
+          <notree>false</notree>
+          <serialwarn>false</serialwarn>
+          <splitindex>false</splitindex>
+          <groups/>
+          <tags/>
+          <use>true</use>
+          <version>true</version>
+          <windowtitle>Maven Javadoc Plugin Stylesheetfile Test 1.0-SNAPSHOT API</windowtitle>
+          <links>
+             <param>http://java.sun.com/j2se/1.4.2/docs/api</param>
+          </links>
+          <debug>true</debug>
+          <failOnError>true</failOnError>
+          <stylesheet>java</stylesheet>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+            <artifactId>helpfile-test</artifactId>
+            <version>1.0-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java?rev=794885&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java Thu Jul 16 21:59:44 2009
@@ -0,0 +1,31 @@
+package com.mycompany.app;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ */
+public class App
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+    }
+}

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/helpfile-test/src/main/java/com/mycompany/app/App.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision