Forgot to commit the marmalade changes for the descriptor cleanup.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@168634 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-05-06 18:34:50 +00:00
parent 6dbf18fceb
commit ef7d9ec2bd
1 changed files with 13 additions and 3 deletions

View File

@ -16,12 +16,14 @@ package org.apache.maven.script.marmalade.tags;
* 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 @@ public class MetadataTag
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() );