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

-Dan



On Sun, Sep 14, 2008 at 1:15 AM,  <[EMAIL PROTECTED]> wrote:
> 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() );
>
> ________________________________
>
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email

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

    http://xircles.codehaus.org/manage_email


Reply via email to