Author: bentmann
Date: Wed Aug 13 08:54:37 2008
New Revision: 685592

URL: http://svn.apache.org/viewvc?rev=685592&view=rev
Log:
[MINVOKER-52] Add a new mojo parameter to specify filter properties using the 
more convenient map-syntax

Modified:
    
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/CompositeMap.java
    
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java

Modified: 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/CompositeMap.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/CompositeMap.java?rev=685592&r1=685591&r2=685592&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/CompositeMap.java
 (original)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/CompositeMap.java
 Wed Aug 13 08:54:37 2008
@@ -46,7 +46,7 @@
     /**
      * The set of additional properties from which to extract interpolated 
values, never <code>null</code>.
      */
-    private Properties properties;
+    private Map properties;
 
     /**
      * Creates a new interpolation source backed by the specified Maven 
project and some user-specified properties.
@@ -55,7 +55,7 @@
      * @param properties The set of additional properties from which to 
extract interpolated values, may be
      *            <code>null</code>.
      */
-    protected CompositeMap( MavenProject mavenProject, Properties properties )
+    protected CompositeMap( MavenProject mavenProject, Map properties )
     {
         if ( mavenProject == null )
         {

Modified: 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java?rev=685592&r1=685591&r2=685592&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InvokerMojo.java
 Wed Aug 13 08:54:37 2008
@@ -272,13 +272,22 @@
 
     /**
      * List of properties which will be used to interpolate goal files.
-     *
+     * 
      * @parameter
      * @since 1.1
+     * @deprecated As of version 1.3, the parameter [EMAIL PROTECTED] 
#filterProperties} should be used instead.
      */
     private Properties interpolationsProperties;
 
     /**
+     * A list of additional properties which will be used to filter tokens in 
POMs and goal files.
+     * 
+     * @parameter
+     * @since 1.3
+     */
+    private Map filterProperties;
+
+    /**
      * The Maven Project Object
      *
      * @parameter expression="${project}"
@@ -373,7 +382,7 @@
      * integration test. This properties file may be used to specify settings 
for an individual test invocation. Any
      * property present in the file will override the corresponding setting 
from the plugin configuration. The values of
      * the properties are filtered and may use expressions like 
<code>${project.version}</code> to reference project
-     * properties or values from the parameter [EMAIL PROTECTED] 
#interpolationsProperties}. The snippet below describes the
+     * properties or values from the parameter [EMAIL PROTECTED] 
#filterProperties}. The snippet below describes the
      * supported properties:
      * 
      * <pre>
@@ -1274,11 +1283,15 @@
      */
     private Map getInterpolationValueSource()
     {
-        Properties props = new Properties();
+        Map props = new HashMap();
         if ( interpolationsProperties != null )
         {
             props.putAll( interpolationsProperties );
         }
+        if ( filterProperties != null )
+        {
+            props.putAll( filterProperties );
+        }
         if ( settings.getLocalRepository() != null )
         {
             props.put( "localRepository", settings.getLocalRepository() );


Reply via email to