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 );
}