]> source.dussan.org Git - poi.git/commitdiff
migrated javadoc settings from ant to maven plugin configuration maven maven
authorCédric Walter <cedricwalter@apache.org>
Tue, 8 Apr 2014 21:51:23 +0000 (21:51 +0000)
committerCédric Walter <cedricwalter@apache.org>
Tue, 8 Apr 2014 21:51:23 +0000 (21:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/maven@1585845 13f79535-47bb-0310-9956-ffa450edef68

old.xml
pom.xml

diff --git a/old.xml b/old.xml
index c030db1110df51b22d4dd91b8d2517135483e0d5..ceabf4719b7e43ee39ea230b808ee35a4370664e 100644 (file)
--- a/old.xml
+++ b/old.xml
@@ -760,71 +760,9 @@ under the License.
         </touch>
     </target>
 
-    <!-- Generates the API documentation. -->
-    <target name="javadocs"
-            description="Generates the API documentation">
-        <javadoc verbose="false" author="true" destdir="${apidocs.report.dir}"
-                 windowtitle="POI API Documentation" use="true" version="true" 
-                 maxmemory="384M" additionalparam="-notimestamp">
-
-            <packageset dir="${main.src}" defaultexcludes="yes">
-                <include name="org/apache/poi/**"/>
-            </packageset>
-            <packageset dir="${scratchpad.src}" defaultexcludes="yes">
-                <include name="org/apache/poi/**"/>
-                <exclude name="org/apache/poi/hdf/**"/>
-            </packageset>
-            <packageset dir="${ooxml.src}" defaultexcludes="yes">
-                <include name="org/apache/poi/**"/>
-            </packageset>
-
-            <classpath id="javadoc.classpath">
-                <path refid="main.classpath"/>
-                <path refid="ooxml.classpath"/>
-                <path path="${env.CLASSPATH}"/>
-            </classpath>
-
-            <doctitle><![CDATA[<h1>POI API Documentation</h1>]]></doctitle>
-            <bottom>
-                <![CDATA[<i>Copyright ${tstamp.year} The Apache Software Foundation or
-        its licensors, as applicable.</i>]]>
-            </bottom>
-            <group>
-                <title>DDF - Dreadful Drawing Format</title>
-                <package name="org.apache.poi.ddf*"/>
-            </group>
-            <group>
-                <title>HPSF - Horrible Property Set Format</title>
-                <package name="org.apache.poi.hpsf*"/>
-            </group>
-            <group>
-                <title>HSSF - Horrible Spreadsheet Format</title>
-                <package name="org.apache.poi.hssf*"/>
-            </group>
-            <group>
-                <title>HWPF - Horrible Word Processor Format</title>
-                <package name="org.apache.poi.hwpf*"/>
-            </group>
-            <group>
-                <title>POIFS - POI File System</title>
-                <package name="org.apache.poi.poifs*"/>
-            </group>
-            <group>
-                <title>Utilities</title>
-                <package name="org.apache.poi.util*"/>
-            </group>
-            <group>
-                <title>Examples</title>
-                <package name="org.apache.poi.hpsf.examples*"/>
-                <package name="org.apache.poi.hssf.usermodel.examples*"/>
-            </group>
-        </javadoc>
-
-    </target>
-
 
     <!-- Generates documentation and reports -->
-    <target name="site" depends="docs,javadocs"
+    <target name="site" depends="docs"
             description="Generates POI's website's contents"/>
 
     <!-- TODO to be done with assembly -->
@@ -931,7 +869,7 @@ under the License.
     </target>
 
     <target name="gump" depends="compile-all, test-all, jar"/>
-    <target name="jenkins" depends="compile-all, test-all, jar, javadocs, assemble, findbugs, rat-check"/>
+    <target name="jenkins" depends="compile-all, test-all, jar, assemble, findbugs, rat-check"/>
 
     <available property="maven.ant.tasks.present" classname="org.apache.maven.artifact.ant.Pom"/>
     <target name="maven.ant.tasks-check">
diff --git a/pom.xml b/pom.xml
index 69ad488b3867931c0b19d0a39ea048a0a7757833..708867fa1340858823a75a736c49909ab5c476b4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -53,6 +53,8 @@
         <jdk.version.class>1.6</jdk.version.class>
         <compile.debug>true</compile.debug>
 
+        <!-- used in text placed at the bottom of each javadoc see bottom property of javadoc plugin -->
+        <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
     </properties>
 
     <modules>
                     <xmlOutputDirectory>target/site</xmlOutputDirectory>
                 </configuration>
             </plugin>
+
+            <!-- see http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.9.1</version>
+                <configuration>
+                    <!-- Specifies the destination directory where javadoc saves the generated HTML files. Default is ${project.build.directory}/apidocs. -->
+                    <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
+
+                    <!-- Suppresses the timestamp, which is hidden in an HTML comment in the generated HTML near the top of each page.  -->
+                    <notimestamp>true</notimestamp>
+                    <!-- Specifies the maximum Java heap size to be used when launching the Javadoc tool.
+                        JVMs refer to this property as the -Xmx parameter. Example: '512' or '512m'.
+                        The memory unit depends on the JVM used.
+                        The units supported could be: k, kb, m, mb, g, gb, t, tb. If no unit specified, the default unit is m. -->
+                    <maxmemory>384m</maxmemory>
+                    <!-- Specifies whether or not the author text is included in the generated Javadocs. Default is true. -->
+                    <author>true</author>
+                    <!-- Default is false. -->
+                    <verbose>false</verbose>
+                    <!-- Includes one "Use" page for each documented class and package. Default is true. -->
+                    <use>true</use>
+
+                    <sourceFileIncludes>
+                        <include>org/apache/poi/**</include>
+                    </sourceFileIncludes>
+                    <sourceFileExcludes>
+                        <exclude>org/apache/poi/hdf/**</exclude>
+                    </sourceFileExcludes>
+                    <bottom><![CDATA[<i>Copyright ${maven.build.timestamp} The Apache Software Foundation or its licensors, as applicable.</i>]]></bottom>
+                    <groups>
+                        <group>
+                            <title>DDF - Dreadful Drawing Format</title>
+                            <package name="org.apache.poi.ddf*"/>
+                        </group>
+                        <group>
+                            <title>HPSF - Horrible Property Set Format</title>
+                            <package name="org.apache.poi.hpsf*"/>
+                        </group>
+                        <group>
+                            <title>HSSF - Horrible Spreadsheet Format</title>
+                            <package name="org.apache.poi.hssf*"/>
+                        </group>
+                        <group>
+                            <title>HWPF - Horrible Word Processor Format</title>
+                            <package name="org.apache.poi.hwpf*"/>
+                        </group>
+                        <group>
+                            <title>POIFS - POI File System</title>
+                            <package name="org.apache.poi.poifs*"/>
+                        </group>
+                        <group>
+                            <title>Utilities</title>
+                            <package name="org.apache.poi.util*"/>
+                        </group>
+                        <group>
+                            <title>Examples</title>
+                            <package name="org.apache.poi.hpsf.examples*"/>
+                            <package name="org.apache.poi.hssf.usermodel.examples*"/>
+                        </group>
+                    </groups>
+
+                </configuration>
+            </plugin>
         </plugins>
     </reporting>