svn commit: r168634 - /maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r168634 - /maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java

John Casey-2
Author: jdcasey
Date: Fri May  6 11:34:50 2005
New Revision: 168634

URL: http://svn.apache.org/viewcvs?rev=168634&view=rev
Log:
Forgot to commit the marmalade changes for the descriptor cleanup.

Modified:
    maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java

Modified: maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java?rev=168634&r1=168633&r2=168634&view=diff
==============================================================================
--- maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java (original)
+++ maven/components/trunk/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java Fri May  6 11:34:50 2005
@@ -16,12 +16,14 @@
  * limitations under the License.
  */
 
+import org.apache.maven.plugin.descriptor.DuplicateParameterException;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.script.marmalade.MarmaladeMojoExecutionDirectives;
 import org.codehaus.marmalade.model.AbstractMarmaladeTag;
 import org.codehaus.marmalade.runtime.MarmaladeExecutionContext;
 import org.codehaus.marmalade.runtime.MarmaladeExecutionException;
+import org.codehaus.marmalade.runtime.TagExecutionException;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -97,9 +99,17 @@
             descriptor.setInstantiationStrategy( instantiationStrategy );
         }
 
-        descriptor.setParameters( parameters );
-        descriptor.setRequiresDependencyResolution( requiresDependencyResolution );
-        descriptor.setRequiresProject( requiresProject );
+        try
+        {
+            descriptor.setParameters( parameters );
+        }
+        catch ( DuplicateParameterException e )
+        {
+            throw new TagExecutionException( getTagInfo(), "One or more mojo parameters is invalid.", e );
+        }
+        
+        descriptor.setDependencyResolutionRequired( requiresDependencyResolution );
+        descriptor.setProjectRequired( requiresProject );
 
         String basePath = (String) context.getVariable( MarmaladeMojoExecutionDirectives.SCRIPT_BASEPATH_INVAR,
                                                         getExpressionEvaluator() );



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]