Section 1.16. Generating Project Documentation


1.16. Generating Project Documentation

If you are developing a Java application or library, you might want to generate JavaDoc.

1.16.1. How do I do that?

Simply execute the javadoc goal and Maven will generate project documentation. Here is the output of the execution of the javadoc goal:

C:\dev\mavenbook\code\genapp\test-application>maven javadoc  _ _  _ _ |  \/  |_ _ _Apache_ _ _ _ _ | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~ |_|  |_\_ _,_|\_/\_ _ _|_||_|  v. 1.0.2    build:start:    xdoc:init:    maven-javadoc-plugin:report:     [mkdir] Created dir: C:\dev\mavenbook\code\genapp\test-application\target\ javadoc\src     [javadoc] Generating Javadoc     [javadoc] Javadoc execution     [javadoc] Loading source files for package mdn.testapp...     [javadoc] Constructing Javadoc information...     [javadoc] Standard Doclet version 1.5.0_01     [javadoc] Building tree for all the packages and classes...     [javadoc] Generating C:\dev\mavenbook\code\genapp\test-application\target\docs\apidocs\ constant-values.html...     [javadoc] Copying file C:\Documents and Settings\tobrien\.maven\cache\ maven-javadoc-plugin-1.7\plugin-resources\stylesheet.css to file C:\dev\mavenbook\code\ genapp\test-application\target\docs\apidocs\stylesheet.css...     [javadoc] Building index for all the packages and classes...     [javadoc] Building index for all classes...     [delete] Deleting directory C:\dev\mavenbook\code\genapp\test-application\target\ javadoc\src BUILD SUCCESSFUL Total time: 7 seconds

Once this goal has been executed, JavaDoc is available in test-application/target/javadoc/src.

1.16.2. What just happened?

Once again, Maven did all of the heavy lifting. You wanted JavaDoc, you told Maven to generate JavaDoc, end of story. Note that you didn't need to tell Maven anything about the project; it just "knew" what to do. Much of Maven is this straightforward; after you tell Maven about your project there isn't much more you need to do. It handles the details.



Maven. A Developer's Notebook
Maven: A Developers Notebook (Developers Notebooks)
ISBN: 0596007507
EAN: 2147483647
Year: 2003
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net