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/31 12:20:09 UTC

svn commit: r681323 - /maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java

Author: vsiveton
Date: Thu Jul 31 03:20:09 2008
New Revision: 681323

URL: http://svn.apache.org/viewvc?rev=681323&view=rev
Log:
o used options in alphabetical order

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java

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=681323&r1=681322&r2=681323&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 31 03:20:09 2008
@@ -357,6 +357,9 @@
      */
     private String javadocVersion;
 
+    /**
+     * Version of the Javadoc Tool executable to use as float.
+     */
     private float fJavadocVersion = 0.0f;
 
     /**
@@ -397,7 +400,7 @@
     protected boolean useStandardDocletOptions;
 
     // ----------------------------------------------------------------------
-    // Javadoc Options
+    // Javadoc Options - all alphabetical
     // ----------------------------------------------------------------------
 
     /**
@@ -704,7 +707,7 @@
     private boolean verbose;
 
     // ----------------------------------------------------------------------
-    // Standard Doclet Options
+    // Standard Doclet Options - all alphabetical
     // ----------------------------------------------------------------------
 
     /**
@@ -3497,20 +3500,35 @@
         // see com.sun.tools.javadoc.Start#parseAndExecute(String argv[])
         addArgIfNotEmpty( arguments, "-locale", JavadocUtil.quotedArgument( this.locale ) );
 
+        // all options in alphabetical order
 
-        addArgIfNotEmpty( arguments, "-bootclasspath", JavadocUtil.quotedPathArgument( getBootclassPath() ) );
+        if ( old && isJavaDocVersionAtLeast( SINCE_JAVADOC_1_4 ) )
+        {
+            if ( getLog().isWarnEnabled() )
+            {
+                getLog().warn( "Javadoc 1.4+ doesn't support the -1.1 switch anymore. Ignore this option." );
+            }
+        }
+        else
+        {
+            addArgIf( arguments, old, "-1.1" );
+        }
 
-        addArgIfNotEmpty( arguments, "-classpath", JavadocUtil.quotedPathArgument( getClasspath() ) );
+        addArgIfNotEmpty( arguments, "-bootclasspath", JavadocUtil.quotedPathArgument( getBootclassPath() ) );
 
         if ( isJavaDocVersionAtLeast( SINCE_JAVADOC_1_5 ) )
         {
             addArgIf( arguments, breakiterator, "-breakiterator", SINCE_JAVADOC_1_5 );
         }
+
+        addArgIfNotEmpty( arguments, "-classpath", JavadocUtil.quotedPathArgument( getClasspath() ) );
+
         if ( StringUtils.isNotEmpty( doclet ) )
         {
             addArgIfNotEmpty( arguments, "-doclet", JavadocUtil.quotedArgument( doclet ) );
             addArgIfNotEmpty( arguments, "-docletpath", JavadocUtil.quotedPathArgument( getDocletPath() ) );
         }
+
         if ( StringUtils.isEmpty( encoding ) )
         {
             getLog().warn(
@@ -3518,40 +3536,30 @@
                                + ReaderFactory.FILE_ENCODING + ", i.e. build is platform dependent!" );
         }
         addArgIfNotEmpty( arguments, "-encoding", JavadocUtil.quotedArgument( encoding ) );
-        addArgIfNotEmpty( arguments, "-extdirs", JavadocUtil.quotedPathArgument( extdirs ) );
 
-        if ( old && isJavaDocVersionAtLeast( SINCE_JAVADOC_1_4 ) )
-        {
-            if ( getLog().isWarnEnabled() )
-            {
-                getLog().warn( "Javadoc 1.4+ doesn't support the -1.1 switch anymore. Ignore this option." );
-            }
-        }
-        else
-        {
-            addArgIf( arguments, old, "-1.1" );
-        }
+        addArgIfNotEmpty( arguments, "-exclude", getExcludedPackages( sourcePaths ), SINCE_JAVADOC_1_4 );
+
+        addArgIfNotEmpty( arguments, "-extdirs", JavadocUtil.quotedPathArgument( extdirs ) );
 
         if ( ( getOverview() != null ) && ( getOverview().exists() ) )
         {
             addArgIfNotEmpty( arguments, "-overview",
                               JavadocUtil.quotedPathArgument( getOverview().getAbsolutePath() ) );
         }
+
         arguments.add( getAccessLevel() );
 
         if ( isJavaDocVersionAtLeast( SINCE_JAVADOC_1_5 ) )
         {
             addArgIf( arguments, quiet, "-quiet", SINCE_JAVADOC_1_5 );
         }
+
         addArgIfNotEmpty( arguments, "-source", JavadocUtil.quotedArgument( source ), SINCE_JAVADOC_1_4 );
-        addArgIf( arguments, verbose, "-verbose" );
-        addArgIfNotEmpty( arguments, null, additionalparam );
 
         if ( ( StringUtils.isEmpty( sourcepath ) ) && ( StringUtils.isNotEmpty( subpackages ) ) )
         {
             sourcepath = StringUtils.join( sourcePaths.iterator(), File.pathSeparator );
         }
-
         addArgIfNotEmpty( arguments, "-sourcepath", JavadocUtil.quotedPathArgument( getSourcePath( sourcePaths ) ) );
 
         if ( StringUtils.isNotEmpty( sourcepath ) && isJavaDocVersionAtLeast( SINCE_JAVADOC_1_5 ) )
@@ -3559,7 +3567,9 @@
             addArgIfNotEmpty( arguments, "-subpackages", subpackages, SINCE_JAVADOC_1_5 );
         }
 
-        addArgIfNotEmpty( arguments, "-exclude", getExcludedPackages( sourcePaths ), SINCE_JAVADOC_1_4 );
+        addArgIf( arguments, verbose, "-verbose" );
+
+        addArgIfNotEmpty( arguments, null, additionalparam );
     }
 
     /**
@@ -3579,62 +3589,95 @@
     {
         validateStandardDocletOptions();
 
+        // all options in alphabetical order
+
         addArgIf( arguments, author, "-author" );
+
         addArgIfNotEmpty( arguments, "-bottom", JavadocUtil.quotedArgument( getBottomText() ), false, false );
+
         if ( !isJavaDocVersionAtLeast( SINCE_JAVADOC_1_5 ) )
         {
             addArgIf( arguments, breakiterator, "-breakiterator", SINCE_JAVADOC_1_4 );
         }
+
         addArgIfNotEmpty( arguments, "-charset", JavadocUtil.quotedArgument( getCharset() ) );
+
         addArgIfNotEmpty( arguments, "-d", JavadocUtil.quotedPathArgument( javadocOutputDirectory.toString() ) );
-        addArgIf( arguments, docfilessubdirs, "-docfilessubdirs", SINCE_JAVADOC_1_4 );
+
         addArgIfNotEmpty( arguments, "-docencoding", JavadocUtil.quotedArgument( getDocencoding() ) );
+
+        addArgIf( arguments, docfilessubdirs, "-docfilessubdirs", SINCE_JAVADOC_1_4 );
+
         addArgIfNotEmpty( arguments, "-doctitle", JavadocUtil.quotedArgument( getDoctitle() ), false, false );
+
         if ( docfilessubdirs )
         {
             addArgIfNotEmpty( arguments, "-excludedocfilessubdir",
                               JavadocUtil.quotedPathArgument( excludedocfilessubdir ), SINCE_JAVADOC_1_4 );
         }
+
         addArgIfNotEmpty( arguments, "-footer", JavadocUtil.quotedArgument( footer ), false, false );
+
         addGroups( arguments );
+
         addArgIfNotEmpty( arguments, "-header", JavadocUtil.quotedArgument( header ), false, false );
+
         addArgIfNotEmpty( arguments, "-helpfile", JavadocUtil.quotedPathArgument( helpfile ) );
+
         addArgIf( arguments, keywords, "-keywords", SINCE_JAVADOC_1_4_2 );
 
         if ( !isOffline )
         {
             addLinkArguments( arguments );
         }
+
         addLinkofflineArguments( arguments );
 
+        addArgIf( arguments, linksource, "-linksource", SINCE_JAVADOC_1_4 );
+
+        if ( sourcetab > 0 )
+        {
+            if ( fJavadocVersion == SINCE_JAVADOC_1_4_2 )
+            {
+                addArgIfNotEmpty( arguments, "-linksourcetab", String.valueOf( sourcetab ) );
+            }
+            addArgIfNotEmpty( arguments, "-sourcetab", String.valueOf( sourcetab ), SINCE_JAVADOC_1_5 );
+        }
+
+        addArgIf( arguments, nocomment, "-nocomment", SINCE_JAVADOC_1_4 );
+
         addArgIf( arguments, nodeprecated, "-nodeprecated" );
+
         addArgIf( arguments, nodeprecatedlist, "-nodeprecatedlist" );
-        addArgIf( arguments, nocomment, "-nocomment", SINCE_JAVADOC_1_4 );
+
         addArgIf( arguments, nohelp, "-nohelp" );
+
         addArgIf( arguments, noindex, "-noindex" );
+
         addArgIf( arguments, nonavbar, "-nonavbar" );
+
         addArgIf( arguments, nooverview, "-nooverview" );
+
         addArgIfNotEmpty( arguments, "-noqualifier", JavadocUtil.quotedArgument( noqualifier ), SINCE_JAVADOC_1_4 );
+
         addArgIf( arguments, nosince, "-nosince" );
+
         addArgIf( arguments, notimestamp, "-notimestamp", SINCE_JAVADOC_1_5 );
+
         addArgIf( arguments, notree, "-notree" );
+
         addArgIfNotEmpty( arguments, "-packagesheader", JavadocUtil.quotedArgument( packagesheader ),
                           SINCE_JAVADOC_1_4_2 );
+
         if ( !isJavaDocVersionAtLeast( SINCE_JAVADOC_1_5 ) ) // Sun bug: 4714350
         {
             addArgIf( arguments, quiet, "-quiet", SINCE_JAVADOC_1_4 );
         }
+
         addArgIf( arguments, serialwarn, "-serialwarn" );
-        addArgIf( arguments, linksource, "-linksource", SINCE_JAVADOC_1_4 );
-        if ( sourcetab > 0 )
-        {
-            if ( fJavadocVersion == SINCE_JAVADOC_1_4_2 )
-            {
-                addArgIfNotEmpty( arguments, "-linksourcetab", String.valueOf( sourcetab ) );
-            }
-            addArgIfNotEmpty( arguments, "-sourcetab", String.valueOf( sourcetab ), SINCE_JAVADOC_1_5 );
-        }
+
         addArgIf( arguments, splitindex, "-splitindex" );
+
         addArgIfNotEmpty( arguments, "-stylesheetfile",
                           JavadocUtil.quotedPathArgument( getStylesheetFile( javadocOutputDirectory ) ) );
 
@@ -3648,11 +3691,15 @@
         addTagletsFromTagletArtifacts( arguments );
         addArgIfNotEmpty( arguments, "-tagletpath", JavadocUtil.quotedPathArgument( getTagletPath() ),
                           SINCE_JAVADOC_1_4 );
+
         addTags( arguments );
 
         addArgIfNotEmpty( arguments, "-top", JavadocUtil.quotedArgument( top ), false, false, SINCE_JAVADOC_1_6 );
+
         addArgIf( arguments, use, "-use" );
+
         addArgIf( arguments, version, "-version" );
+
         addArgIfNotEmpty( arguments, "-windowtitle", JavadocUtil.quotedArgument( getWindowtitle() ), false, false );
     }