[ 
http://jira.codehaus.org/browse/CBUILDS-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=149762#action_149762
 ] 

Dan Tran commented on CBUILDS-27:
---------------------------------

please see r-7683 of c-builds source, where Map is replaced with Properties 
which we really want to get away

Revision
    7683
Author
    stimpy
Date
    2008-09-14 03:15:09 -0500 (Sun, 14 Sep 2008)

Log Message

Couldn't find docs on how to configure a java.util.Map object through plexus.

Since there was good docs on how to do so for Properties 
http://plexus.codehaus.org/guides/developer-guide/configuration/plexus-auto-configuration.html

and, there was already use of that in CompileExecMojo.java, switched all 
environments
to use java.util.Properties instead of java.util.Map

Modified Paths

    * 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/AbstractMakeExecMojo.java
    * 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/ConfigExecMojo.java
    * 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/MakeInstallExecMojo.java

Diff
Modified: 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/AbstractMakeExecMojo.java
 (7682 => 7683)

--- 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/AbstractMakeExecMojo.java
     2008-09-14 03:05:48 UTC (rev 7682)
+++ 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/AbstractMakeExecMojo.java
     2008-09-14 08:15:09 UTC (rev 7683)
@@ -21,6 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 
 import org.apache.maven.artifact.factory.ArtifactFactory;
@@ -133,7 +134,7 @@
     /**
      * @parameter
      */
-    private Map environment;
+    private Properties environment;
     
     /**
      * @parameter default-value="${session}"
@@ -656,12 +657,12 @@
         this.searchForExecutable = searchForExecutable;
     }
     
-    protected final void setEnvironment( Map environment )
+    protected final void setEnvironment( Properties environment )
     {
         this.environment = environment;
     }
     
-    protected final Map getEnvironment()
+    protected final Properties getEnvironment()
     {
         return environment;
     }

Modified: 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/ConfigExecMojo.java
 (7682 => 7683)

--- 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/ConfigExecMojo.java
   2008-09-14 03:05:48 UTC (rev 7682)
+++ 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/ConfigExecMojo.java
   2008-09-14 08:15:09 UTC (rev 7683)
@@ -18,7 +18,7 @@
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
+import java.util.Properties;
 
 import org.apache.maven.plugin.MojoExecutionException;
 
@@ -74,7 +74,7 @@
      * 
      * @parameter
      */
-    private Map configureEnvironment;
+    private Properties configureEnvironment;
 
     /**
      * This is a file location checked before and after the configure 
execution, if specified.

Modified: 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/MakeInstallExecMojo.java
 (7682 => 7683)

--- 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/MakeInstallExecMojo.java
      2008-09-14 03:05:48 UTC (rev 7682)
+++ 
c-builds/trunk/plugins/make-maven-plugin/src/main/java/org/codehaus/mojo/make/MakeInstallExecMojo.java
      2008-09-14 08:15:09 UTC (rev 7683)
@@ -16,10 +16,9 @@
  */
 
 import java.io.File;
-import java.util.HashMap;
 import java.util.List;
 import java.util.ArrayList;
-import java.util.Map;
+import java.util.Properties;
 
 import org.apache.maven.plugin.MojoExecutionException;
 
@@ -64,7 +63,7 @@
      * 
      * @parameter
      */
-    private Map installEnvironment;
+    private Properties installEnvironment;
     
     /**
      * The Make target which should be executed; default is 'install'
@@ -126,7 +125,7 @@
         {
             if ( installEnvironment == null )
             {
-                installEnvironment = new HashMap( 1 );
+                installEnvironment = new Properties();
             }
 
             getLog().debug( "Setting DESTDIR envar to: " + getDestDir() );



> Use Map instead of Properties for plugin configurations
> -------------------------------------------------------
>
>                 Key: CBUILDS-27
>                 URL: http://jira.codehaus.org/browse/CBUILDS-27
>             Project: Mojo C Builds
>          Issue Type: Bug
>    Affects Versions: 1.0-alpha-5
>            Reporter: Dan Tran
>            Assignee: Dan Tran
>             Fix For: 1.0-alpha-5
>
>
> It is best not to use  java Properties, but use Map instead which has
> a much shorter configuration and accept project.* interpolation.
> Surefire plugin is switching to this interface.
> see http://jira.codehaus.org/browse/SUREFIRE-511 for details

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to