maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1070148 - in /maven/core-integration-testing/trunk: core-it-suite/src/test/java/org/apache/maven/it/ core-it-suite/src/test/resources/mng-0674/ core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/pl...
Date Sat, 12 Feb 2011 20:31:55 GMT
Author: bentmann
Date: Sat Feb 12 20:31:55 2011
New Revision: 1070148

URL: http://svn.apache.org/viewvc?rev=1070148&view=rev
Log:
[MNG-4997] Plugin @Parameter alias does not work for complex parameter types

o Strengthened IT

Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0674PluginParameterAliasTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0674/pom.xml
    maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0674PluginParameterAliasTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0674PluginParameterAliasTest.java?rev=1070148&r1=1070147&r2=1070148&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0674PluginParameterAliasTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0674PluginParameterAliasTest.java
Sat Feb 12 20:31:55 2011
@@ -26,7 +26,8 @@ import java.io.File;
 import java.util.Properties;
 
 /**
- * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-674">MNG-674</a>.
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-674">MNG-674</a>
and
+ * <a href="http://jira.codehaus.org/browse/MNG-4997">MNG-4997</a>.
  * 
  * @author John Casey
  * @version $Id$
@@ -37,7 +38,7 @@ public class MavenITmng0674PluginParamet
 
     public MavenITmng0674PluginParameterAliasTest()
     {
-        super( ALL_MAVEN_VERSIONS );
+        super( "[3.0,)" );
     }
 
     /**
@@ -59,6 +60,7 @@ public class MavenITmng0674PluginParamet
         Properties props = verifier.loadProperties( "target/config.properties" );
         assertEquals( "MNG-674-1", props.getProperty( "aliasParam" ) );
         assertEquals( "MNG-674-2", props.getProperty( "aliasDefaultExpressionParam" ) );
+        assertEquals( "MNG-4997", props.getProperty( "aliasStringParams.0" ) );
     }
 
     /**
@@ -80,6 +82,7 @@ public class MavenITmng0674PluginParamet
         Properties props = verifier.loadProperties( "target/config.properties" );
         assertEquals( "MNG-674-1", props.getProperty( "aliasParam" ) );
         assertEquals( "MNG-674-2", props.getProperty( "aliasDefaultExpressionParam" ) );
+        assertEquals( "MNG-4997", props.getProperty( "aliasStringParams.0" ) );
     }
 
 }

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0674/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0674/pom.xml?rev=1070148&r1=1070147&r2=1070148&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0674/pom.xml
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0674/pom.xml
Sat Feb 12 20:31:55 2011
@@ -20,6 +20,10 @@
           <aliasParamLegacy>MNG-674-1</aliasParamLegacy>
           <!-- parameter that has a default value -->
           <fullyAnnotatedParam>MNG-674-2</fullyAnnotatedParam>
+          <!-- parameter that is complex (cf. MNG-4997) -->
+          <aliasStringParamsLegacy>
+            <item>MNG-4997</item>
+          </aliasStringParamsLegacy>
         </configuration>
         <executions>
           <execution>

Modified: maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java?rev=1070148&r1=1070147&r2=1070148&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java
(original)
+++ maven/core-integration-testing/trunk/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/ConfigMojo.java
Sat Feb 12 20:31:55 2011
@@ -236,6 +236,13 @@ public class ConfigMojo
     private Properties propertiesParam;
 
     /**
+     * A complex parameter with an alias.
+     * 
+     * @parameter alias="aliasStringParamsLegacy"
+     */
+    private String[] aliasStringParams;
+
+    /**
      * A complex parameter of type {@link org.apache.maven.plugin.coreit.Bean}.
      * 
      * @parameter
@@ -323,6 +330,7 @@ public class ConfigMojo
         PropertiesUtil.serialize( props, "setParam", setParam );
         PropertiesUtil.serialize( props, "mapParam", mapParam );
         PropertiesUtil.serialize( props, "propertiesParam", propertiesParam );
+        PropertiesUtil.serialize( props, "aliasStringParams", aliasStringParams );
         PropertiesUtil.serialize( props, "domParam", domParam );
         if ( beanParam != null )
         {



Mime
View raw message