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 2008/07/26 15:29:40 UTC
svn commit: r679989 - in /maven/plugins/trunk/maven-javadoc-plugin/src:
main/java/org/apache/maven/plugin/javadoc/TestJavadocJar.java
main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
site/apt/examples/test-javadocs.apt
Author: vsiveton
Date: Sat Jul 26 06:29:40 2008
New Revision: 679989
URL: http://svn.apache.org/viewvc?rev=679989&view=rev
Log:
MJAVADOC-203: Test report should have its own config
o update test report and test jar
o update documentation
Modified:
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocJar.java
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocJar.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocJar.java?rev=679989&r1=679988&r2=679989&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocJar.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocJar.java Sat Jul 26 06:29:40 2008
@@ -48,7 +48,7 @@
// ----------------------------------------------------------------------
/**
- * Specifies the destination directory where javadoc saves the generated HTML files.
+ * Specifies the destination directory where Javadoc saves the generated HTML files.
* <br/>
* See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#d">d</a>.
* <br/>
@@ -59,46 +59,50 @@
private File outputDirectory;
/**
- * Specifies the title to be placed near the top of the overview summary file.
+ * Specifies the Test 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>.
* <br/>
*
- * @parameter expression="${doctitle}" default-value="${project.name} ${project.version} Test API"
+ * @parameter expression="${testDoctitle}" alias="doctitle" default-value="${project.name} ${project.version} Test API"
+ * @since 2.5
*/
- private String doctitle;
+ private String testDoctitle;
/**
- * Specifies that javadoc should retrieve the text for the overview documentation from the "source" file
+ * Specifies that Javadoc should retrieve the text for the Test 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>.
* <br/>
*
- * @parameter expression="${overview}" default-value="${basedir}/src/test/javadoc/overview.html"
+ * @parameter expression="${testOverview}" alias="overview" default-value="${basedir}/src/test/javadoc/overview.html"
+ * @since 2.5
*/
- private File overview;
+ private File testOverview;
/**
- * Specifies the title to be placed in the HTML title tag.
+ * Specifies the Test 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>.
* <br/>
*
- * @parameter expression="${windowtitle}" default-value="${project.name} ${project.version} Test API"
+ * @parameter expression="${testWindowtitle}" alias="windowtitle" default-value="${project.name} ${project.version} Test API"
+ * @since 2.5
*/
- private String windowtitle;
+ private String testWindowtitle;
// ----------------------------------------------------------------------
// Mojo Parameters (should be inline with options defined in TestJavadocReport)
// ----------------------------------------------------------------------
/**
- * Specifies the test Javadoc ressources directory to be included in the Javadoc (i.e. package.html, images...).
+ * Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
*
- * @parameter expression="${basedir}/src/test/javadoc"
+ * @parameter expression="${basedir}/src/test/javadoc" alias="javadocDirectory"
+ * @since 2.5
*/
- private File javadocDirectory;
+ private File testJavadocDirectory;
// ----------------------------------------------------------------------
// Protected methods
@@ -123,25 +127,25 @@
/** {@inheritDoc} */
protected File getJavadocDirectory()
{
- return javadocDirectory;
+ return testJavadocDirectory;
}
/** {@inheritDoc} */
protected String getDoctitle()
{
- return doctitle;
+ return testDoctitle;
}
/** {@inheritDoc} */
protected File getOverview()
{
- return overview;
+ return testOverview;
}
/** {@inheritDoc} */
protected String getWindowtitle()
{
- return windowtitle;
+ return testWindowtitle;
}
/** {@inheritDoc} */
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java?rev=679989&r1=679988&r2=679989&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/TestJavadocReport.java Sat Jul 26 06:29:40 2008
@@ -51,42 +51,45 @@
// ----------------------------------------------------------------------
/**
- * Specifies the title to be placed near the top of the overview summary file.
+ * Specifies the Test 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>.
* <br/>
*
- * @parameter expression="${doctitle}" default-value="${project.name} ${project.version} Test API"
+ * @parameter expression="${testDoctitle}" alias="doctitle" default-value="${project.name} ${project.version} Test API"
+ * @since 2.5
*/
- private String doctitle;
+ private String testDoctitle;
/**
- * Specifies that javadoc should retrieve the text for the overview documentation from the "source" file
+ * Specifies that Javadoc should retrieve the text for the Test 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>.
* <br/>
*
- * @parameter expression="${overview}" default-value="${basedir}/src/test/javadoc/overview.html"
+ * @parameter expression="${testOverview}" alias="overview" default-value="${basedir}/src/test/javadoc/overview.html"
+ * @since 2.5
*/
- private File overview;
+ private File testOverview;
/**
- * Specifies the title to be placed in the HTML title tag.
+ * Specifies the Test 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>.
* <br/>
*
- * @parameter expression="${windowtitle}" default-value="${project.name} ${project.version} Test API"
+ * @parameter expression="${testWindowtitle}" alias="windowtitle" default-value="${project.name} ${project.version} Test API"
+ * @since 2.5
*/
- private String windowtitle;
+ private String testWindowtitle;
// ----------------------------------------------------------------------
// Mojo Parameters (should be inline with options defined in TestJavadocJar)
// ----------------------------------------------------------------------
/**
- * Specifies the destination directory where test javadoc saves the generated HTML files.
+ * Specifies the destination directory where test Javadoc saves the generated HTML files.
*
* @parameter expression="${project.reporting.outputDirectory}/testapidocs"
* @required
@@ -102,29 +105,32 @@
private String destDir;
/**
- * Specifies the test Javadoc ressources directory to be included in the Javadoc (i.e. package.html, images...).
+ * Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
*
- * @parameter expression="${basedir}/src/test/javadoc"
+ * @parameter expression="${basedir}/src/test/javadoc" alias="javadocDirectory"
+ * @since 2.5
*/
- private File javadocDirectory;
+ private File testJavadocDirectory;
// ----------------------------------------------------------------------
// Report Mojo Parameters
// ----------------------------------------------------------------------
/**
- * The name of the test Javadoc report.
+ * The name of the Test Javadoc report.
*
- * @parameter expression="${name}"
+ * @parameter expression="${testName}" alias="name"
+ * @since 2.5
*/
- private String name;
+ private String testName;
/**
- * The description of the test Javadoc report.
+ * The description of the Test Javadoc report.
*
- * @parameter expression="${description}"
+ * @parameter expression="${testDescription}" alias="description"
+ * @since 2.5
*/
- private String description;
+ private String testDescription;
// ----------------------------------------------------------------------
// Report public methods
@@ -133,23 +139,23 @@
/** {@inheritDoc} */
public String getName( Locale locale )
{
- if ( StringUtils.isEmpty( name ) )
+ if ( StringUtils.isEmpty( testName ) )
{
return getBundle( locale ).getString( "report.test-javadoc.name" );
}
- return name;
+ return testName;
}
/** {@inheritDoc} */
public String getDescription( Locale locale )
{
- if ( StringUtils.isEmpty( description ) )
+ if ( StringUtils.isEmpty( testDescription ) )
{
return getBundle( locale ).getString( "report.test-javadoc.description" );
}
- return description;
+ return testDescription;
}
/** {@inheritDoc} */
@@ -238,25 +244,25 @@
/** {@inheritDoc} */
protected File getJavadocDirectory()
{
- return javadocDirectory;
+ return testJavadocDirectory;
}
/** {@inheritDoc} */
protected String getDoctitle()
{
- return doctitle;
+ return testDoctitle;
}
/** {@inheritDoc} */
protected File getOverview()
{
- return overview;
+ return testOverview;
}
/** {@inheritDoc} */
protected String getWindowtitle()
{
- return windowtitle;
+ return testWindowtitle;
}
/** {@inheritDoc} */
Modified: 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?rev=679989&r1=679988&r2=679989&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/test-javadocs.apt Sat Jul 26 06:29:40 2008
@@ -3,7 +3,7 @@
------
Vincent Siveton
------
- May 2007
+ 2008-07-28
------
~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -70,7 +70,7 @@
`-- app.png
+-----+
-* Using the javadoc:test-javadoc goal
+* Using the <javadoc:test-javadoc> goal
You need to configure the Maven Javadoc plugin in your pom.xml, for instance:
@@ -84,6 +84,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
+ <doctitle>My API for ${project.name} ${project.version}</doctitle> <!-- Used by javadoc:javadoc goal -->
+ <windowtitle>My API for ${project.name} ${project.version}</windowtitle> <!-- Used by javadoc:javadoc goal -->
+
+ <testDoctitle>My Test API for ${project.name} ${project.version}</testDoctitle> <!-- Used by javadoc:test-javadoc goal -->
+ <testWindowtitle>My Test API for ${project.name} ${project.version}</testWindowtitle> <!-- Used by javadoc:test-javadoc goal -->
...
</configuration>
</plugin>
@@ -93,12 +98,14 @@
</project>
+-----+
- You could call <mvn javadoc:test-javadoc> or <mvn site>.
+ You could call <mvn javadoc:test-javadoc> or <mvn site>. See
+ {{{../test-javadoc-mojo.html}javadoc:test-javadoc parameters}} for more informations.
- <<Note:>> In this case, the Javadoc report and the test Javadoc report use the same configuration.
+ <<Note>>: If you don't set \<testDoctitle/\> or \<testWindowtitle/\> parameters, the Test Javadoc report use the same
+ configuration (i.e. \<doctitle/\> or \<windowtitle/\> parameters) that Javadoc report (backward compatible reasons).
- <<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.
+ <<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
@@ -119,6 +126,8 @@
<reportSet>
<id>html</id>
<configuration>
+ <doctitle>My API for ${project.name} ${project.version}</doctitle>
+ <windowtitle>My API for ${project.name} ${project.version}</windowtitle>
...
</configuration>
<reports>
@@ -128,6 +137,8 @@
<reportSet>
<id>test-html</id>
<configuration>
+ <testDoctitle>My Test API for ${project.name} ${project.version}</testDoctitle>
+ <testWindowtitle>My Test API for ${project.name} ${project.version}</testWindowtitle>
...
</configuration>
<reports>