You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mk...@apache.org on 2010/01/19 08:41:34 UTC

svn commit: r900690 - /maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java

Author: mkleint
Date: Tue Jan 19 07:41:34 2010
New Revision: 900690

URL: http://svn.apache.org/viewvc?rev=900690&view=rev
Log:
as suggested by jglick in MCOMPILER-98, print execution information even in unforked mode.

Modified:
    maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java

Modified: maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?rev=900690&r1=900689&r2=900690&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java (original)
+++ maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java Tue Jan 19 07:41:34 2010
@@ -526,34 +526,34 @@
                 getLog().debug( " " + root );
             }
 
-            if ( fork )
+            try
             {
-                try
+                if ( fork )
                 {
                     if ( compilerConfiguration.getExecutable() != null )
                     {
                         getLog().debug( "Excutable: " );
                         getLog().debug( " " + compilerConfiguration.getExecutable() );
                     }
+                }
 
-                    String[] cl = compiler.createCommandLine( compilerConfiguration );
-                    if ( cl != null && cl.length > 0 )
+                String[] cl = compiler.createCommandLine( compilerConfiguration );
+                if ( cl != null && cl.length > 0 )
+                {
+                    StringBuffer sb = new StringBuffer();
+                    sb.append( cl[0] );
+                    for ( int i = 1; i < cl.length; i++ )
                     {
-                        StringBuffer sb = new StringBuffer();
-                        sb.append( cl[0] );
-                        for ( int i = 1; i < cl.length; i++ )
-                        {
-                            sb.append( " " );
-                            sb.append( cl[i] );
-                        }
-                        getLog().debug( "Command line options:" );
-                        getLog().debug( sb );
+                        sb.append( " " );
+                        sb.append( cl[i] );
                     }
+                    getLog().debug( "Command line options:" );
+                    getLog().debug( sb );
                 }
-                catch ( CompilerException ce )
-                {
-                    getLog().debug( ce );
-                }
+            }
+            catch ( CompilerException ce )
+            {
+                getLog().debug( ce );
             }
         }