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

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

Author: carlos
Date: Tue Dec 27 13:17:12 2005
New Revision: 359282

URL: http://svn.apache.org/viewcvs?rev=359282&view=rev
Log:
Allow setting compiler arguments like Xlint
PR: MCOMPILER-23

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/viewcvs/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?rev=359282&r1=359281&r2=359282&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 Dec 27 13:17:12 2005
@@ -299,11 +299,18 @@
             {
                 Map.Entry me = (Map.Entry) i.next();
                 String key = (String) me.getKey();
+                String value = (String) me.getValue();
                 if ( !key.startsWith( "-" ))
                 {
                     key = "-" + key;
                 }
-                cplrArgsCopy.put( key, me.getValue() );
+                /* handle Xlint like parameters */
+                if ( value.startsWith( ":" ))
+                {
+                    key += value;
+                    value = null;
+                }
+                cplrArgsCopy.put( key, value );
             }
             compilerConfiguration.setCustomCompilerArguments( cplrArgsCopy );
         }