Author: trygvis
Date: Sat Aug  6 05:36:48 2005
New Revision: 230547

URL: http://svn.apache.org/viewcvs?rev=230547&view=rev
Log:
o Adding parameters:
 - Show deprecation
 - Show warnings
o Using the setters on the configuration object instead of passing them in
  their raw format (eg -target 1.1).

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=230547&r1=230546&r2=230547&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 Aug  6 05:36:48 2005
@@ -45,6 +45,20 @@
     private boolean debug;
 
     /**
+     * Output source locations where deprecated APIs are used
+     *
+     * @parameter
+     */
+    private boolean showDeprecation;
+
+    /**
+     * Output warnings
+     *
+     * @parameter
+     */
+    private boolean showWarnings;
+
+    /**
      * The -source argument for the Java compiler
      *
      * @parameter
@@ -130,22 +144,17 @@
             compilerConfiguration.setSourceFiles( staleSources );
         }
 
-        if ( source != null )
-        {
-            compilerConfiguration.addCompilerOption( "-source", source );
-        }
+        compilerConfiguration.setDebug( debug );
 
-        if ( target != null )
-        {
-            compilerConfiguration.addCompilerOption( "-target", target );
-        }
+        compilerConfiguration.setShowDeprecation( showDeprecation );
 
-        if ( encoding != null )
-        {
-            compilerConfiguration.addCompilerOption( "-encoding" , encoding );
-        }
+        compilerConfiguration.setShowWarnings( showWarnings );
 
-        compilerConfiguration.setDebug( debug );
+        compilerConfiguration.setSourceVersion( source );
+
+        compilerConfiguration.setTargetVersion( target );
+
+        compilerConfiguration.setSourceEncoding( encoding );
 
         // 
----------------------------------------------------------------------
         // Dump configuration
@@ -189,7 +198,7 @@
             throw new MojoExecutionException( "No such compiler '" + 
e.getCompilerId() + "'." );
         }
 
-        getLog().info( "Using compiler '" + compilerId + "'." );
+        getLog().debug( "Using compiler '" + compilerId + "'." );
 
         try
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to