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 2007/05/16 14:38:45 UTC
svn commit: r538566 - in /maven/plugins/trunk/maven-javadoc-plugin/src:
main/java/org/apache/maven/plugin/javadoc/ site/ site/apt/
site/apt/examples/ site/fml/ test/java/org/apache/maven/plugin/javadoc/
test/java/org/apache/maven/plugin/javadoc/stubs/ ...
Author: vsiveton
Date: Wed May 16 05:38:42 2007
New Revision: 538566
URL: http://svn.apache.org/viewvc?view=rev&rev=538566
Log:
MJAVADOC-100: Allow JavaDocs to generate for Test Code
o added a new report for test javadocs
o small refactoring to handle this: added several protected methods
o added use case
o added and updated documentation
Added:
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.jar (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom.sha1
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/App.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml (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/JavadocReport.java
maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt
maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/index.apt
maven/plugins/trunk/maven-javadoc-plugin/src/site/fml/faq.fml
maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml
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/aggregate-test/aggregate-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?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- 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 Wed May 16 05:38:42 2007
@@ -58,6 +58,7 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.wagon.PathUtils;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
@@ -944,6 +945,65 @@
}
/**
+ * @param p a maven project
+ * @return the directory where compiled classes are placed for the given project.
+ */
+ protected String getProjectBuildOutputDir( MavenProject p )
+ {
+ return p.getBuild().getOutputDirectory();
+ }
+
+ /**
+ * @param p a maven project
+ * @return the list of source paths for the given project
+ */
+ protected List getProjectSourceRoots( MavenProject p )
+ {
+ return p.getCompileSourceRoots();
+ }
+
+ /**
+ * @param p a maven project
+ * @return the list of artifacts for the given project
+ */
+ protected List getProjectArtifacts( MavenProject p )
+ {
+ return p.getCompileArtifacts();
+ }
+
+ /**
+ * @return the current javadoc directory
+ */
+ protected String getJavadocDirectory()
+ {
+ return javadocDirectory;
+ }
+
+ /**
+ * @return the title to be placed near the top of the overview summary file
+ */
+ protected String getDoctitle()
+ {
+ return doctitle;
+ }
+
+ /**
+ * @return the overview documentation file from the user parameter or from the <code>javadocdirectory</code>
+ */
+ protected String getOverview()
+ {
+ return overview;
+ }
+
+ /**
+ * @return the title to be placed in the HTML title tag
+ */
+ protected String getWindowtitle()
+ {
+ return windowtitle;
+ }
+
+ /**
* @param locale
* @throws MavenReportException
*/
@@ -1054,7 +1114,7 @@
{
options.append( "-locale " );
options.append( quotedArgument( this.locale ) );
- options.append( " " );
+ options.append( SystemUtils.LINE_SEPARATOR );
}
String classpath = getClasspath();
@@ -1062,6 +1122,7 @@
{
options.append( "-classpath " );
options.append( quotedPathArgument( classpath ) );
+ options.append( SystemUtils.LINE_SEPARATOR );
}
// ----------------------------------------------------------------------
@@ -1110,9 +1171,9 @@
addArgIf( arguments, old, "-1.1" );
}
- if ( ( StringUtils.isNotEmpty( overview ) ) && ( new File( overview ).exists() ) )
+ if ( ( StringUtils.isNotEmpty( getOverview() ) ) && ( new File( getOverview() ).exists() ) )
{
- addArgIfNotEmpty( arguments, "-overview", quotedPathArgument( overview ) );
+ addArgIfNotEmpty( arguments, "-overview", quotedPathArgument( getOverview() ) );
}
arguments.add( getAccessLevel() );
addArgIf( arguments, quiet, "-quiet", SINCE_JAVADOC_1_4 );
@@ -1148,7 +1209,7 @@
addArgIfNotEmpty( arguments, "-d", quotedPathArgument( javadocOutputDirectory.toString() ) );
addArgIf( arguments, docfilessubdirs, "-docfilessubdirs", SINCE_JAVADOC_1_4 );
addArgIfNotEmpty( arguments, "-docencoding", quotedArgument( docencoding ) );
- addArgIfNotEmpty( arguments, "-doctitle", quotedArgument( doctitle ), false, false );
+ addArgIfNotEmpty( arguments, "-doctitle", quotedArgument( getDoctitle() ), false, false );
addArgIfNotEmpty( arguments, "-excludedocfilessubdir", quotedPathArgument( excludedocfilessubdir ),
SINCE_JAVADOC_1_4 );
addArgIfNotEmpty( arguments, "-footer", quotedArgument( footer ), false, false );
@@ -1250,7 +1311,7 @@
addArgIf( arguments, use, "-use" );
addArgIf( arguments, version, "-version" );
- addArgIfNotEmpty( arguments, "-windowtitle", quotedArgument( windowtitle ), false, false );
+ addArgIfNotEmpty( arguments, "-windowtitle", quotedArgument( getWindowtitle() ), false, false );
}
// ----------------------------------------------------------------------
@@ -1367,19 +1428,19 @@
List sourcePaths;
if ( StringUtils.isEmpty( sourcepath ) )
{
- sourcePaths = new ArrayList( project.getCompileSourceRoots() );
+ sourcePaths = new ArrayList( getProjectSourceRoots( project ) );
if ( project.getExecutionProject() != null )
{
- sourcePaths.addAll( project.getExecutionProject().getCompileSourceRoots() );
+ sourcePaths.addAll( getProjectSourceRoots( project ) );
}
- if ( javadocDirectory != null )
+ if ( getJavadocDirectory() != null )
{
- File javadocDir = new File( javadocDirectory );
+ File javadocDir = new File( getJavadocDirectory() );
if ( javadocDir.exists() && javadocDir.isDirectory() )
{
- sourcePaths.add( javadocDirectory );
+ sourcePaths.add( getJavadocDirectory() );
}
}
@@ -1389,23 +1450,27 @@
{
MavenProject subProject = (MavenProject) i.next();
- List sourceRoots = subProject.getCompileSourceRoots();
-
- if ( subProject.getExecutionProject() != null )
+ if ( subProject != project )
{
- sourceRoots.addAll( subProject.getExecutionProject().getCompileSourceRoots() );
- }
+ List sourceRoots = getProjectSourceRoots( subProject );
- ArtifactHandler artifactHandler = subProject.getArtifact().getArtifactHandler();
- if ( "java".equals( artifactHandler.getLanguage() ) )
- {
- sourcePaths.addAll( sourceRoots );
- }
+ if ( subProject.getExecutionProject() != null )
+ {
+ sourceRoots.addAll( getProjectSourceRoots( subProject ) );
+ }
- File javadocDir = new File( subProject.getExecutionProject().getBasedir(), "src/main/javadoc" );
- if ( javadocDir.exists() && javadocDir.isDirectory() )
- {
- sourcePaths.add( javadocDir.getAbsolutePath() );
+ ArtifactHandler artifactHandler = subProject.getArtifact().getArtifactHandler();
+ if ( "java".equals( artifactHandler.getLanguage() ) )
+ {
+ sourcePaths.addAll( sourceRoots );
+ }
+
+ String javadocDirRelative = PathUtils.toRelative( project.getBasedir(), getJavadocDirectory() );
+ File javadocDir = new File( subProject.getExecutionProject().getBasedir(), javadocDirRelative );
+ if ( javadocDir.exists() && javadocDir.isDirectory() )
+ {
+ sourcePaths.add( javadocDir.getAbsolutePath() );
+ }
}
}
}
@@ -1534,9 +1599,9 @@
List classpathElements = new ArrayList();
Map compileArtifactMap = new HashMap();
- classpathElements.add( project.getBuild().getOutputDirectory() );
+ classpathElements.add( getProjectBuildOutputDir( project ) );
- populateCompileArtifactMap( compileArtifactMap, project.getCompileArtifacts() );
+ populateCompileArtifactMap( compileArtifactMap, getProjectArtifacts( project ) );
if ( aggregate && project.isExecutionRoot() )
{
@@ -1547,7 +1612,7 @@
MavenProject subProject = (MavenProject) i.next();
if ( subProject != project )
{
- classpathElements.add( subProject.getBuild().getOutputDirectory() );
+ classpathElements.add( getProjectBuildOutputDir( subProject ) );
Set dependencyArtifacts = subProject.createArtifacts( factory, null, null );
if ( !dependencyArtifacts.isEmpty() )
{
@@ -1594,8 +1659,9 @@
if ( file == null )
{
- throw new MavenReportException(
- "Error in plugin descriptor - compile dependencies were not resolved" );
+ throw new MavenReportException( "Error in plugin descriptor - "
+ + "dependency was not resolved for artifact: " + a.getGroupId() + ":" + a.getArtifactId()
+ + ":" + a.getVersion() );
}
compileArtifactMap.put( a.getDependencyConflictId(), file.getAbsolutePath() );
}
@@ -2247,9 +2313,9 @@
throw new IOException( "The outputDirectory " + outputDirectory + " doesn't exists." );
}
- if ( javadocDirectory != null )
+ if ( getJavadocDirectory() != null )
{
- copyJavadocResources( outputDirectory, new File( javadocDirectory ) );
+ copyJavadocResources( outputDirectory, new File( getJavadocDirectory() ) );
}
if ( aggregate && project.isExecutionRoot() )
@@ -2260,7 +2326,8 @@
if ( subProject != project )
{
- File javadocDir = new File( subProject.getBasedir(), "src/main/javadoc" );
+ String javadocDirRelative = PathUtils.toRelative( project.getBasedir(), getJavadocDirectory() );
+ File javadocDir = new File( subProject.getBasedir(), javadocDirRelative );
copyJavadocResources( outputDirectory, javadocDir );
}
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java Wed May 16 05:38:42 2007
@@ -35,8 +35,8 @@
import java.util.Locale;
/**
- * Generates documentation for the Java code in the project using the standard <a
- * href="http://java.sun.com/j2se/javadoc/">Javadoc Tool</a>.
+ * Generates documentation for the <code>Java code</code> in the project using the standard
+ * <a href="http://java.sun.com/j2se/javadoc/">Javadoc Tool</a>.
*
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
@@ -77,21 +77,21 @@
private String destDir;
/**
- * The name of the javadoc report.
+ * The name of the Javadoc report.
*
* @parameter expression="${name}" default-value="JavaDocs"
*/
private String name;
/**
- * The description of the javadoc report.
+ * The description of the Javadoc report.
*
* @parameter expression="${description}" default-value="JavaDoc API documentation."
*/
private String description;
// ----------------------------------------------------------------------
- //
+ // public methods
// ----------------------------------------------------------------------
/**
Added: 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?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java Wed May 16 05:38:42 2007
@@ -0,0 +1,244 @@
+package org.apache.maven.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.StringUtils;
+
+/**
+ * Generates documentation for the <code>Java Test code</code> in the project using the standard
+ * <a href="http://java.sun.com/j2se/javadoc/">Javadoc Tool</a>.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 2.3<ol></ol>
+ * @goal test-javadoc
+ * @phase generate-test-sources
+ * @requiresDependencyResolution test
+ * @see <a href="http://java.sun.com/j2se/javadoc/">Javadoc Tool</a>
+ * @see <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#options">Javadoc Options </a>
+ */
+public class TestJavadocReport
+ extends JavadocReport
+{
+ // ----------------------------------------------------------------------
+ // Javadoc Options
+ // ----------------------------------------------------------------------
+
+ /**
+ * Specifies the title to be placed near the top of the overview summary file.
+ * <br/>
+ * See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#doctitle">doctitle</a>.
+ *
+ * @parameter expression="${doctitle}" default-value="${project.name} ${project.version} Test API"
+ */
+ private String doctitle;
+
+ /**
+ * Specifies that javadoc should retrieve the text for the overview documentation from the "source" file
+ * specified by path/filename and place it on the Overview page (overview-summary.html).
+ * <br/>
+ * See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#overview">overview</a>.
+ *
+ * @parameter expression="${overview}" default-value="${basedir}/src/test/javadoc/overview.html"
+ */
+ private String overview;
+
+ /**
+ * Specifies the title to be placed in the HTML title tag.
+ * <br/>
+ * See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#windowtitle">windowtitle</a>.
+ *
+ * @parameter expression="${windowtitle}" default-value="${project.name} ${project.version} Test API"
+ */
+ private String windowtitle;
+
+ // ----------------------------------------------------------------------
+ // Mojo Parameters
+ // ----------------------------------------------------------------------
+
+ /**
+ * Specifies the destination directory where test javadoc saves the generated HTML files.
+ *
+ * @parameter expression="${project.reporting.outputDirectory}/testapidocs"
+ * @required
+ */
+ private File reportOutputDirectory;
+
+ /**
+ * The name of the destination directory.
+ *
+ * @parameter expression="${destDir}" default-value="testapidocs"
+ */
+ private String destDir;
+
+ /**
+ * Specifies the test Javadoc ressources directory to be included in the Javadoc (i.e. package.html, images...).
+ *
+ * @parameter expression="${basedir}/src/test/javadoc"
+ */
+ private String javadocDirectory;
+
+ /**
+ * The name of the test Javadoc report.
+ *
+ * @parameter expression="${name}" default-value="Test JavaDocs"
+ */
+ private String name;
+
+ /**
+ * The description of the test Javadoc report.
+ *
+ * @parameter expression="${description}" default-value="Test JavaDoc API documentation."
+ */
+ private String description;
+
+ // ----------------------------------------------------------------------
+ // public methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * @see org.apache.maven.reporting.MavenReport#getName(java.util.Locale)
+ */
+ public String getName( Locale locale )
+ {
+ if ( StringUtils.isEmpty( name ) )
+ {
+ return "Test JavaDocs";
+ }
+
+ return name;
+ }
+
+ /**
+ * @see org.apache.maven.reporting.MavenReport#getDescription(java.util.Locale)
+ */
+ public String getDescription( Locale locale )
+ {
+ if ( StringUtils.isEmpty( description ) )
+ {
+ return "Test JavaDoc API documentation.";
+ }
+
+ return description;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.JavadocReport#getOutputName()
+ */
+ public String getOutputName()
+ {
+ return destDir + "/index";
+ }
+
+ /**
+ * @see org.apache.maven.reporting.MavenReport#getReportOutputDirectory()
+ */
+ public File getReportOutputDirectory()
+ {
+ if ( reportOutputDirectory == null )
+ {
+ return outputDirectory;
+ }
+
+ return reportOutputDirectory;
+ }
+
+ /**
+ * Method to set the directory where the generated reports will be put
+ *
+ * @param reportOutputDirectory the directory file to be set
+ */
+ public void setReportOutputDirectory( File reportOutputDirectory )
+ {
+ if ( ( reportOutputDirectory != null ) && ( !reportOutputDirectory.getAbsolutePath().endsWith( destDir ) ) )
+ {
+ this.reportOutputDirectory = new File( reportOutputDirectory, destDir );
+ }
+ else
+ {
+ this.reportOutputDirectory = reportOutputDirectory;
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // protected methods
+ // ----------------------------------------------------------------------
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getProjectBuildOutputDir(org.apache.maven.project.MavenProject)
+ */
+ protected String getProjectBuildOutputDir( MavenProject p )
+ {
+ return p.getBuild().getTestOutputDirectory();
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getProjectSourceRoots(org.apache.maven.project.MavenProject)
+ */
+ protected List getProjectSourceRoots( MavenProject p )
+ {
+ return p.getTestCompileSourceRoots();
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getProjectArtifacts(org.apache.maven.project.MavenProject)
+ */
+ protected List getProjectArtifacts( MavenProject p )
+ {
+ return p.getTestArtifacts();
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getJavadocDirectory()
+ */
+ protected String getJavadocDirectory()
+ {
+ return javadocDirectory;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getDoctitle()
+ */
+ protected String getDoctitle()
+ {
+ return doctitle;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getOverview()
+ */
+ protected String getOverview()
+ {
+ return overview;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.javadoc.AbstractJavadocMojo#getWindowtitle()
+ */
+ protected String getWindowtitle()
+ {
+ return windowtitle;
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt Wed May 16 05:38:42 2007
@@ -3,7 +3,7 @@
------
Vincent Siveton
------
- Mai 2007
+ May 2007
------
~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -39,19 +39,19 @@
|-- src
|-- main
|-- java
- |-- org
- |-- apache
- |-- test
- `-- App.java
- `-- package-info.java
+ | |-- org
+ | |-- apache
+ | |-- myapp
+ | `-- App.java
+ | `-- package-info.java
|-- javadoc
- `-- overview.html
- |-- org
- |-- apache
- |-- test
- `-- package.html
- |-- doc-files
- `-- app.png
+ `-- overview.html
+ |-- org
+ |-- apache
+ |-- myapp
+ `-- package.html
+ |-- doc-files
+ `-- app.png
+-----+
* Overview comment files: <overview.html>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt Wed May 16 05:38:42 2007
@@ -0,0 +1,59 @@
+ ------
+ Selective Javadocs Reports
+ ------
+ Vincent Siveton
+ ------
+ May 2007
+ ------
+
+~~ 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/guides/mini/guide-apt-format.html
+
+Selective Javadocs Reports
+
+ To run the Javadocs reports selectively, you need to include only the Javadocs reports that you prefer.
+ Use "mvn site" to generate the selected reports.
+
++-----+
+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ ...
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>javadoc</report>
+ <!-- <report>test-javadoc</report> -->
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/selective-javadocs-report.apt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt Wed May 16 05:38:42 2007
@@ -0,0 +1,145 @@
+ ------
+ Generating Test Javadocs
+ ------
+ Vincent Siveton
+ ------
+ May 2007
+ ------
+
+~~ 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/guides/mini/guide-apt-format.html
+
+Generating Test Javadocs
+
+ There are two ways to generate the test javadocs in the Maven Javadoc plugin:
+
+ * using the javadoc:test-javadoc goal
+
+ * using the \<reportSets/\> configuration parameter
+
+ Here is a typical project used by the Maven Javadoc plugin:
+
++-----+
+
+yourproject
+ |-- src
+ |-- main
+ | |-- java
+ | | |-- org
+ | | |-- apache
+ | | |-- myapp
+ | | `-- App.java
+ | |-- javadoc
+ | `-- overview.html
+ | |-- org
+ | |-- apache
+ | |-- myapp
+ | `-- package.html
+ | |-- doc-files
+ | `-- app.png
+ |-- test
+ |-- java
+ | |-- org
+ | |-- apache
+ | |-- myapp
+ | `-- AppTest.java
+ |-- javadoc
+ `-- overview.html
+ |-- org
+ |-- apache
+ |-- myapp
+ `-- package.html
+ |-- doc-files
+ `-- app.png
++-----+
+
+* Using the javadoc:test-javadoc goal
+
+ You need to configure the Maven Javadoc plugin in your pom.xml, for instance:
+
++-----+
+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ ...
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
+
+ You could call <mvn javadoc:test-javadoc> or <mvn site>.
+
+ <<Note:>> In this case, the Javadoc report and the test Javadoc report use the same configuration.
+
+ <<Note:>> To run the reports selectively, you need to include only the reports that you prefer.
+ Read the {{{selective-javadocs-report.html}Selective Javadocs Reports}} part for more information.
+
+* Using the \<reportSets/\> configuration parameter
+
+ You could also want a different kind of configuration for the Javadoc report and the test Javadoc report.
+ For this, you need to configure the Maven Javadoc plugin in your pom.xml to handle the \<reportSets/\> configuration
+ parameter, for instance:
+
++-----+
+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <id>html</id>
+ <configuration>
+ ...
+ </configuration>
+ <reports>
+ <report>javadoc</report>
+ </reports>
+ </reportSet>
+ <reportSet>
+ <id>test-html</id>
+ <configuration>
+ ...
+ </configuration>
+ <reports>
+ <report>test-javadoc</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
+
+ You need to call <mvn site>.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/index.apt?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/index.apt Wed May 16 05:38:42 2007
@@ -2,8 +2,9 @@
Introduction
------
Maria Odea Ching
+ Vincent Siveton
------
- September 2006
+ May 2007
------
~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -48,11 +49,14 @@
* Goals Overview
- The Javadoc Plugin has two goals:
+ The Javadoc Plugin has three goals:
* {{{javadoc-mojo.html}javadoc:javadoc}} generates the javadoc files for the project. It executes the standard
Javadoc tool and supports the parameters used by the tool.
+ * {{{test-javadoc-mojo.html}javadoc:test-javadoc}} generates the test javadoc files for the project. It executes the standard
+ Javadoc tool and supports the parameters used by the tool.
+
* {{{jar-mojo.html}javadoc:jar}} creates an archive file of the generated javadocs. It is used during
the release process to create the javadoc artifact for the project's release. This artifact is uploaded
to the remote repository along with the project's compiled binary and source archive.
@@ -67,13 +71,15 @@
* {{{examples/aggregate.html}Aggregating Javadocs for Multi-Projects}}
+ * {{{examples/exclude-package-names.html}Excluding Packages}}
+
+ * {{{examples/group-configuration.html}Grouping Packages}}
+
* {{{examples/alternate-doclet.html}Using Alternate Doclet}}
* {{{examples/alternate-javadoc-tool.html}Using Alternate Javadoc Tool}}
- * {{{examples/exclude-package-names.html}Excluding Packages}}
-
- * {{{examples/group-configuration.html}Grouping Packages}}
+ * {{{examples/javadoc-resources.html}Using Javadoc Resources}}
* {{{examples/stylesheet-configuration.html}Configuring Stylesheets}}
@@ -81,4 +87,6 @@
* {{{examples/taglet-configuration.html}Configuring Custom Javadoc Taglet}}
- * {{{examples/javadoc-resources.html}Using Javadoc Resources}}
+ * {{{examples/test-javadocs.html}Generating test Javadocs}}
+
+ * {{{examples/selective-javadocs-report.html}Selective Javadocs Reports}}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/fml/faq.fml?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/fml/faq.fml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/fml/faq.fml Wed May 16 05:38:42 2007
@@ -92,5 +92,14 @@
</p>
</answer>
</faq>
+ <faq id="How to remove test Javadocs report">
+ <question>How to remove test Javadocs report?</question>
+ <answer>
+ <p>
+ You need to configure the <i><reportSets/></i> parameter. Read the
+ <a href="examples/selective-javadocs-report.html">Selective Javadocs Reports</a> part for more information.
+ </p>
+ </answer>
+ </faq>
</part>
</faqs>
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?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/site.xml Wed May 16 05:38:42 2007
@@ -33,14 +33,16 @@
</menu>
<menu name="Examples">
<item name="Aggregating Javadocs" href="/examples/aggregate.html"/>
- <item name="Using Alternate Doclets" href="/examples/alternate-doclet.html"/>
- <item name="Using Alternate Javadoc Tool" href="/examples/alternate-javadoc-tool.html"/>
<item name="Excluding Packages" href="/examples/exclude-package-names.html"/>
<item name="Grouping Packages" href="/examples/group-configuration.html"/>
+ <item name="Using Alternate Doclets" href="/examples/alternate-doclet.html"/>
+ <item name="Using Alternate Javadoc Tool" href="/examples/alternate-javadoc-tool.html"/>
+ <item name="Using Javadoc Resources" href="/examples/javadoc-resources.html"/>
<item name="Configuring Stylesheets" href="/examples/stylesheet-configuration.html"/>
<item name="Configuring Custom Tags" href="/examples/tag-configuration.html"/>
<item name="Configuring Custom Taglets" href="/examples/taglet-configuration.html"/>
- <item name="Using Javadoc Resources" href="/examples/javadoc-resources.html"/>
+ <item name="Generating Test Javadocs" href="/examples/test-javadocs.html"/>
+ <item name="Selective Javadocs Reports" href="/examples/selective-javadocs-report.html"/>
</menu>
</body>
</project>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java Wed May 16 05:38:42 2007
@@ -0,0 +1,69 @@
+package org.apache.maven.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ */
+public class TestJavadocReportTest
+ extends AbstractMojoTestCase
+{
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp()
+ throws Exception
+ {
+ // required for mojo lookups to work
+ super.setUp();
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown()
+ throws Exception
+ {
+ // nop
+ }
+
+ /**
+ * Test the test-javadoc configuration for the plugin
+ *
+ * @throws Exception
+ */
+ public void testTestJavadoc()
+ throws Exception
+ {
+ File testPom = new File( getBasedir(),
+ "src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml" );
+ TestJavadocReport mojo = (TestJavadocReport) lookupMojo( "test-javadoc", testPom );
+ mojo.execute();
+
+ File generatedFile = new File( getBasedir(),
+ "target/test/unit/test-javadoc-test/target/site/apidocs/maven/AppTest.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/TestJavadocReportTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.java?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.java Wed May 16 05:38:42 2007
@@ -0,0 +1,137 @@
+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 java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.artifact.InvalidDependencyVersionException;
+
+/**
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ */
+public class TestJavadocMavenProjectStub
+ extends MavenProjectStub
+{
+ private Build build;
+
+ public TestJavadocMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File( getBasedir(), "test-javadoc-test-plugin-config.xml" ) ) );
+ setModel( model );
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( e );
+ }
+
+ setGroupId( model.getGroupId() );
+ setArtifactId( model.getArtifactId() );
+ setVersion( model.getVersion() );
+ setName( model.getName() );
+ setUrl( model.getUrl() );
+ setPackaging( model.getPackaging() );
+
+ Artifact junit = new DefaultArtifact( "junit", "junit", VersionRange.createFromVersion( "3.8.1" ),
+ Artifact.SCOPE_TEST, "jar", null, new DefaultArtifactHandler( "jar" ),
+ false );
+ junit.setFile( new File( getBasedir() + "/junit/junit/3.8.1/junit-3.8.1.jar" ) );
+ setTestArtifacts( Collections.singletonList( junit ) );
+
+ Build build = new Build();
+ build.setFinalName( model.getArtifactId() );
+ build.setDirectory( super.getBasedir() + "/target/test/unit/test-javadoc-test/target" );
+ build.setSourceDirectory( getBasedir() + "/src/main/java" );
+ build.setOutputDirectory( super.getBasedir() + "/target/test/unit/test-javadoc-test/target/classes" );
+ build.setTestSourceDirectory( getBasedir() + "/src/test/java" );
+ build.setTestOutputDirectory( super.getBasedir() + "/target/test/unit/test-javadoc-test/target/test-classes" );
+ setBuild( build );
+
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( getBasedir() + "/src/main/java" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ List testCompileSourceRoots = new ArrayList();
+ testCompileSourceRoots.add( getBasedir() + "/src/test/java" );
+ setTestCompileSourceRoots( testCompileSourceRoots );
+ }
+
+ /**
+ * @see org.apache.maven.plugin.testing.stubs.MavenProjectStub#getBuild()
+ */
+ public Build getBuild()
+ {
+ return build;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.testing.stubs.MavenProjectStub#setBuild(org.apache.maven.model.Build)
+ */
+ public void setBuild( Build build )
+ {
+ this.build = build;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.testing.stubs.MavenProjectStub#getBasedir()
+ */
+ public File getBasedir()
+ {
+ return new File( super.getBasedir() + "/src/test/resources/unit/test-javadoc-test" );
+ }
+
+ /**
+ * @see org.apache.maven.project.MavenProject#createArtifacts(org.apache.maven.artifact.factory.ArtifactFactory,
+ * java.lang.String, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
+ */
+ public Set createArtifacts( ArtifactFactory artifactFactory, String string, ArtifactFilter artifactFilter )
+ throws InvalidDependencyVersionException
+ {
+ return Collections.EMPTY_SET;
+ }
+
+ /**
+ * @see org.apache.maven.plugin.testing.stubs.MavenProjectStub#getExecutionProject()
+ */
+ public MavenProject getExecutionProject()
+ {
+ return this;
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/stubs/TestJavadocMavenProjectStub.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?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- 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 Wed May 16 05:38:42 2007
@@ -42,6 +42,7 @@
</reactorProjects>
<aggregate>true</aggregate>
<quiet>true</quiet>
+ <javadocDirectory>${basedir}/src/test/resources/unit/aggregate-resources-test/src/main/javadoc</javadocDirectory>
</configuration>
</plugin>
</plugins>
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml?view=diff&rev=538566&r1=538565&r2=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml Wed May 16 05:38:42 2007
@@ -26,7 +26,7 @@
<version>1.0-SNAPSHOT</version>
<inceptionYear>2006</inceptionYear>
<name>Maven Javadoc Plugin Aggregate Test</name>
- <url>http://maven.apache.org</url>
+ <url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
@@ -66,6 +66,7 @@
<project implementation="org.apache.maven.plugin.javadoc.stubs.AggregateProject2TestMavenProjectStub"/>
</reactorProjects>
<aggregate>true</aggregate>
+ <javadocDirectory>${basedir}/src/test/resources/unit/aggregate-test/src/main/javadoc</javadocDirectory>
</configuration>
</plugin>
</plugins>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.jar?view=auto&rev=538566
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom Wed May 16 05:38:42 2007
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <name>JUnit</name>
+ <url>http://junit.org</url>
+ <description>
+ JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java.
+ </description>
+ <organization>
+ <name>JUnit</name>
+ <url>http://www.junit.org</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>Common Public License Version 1.0</name>
+ <url>http://www.opensource.org/licenses/cpl1.0.txt</url>
+ </license>
+ </licenses>
+ <scm>
+ <url>http://junit.cvs.sourceforge.net/junit/</url>
+ </scm>
+ <dependencies>
+ </dependencies>
+</project>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom.sha1
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom.sha1?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom.sha1 (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/junit/junit/3.8.1/junit-3.8.1.pom.sha1 Wed May 16 05:38:42 2007
@@ -0,0 +1 @@
+16d74791c801c89b0071b1680ea0bc85c93417bb junit-3.8.1.pom
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/App.java?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/App.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/App.java Wed May 16 05:38:42 2007
@@ -0,0 +1,13 @@
+package maven;
+
+/**
+ * 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/test-javadoc-test/src/main/java/maven/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/main/java/maven/App.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java Wed May 16 05:38:42 2007
@@ -0,0 +1,38 @@
+package maven;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/src/test/java/maven/AppTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml?view=auto&rev=538566
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml Wed May 16 05:38:42 2007
@@ -0,0 +1,52 @@
+<!--
+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>test.javadoc.test</groupId>
+ <artifactId>project1</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>project1</name>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.javadoc.stubs.TestJavadocMavenProjectStub"/>
+ <localRepository>${localRepository}</localRepository>
+ <outputDirectory>${basedir}/target/test/unit/test-javadoc-test/target/site/apidocs</outputDirectory>
+ <windowtitle>Maven Test Javadoc Plugin aggregate resources 1.0-SNAPSHOT API</windowtitle>
+ <quiet>true</quiet>
+ <javadocDirectory>${basedir}/src/test/resources/unit/test-javadoc-test/src/test/javadoc</javadocDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/test-javadoc-test/test-javadoc-test-plugin-config.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"