You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2005/10/15 17:01:17 UTC

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

Author: brett
Date: Sat Oct 15 08:01:14 2005
New Revision: 321344

URL: http://svn.apache.org/viewcvs?rev=321344&view=rev
Log:
PR: MNG-1210
Submitted by: Matthew Pocock
Reviewed by:  Brett Porter
Show command line options when forking the compiler
(applied with modifications)

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

Modified: maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?rev=321344&r1=321343&r2=321344&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java (original)
+++ maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java Sat Oct 15 08:01:14 2005
@@ -300,8 +300,8 @@
 
         try
         {
-            staleSources = computeStaleSources( compilerConfiguration, compiler,
-                                                getSourceInclusionScanner( staleMillis ) );
+            staleSources =
+                computeStaleSources( compilerConfiguration, compiler, getSourceInclusionScanner( staleMillis ) );
 
             canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration );
 
@@ -356,6 +356,30 @@
                 String root = (String) it.next();
 
                 getLog().debug( " " + root );
+            }
+
+            if ( fork )
+            {
+                try
+                {
+                    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++ )
+                        {
+                            sb.append( " " );
+                            sb.append( cl[i] );
+                        }
+                        getLog().debug( "Command line options:" );
+                        getLog().debug( sb );
+                    }
+                }
+                catch ( CompilerException ce )
+                {
+                    getLog().debug( ce );
+                }
             }
         }