Author: vsiveton
Date: Thu Jun  5 05:38:23 2008
New Revision: 663588

URL: http://svn.apache.org/viewvc?rev=663588&view=rev
Log:
o replaced p-u deprecated methods

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/JavadocUtil.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=663588&r1=663587&r2=663588&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 Jun  5 05:38:23 2008
@@ -102,16 +102,6 @@
     extends AbstractMojo
 {
     /**
-     * The current build session instance. This is used for
-     * toolchain manager API calls.
-     *
-     * @parameter expression="${session}"
-     * @required
-     * @readonly
-     */
-    private MavenSession session;
-
-    /**
      * The current class directory
      */
     private static final String RESOURCE_DIR = ClassUtils.getPackageName( 
JavadocReport.class ).replace( '.', '/' );
@@ -202,6 +192,16 @@
     // ----------------------------------------------------------------------
 
     /**
+     * The current build session instance. This is used for
+     * toolchain manager API calls.
+     *
+     * @parameter expression="${session}"
+     * @required
+     * @readonly
+     */
+    private MavenSession session;
+
+    /**
      * The Maven Settings.
      *
      * @since 2.3
@@ -1396,7 +1396,7 @@
 
         if ( StringUtils.isNotEmpty( additionalJOption ) )
         {
-            cmd.createArgument().setValue( additionalJOption );
+            cmd.createArg().setValue( additionalJOption );
         }
 
         // General javadoc arguments
@@ -1633,7 +1633,7 @@
 
         if ( getLog().isDebugEnabled() )
         {
-            getLog().debug( Commandline.toString( cmd.getCommandline() 
).replaceAll( "'", "" ) ); // no quoted arguments
+            getLog().debug( CommandLineUtils.toString( cmd.getCommandline() 
).replaceAll( "'", "" ) ); // no quoted arguments
         }
 
         if ( debug )
@@ -1642,7 +1642,7 @@
 
             try
             {
-                FileUtils.fileWrite( commandLineFile.getAbsolutePath(), 
Commandline.toString( cmd.getCommandline() ).replaceAll( "'", "" ) );
+                FileUtils.fileWrite( commandLineFile.getAbsolutePath(), 
CommandLineUtils.toString( cmd.getCommandline() ).replaceAll( "'", "" ) );
 
                 if ( !SystemUtils.IS_OS_WINDOWS )
                 {
@@ -1665,7 +1665,7 @@
 
             if ( exitCode != 0 )
             {
-                String cmdLine = Commandline.toString( cmd.getCommandline() 
).replaceAll( "'", "" );
+                String cmdLine = CommandLineUtils.toString( 
cmd.getCommandline() ).replaceAll( "'", "" );
                 cmdLine = JavadocUtil.hideProxyPassword( cmdLine, settings );
 
                 StringBuffer msg = new StringBuffer( "Exit code: " + exitCode 
+ " - " + err.getOutput() );
@@ -2417,7 +2417,7 @@
         {
             try
             {
-                cmd.createArgument().setValue( "-J" + arg + 
JavadocUtil.parseJavadocMemory( memory ) );
+                cmd.createArg().setValue( "-J" + arg + 
JavadocUtil.parseJavadocMemory( memory ) );
             }
             catch ( IllegalArgumentException e )
             {
@@ -2444,7 +2444,7 @@
                 getLog().warn( "The Javadoc plugin parameter 'proxyHost' is 
deprecated since 2.4. " +
                         "Please configure an active proxy in your 
settings.xml." );
             }
-            cmd.createArgument().setValue( "-J-DproxyHost=" + proxyHost );
+            cmd.createArg().setValue( "-J-DproxyHost=" + proxyHost );
 
             if ( proxyPort > 0 )
             {
@@ -2453,7 +2453,7 @@
                     getLog().warn( "The Javadoc plugin parameter 'proxyPort' 
is deprecated since 2.4. " +
                         "Please configure an active proxy in your 
settings.xml." );
                 }
-                cmd.createArgument().setValue( "-J-DproxyPort=" + proxyPort );
+                cmd.createArg().setValue( "-J-DproxyPort=" + proxyPort );
             }
         }
 
@@ -2470,26 +2470,26 @@
 
             if ( StringUtils.isNotEmpty( activeProxy.getHost() ) )
             {
-                cmd.createArgument().setValue( "-J-D" + protocol + 
"proxySet=true" );
-                cmd.createArgument().setValue( "-J-D" + protocol + 
"proxyHost=" + activeProxy.getHost() );
+                cmd.createArg().setValue( "-J-D" + protocol + "proxySet=true" 
);
+                cmd.createArg().setValue( "-J-D" + protocol + "proxyHost=" + 
activeProxy.getHost() );
 
                 if ( activeProxy.getPort() > 0 )
                 {
-                    cmd.createArgument().setValue( "-J-D" + protocol + 
"proxyPort=" + activeProxy.getPort() );
+                    cmd.createArg().setValue( "-J-D" + protocol + "proxyPort=" 
+ activeProxy.getPort() );
                 }
 
                 if ( StringUtils.isNotEmpty( activeProxy.getNonProxyHosts() ) )
                 {
-                    cmd.createArgument().setValue( "-J-D" + protocol + 
"nonProxyHosts=\"" + activeProxy.getNonProxyHosts() + "\"" );
+                    cmd.createArg().setValue( "-J-D" + protocol + 
"nonProxyHosts=\"" + activeProxy.getNonProxyHosts() + "\"" );
                 }
 
                 if ( StringUtils.isNotEmpty( activeProxy.getUsername() ) )
                 {
-                    cmd.createArgument().setValue( "-J-Dhttp.proxyUser=\"" + 
activeProxy.getUsername() + "\"" );
+                    cmd.createArg().setValue( "-J-Dhttp.proxyUser=\"" + 
activeProxy.getUsername() + "\"" );
 
                     if ( StringUtils.isNotEmpty( activeProxy.getPassword() ) )
                     {
-                        cmd.createArgument().setValue( 
"-J-Dhttp.proxyPassword=\"" + activeProxy.getPassword() + "\"" );
+                        cmd.createArg().setValue( "-J-Dhttp.proxyPassword=\"" 
+ activeProxy.getPassword() + "\"" );
                     }
                 }
             }
@@ -3180,7 +3180,7 @@
                 + "' temporary file for command execution", e );
         }
 
-        cmd.createArgument().setValue( "@options" );
+        cmd.createArg().setValue( "@options" );
 
         if ( !debug )
         {
@@ -3231,11 +3231,11 @@
 
         if ( isJavaDocVersionAtLeast( SINCE_JAVADOC_1_4 ) )
         {
-            cmd.createArgument().setValue( "@argfile" );
+            cmd.createArg().setValue( "@argfile" );
         }
         else
         {
-            cmd.createArgument().setValue( "@files" );
+            cmd.createArg().setValue( "@files" );
         }
 
         if ( !debug )
@@ -3271,7 +3271,7 @@
                 + "' temporary file for command execution", e );
         }
 
-        cmd.createArgument().setValue( "@packages" );
+        cmd.createArg().setValue( "@packages" );
 
         if ( !debug )
         {

Modified: 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=663588&r1=663587&r2=663588&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
 (original)
+++ 
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
 Thu Jun  5 05:38:23 2008
@@ -453,7 +453,7 @@
         Commandline cmd = new Commandline();
         cmd.setExecutable( javadocExe.getAbsolutePath() );
         cmd.setWorkingDirectory( javadocExe.getParentFile() );
-        cmd.createArgument().setValue( "-J-version" );
+        cmd.createArg().setValue( "-J-version" );
 
         CommandLineUtils.StringStreamConsumer out = new 
CommandLineUtils.StringStreamConsumer();
         CommandLineUtils.StringStreamConsumer err = new 
CommandLineUtils.StringStreamConsumer();
@@ -464,7 +464,7 @@
         {
             StringBuffer msg = new StringBuffer( "Exit code: " + exitCode + " 
- " + err.getOutput() );
             msg.append( '\n' );
-            msg.append( "Command line was:" + Commandline.toString( 
cmd.getCommandline() ) );
+            msg.append( "Command line was:" + CommandLineUtils.toString( 
cmd.getCommandline() ) );
             throw new CommandLineException( msg.toString() );
         }
 


Reply via email to