brett 2005/04/05 01:17:29 Modified: maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin CompilerMojo.java TestCompilerMojo.java maven-core/src/main/java/org/apache/maven/plugin DefaultPluginManager.java maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java JavaMojoDescriptorExtractor.java maven-plugin-tools/maven-plugin-tools-java/src/test/resources/source JavaExtractorTestTwo.java maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator PluginDescriptorGenerator.java maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator AbstractGeneratorTestCase.java PluginDescriptorGeneratorTest.java maven-artifact/src/main/java/org/apache/maven/artifact/resolver DefaultArtifactResolver.java maven-plugin/src/main/java/org/apache/maven/plugin/descriptor MojoDescriptor.java PluginDescriptorBuilder.java maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags MetadataTag.java RequiresDependencyResolutionTag.java maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea IdeaMojo.java Added: maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter ScopeArtifactFilter.java Log: change @requiresDependencyResolution to take a scope (default is "runtime" if no scope specified, none if tag not specified at all).
This still means ALL tests get the test dependencies of their compile time dependencies. Check if there is really a valid use case for that. Revision Changes Path 1.27 +16 -16 maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java Index: CompilerMojo.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- CompilerMojo.java 30 Mar 2005 05:52:07 -0000 1.26 +++ CompilerMojo.java 5 Apr 2005 08:17:28 -0000 1.27 @@ -34,25 +34,25 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl </a> * @version $Id$ * @goal compile - * @requiresDependencyResolution + * @requiresDependencyResolution compile * @description Compiles application sources * @parameter name="compileSourceRoots" type="java.util.List" required="true" validator="" - * expression="#project.compileSourceRoots" description="" + * expression="#project.compileSourceRoots" description="" * @parameter name="outputDirectory" type="String" required="true" validator="" - * expression="#project.build.outputDirectory" description="" + * expression="#project.build.outputDirectory" description="" * @parameter name="classpathElements" type="List" required="true" validator="" - * expression="#project.compileClasspathElements" description="" + * expression="#project.compileClasspathElements" description="" * @parameter name="debug" type="boolean" required="false" validator="" - * expression="#maven.compiler.debug" description="Whether to include debugging - * information in the compiled class files; the default value is false" + * expression="#maven.compiler.debug" description="Whether to include debugging + * information in the compiled class files; the default value is false" * @todo change debug parameter type to Boolean * @parameter name="source" type="String" required="false" expression="#source" validator="" - * description="The -source argument for the Java compiler" + * description="The -source argument for the Java compiler" * @parameter name="target" type="String" required="false" expression="#target" validator="" - * description="The -target argument for the Java compiler" + * description="The -target argument for the Java compiler" * @parameter name="staleMillis" type="long" required="false" expression="#lastModGranularityMs" - * validator="" description="The granularity in milliseconds of the last modification - * date for testing whether a source needs recompilation" + * validator="" description="The granularity in milliseconds of the last modification + * date for testing whether a source needs recompilation" * @todo change staleMillis parameter type to Long */ @@ -167,8 +167,8 @@ } catch ( NumberFormatException e ) { - throw new PluginExecutionException( "Invalid staleMillis plugin parameter value: \'" + staleMillis - + "\'", e ); + throw new PluginExecutionException( "Invalid staleMillis plugin parameter value: \'" + staleMillis + + "\'", e ); } } @@ -194,8 +194,8 @@ } catch ( InclusionScanException e ) { - throw new PluginExecutionException( "Error scanning source root: \'" + sourceRoot - + "\' for stale files to recompile.", e ); + throw new PluginExecutionException( "Error scanning source root: \'" + sourceRoot + + "\' for stale files to recompile.", e ); } } @@ -204,7 +204,7 @@ /** * @todo also in ant plugin. This should be resolved at some point so that it does not need to - * be calculated continuously - or should the plugins accept empty source roots as is? + * be calculated continuously - or should the plugins accept empty source roots as is? */ private static List removeEmptyCompileSourceRoots( List compileSourceRootsList ) { 1.11 +2 -2 maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java Index: TestCompilerMojo.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TestCompilerMojo.java 10 Mar 2005 01:35:24 -0000 1.10 +++ TestCompilerMojo.java 5 Apr 2005 08:17:28 -0000 1.11 @@ -21,7 +21,7 @@ * @version $Id$ * @goal testCompile * @description Compiles test sources - * @requiresDependencyResolution + * @requiresDependencyResolution test * @parameter name="compileSourceRoots" * type="java.util.List" * required="true" 1.75 +10 -8 maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java Index: DefaultPluginManager.java =================================================================== RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- DefaultPluginManager.java 31 Mar 2005 09:32:43 -0000 1.74 +++ DefaultPluginManager.java 5 Apr 2005 08:17:28 -0000 1.75 @@ -25,6 +25,7 @@ import org.apache.maven.artifact.resolver.ArtifactResolver; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter; +import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; import org.apache.maven.execution.MavenSession; import org.apache.maven.monitor.event.EventDispatcher; import org.apache.maven.monitor.event.MavenEvents; @@ -340,7 +341,7 @@ try { - if ( mojoDescriptor.requiresDependencyResolution() ) + if ( mojoDescriptor.getRequiresDependencyResolution() != null ) { ArtifactResolver artifactResolver = null; @@ -351,7 +352,8 @@ artifactResolver = (ArtifactResolver) container.lookup( ArtifactResolver.ROLE ); mavenProjectBuilder = (MavenProjectBuilder) container.lookup( MavenProjectBuilder.ROLE ); - resolveTransitiveDependencies( session, artifactResolver, mavenProjectBuilder ); + resolveTransitiveDependencies( session, artifactResolver, mavenProjectBuilder, + mojoDescriptor.getRequiresDependencyResolution() ); downloadDependencies( session, artifactResolver ); } finally @@ -700,10 +702,8 @@ // TODO: configure this from bootstrap or scan lib artifactFilter = new ExclusionSetFilter( new String[]{"maven-core", "maven-artifact", "maven-model", "maven-settings", "maven-monitor", "maven-plugin", - "plexus-container-api", "plexus-container-default", - "plexus-artifact-container", "wagon-provider-api", - "classworlds"} ); - + "plexus-container-default", "plexus-artifact-container", + "wagon-provider-api", "classworlds"} ); } // ---------------------------------------------------------------------- @@ -711,17 +711,19 @@ // ---------------------------------------------------------------------- private void resolveTransitiveDependencies( MavenSession context, ArtifactResolver artifactResolver, - MavenProjectBuilder mavenProjectBuilder ) + MavenProjectBuilder mavenProjectBuilder, String scope ) throws ArtifactResolutionException { MavenProject project = context.getProject(); MavenMetadataSource sourceReader = new MavenMetadataSource( artifactResolver, mavenProjectBuilder ); + ArtifactFilter filter = new ScopeArtifactFilter( scope ); + ArtifactResolutionResult result = artifactResolver.resolveTransitively( project.getArtifacts(), context.getRemoteRepositories(), context.getLocalRepository(), - sourceReader ); + sourceReader, filter ); project.addArtifacts( result.getArtifacts().values() ); } 1.8 +6 -1 maven-components/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java Index: JavaMojoDescriptorExtractor.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin-tools/maven-plugin-tools-java/src/main/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- JavaMojoDescriptorExtractor.java 17 Mar 2005 02:48:40 -0000 1.7 +++ JavaMojoDescriptorExtractor.java 5 Apr 2005 08:17:28 -0000 1.8 @@ -180,7 +180,12 @@ if ( requiresDependencyResolution != null ) { - mojoDescriptor.setRequiresDependencyResolution( true ); + String value = requiresDependencyResolution.getValue(); + if ( value == null || value.length() == 0 ) + { + value = "runtime"; + } + mojoDescriptor.setRequiresDependencyResolution( value ); } // ---------------------------------------------------------------------- 1.3 +8 -13 maven-components/maven-plugin-tools/maven-plugin-tools-java/src/test/resources/source/JavaExtractorTestTwo.java Index: JavaExtractorTestTwo.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin-tools/maven-plugin-tools-java/src/test/resources/source/JavaExtractorTestTwo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JavaExtractorTestTwo.java 1 Mar 2005 02:43:22 -0000 1.2 +++ JavaExtractorTestTwo.java 5 Apr 2005 08:17:28 -0000 1.3 @@ -1,25 +1,20 @@ -import org.apache.maven.project.MavenProject; + import org.apache.maven.plugin.AbstractPlugin; import org.apache.maven.plugin.PluginExecutionRequest; import org.apache.maven.plugin.PluginExecutionResponse; /** * @goal ideaTwo - * * @description Create an IDEA project file from a Maven project. - * - * @requiresDependencyResolution - * + * @requiresDependencyResolution compile * @prereq foo * @prereq bar - * - * @parameter - * name="project" - * type="String[]" - * required="true" - * validator="org.foo.validator" - * expression="#project" - * description="Maven project used to generate IDEA project files." + * @parameter name="project" + * type="String[]" + * required="true" + * validator="org.foo.validator" + * expression="#project" + * description="Maven project used to generate IDEA project files." */ public class JavaExtractorTestTwo extends AbstractPlugin 1.6 +5 -4 maven-components/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java Index: PluginDescriptorGenerator.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGenerator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- PluginDescriptorGenerator.java 4 Mar 2005 09:04:15 -0000 1.5 +++ PluginDescriptorGenerator.java 5 Apr 2005 08:17:28 -0000 1.6 @@ -32,12 +32,13 @@ /** * @todo add example usage tag that can be shown in the doco * @todo need to add validation directives so that systems embedding maven2 can - * get validation directives to help users in IDEs. + * get validation directives to help users in IDEs. */ public class PluginDescriptorGenerator implements Generator { - public void execute( String destinationDirectory, Set mavenMojoDescriptors, MavenProject project ) throws Exception + public void execute( String destinationDirectory, Set mavenMojoDescriptors, MavenProject project ) + throws Exception { File f = new File( destinationDirectory, "plugin.xml" ); @@ -94,9 +95,9 @@ // // ---------------------------------------------------------------------- - if ( mojoDescriptor.requiresDependencyResolution() ) + if ( mojoDescriptor.getRequiresDependencyResolution() != null ) { - element( w, "requiresDependencyResolution", "true" ); + element( w, "requiresDependencyResolution", mojoDescriptor.getRequiresDependencyResolution() ); } // ---------------------------------------------------------------------- 1.3 +13 -10 maven-components/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java Index: AbstractGeneratorTestCase.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/AbstractGeneratorTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractGeneratorTestCase.java 24 Feb 2005 05:12:29 -0000 1.2 +++ AbstractGeneratorTestCase.java 5 Apr 2005 08:17:28 -0000 1.3 @@ -16,6 +16,7 @@ * limitations under the License. */ +import junit.framework.TestCase; import org.apache.maven.model.Dependency; import org.apache.maven.model.Model; import org.apache.maven.plugin.descriptor.MojoDescriptor; @@ -28,8 +29,6 @@ import java.util.List; import java.util.Set; -import junit.framework.TestCase; - /** * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl </a> * @version $Id: AbstractGeneratorTestCase.java,v 1.1 2005/02/20 16:25:21 @@ -42,12 +41,14 @@ protected String basedir; - protected void setUp() throws Exception + protected void setUp() + throws Exception { basedir = System.getProperty( "basedir" ); } - public void testGenerator() throws Exception + public void testGenerator() + throws Exception { setupGenerator(); @@ -61,7 +62,7 @@ mojoDescriptor.setGoal( "testGoal" ); mojoDescriptor.setId( "test" ); mojoDescriptor.setImplementation( "org.apache.maven.tools.plugin.generator.TestMojo" ); - mojoDescriptor.setRequiresDependencyResolution( true ); + mojoDescriptor.setRequiresDependencyResolution( "compile" ); List params = new ArrayList(); @@ -101,7 +102,8 @@ // // ---------------------------------------------------------------------- - protected void setupGenerator() throws Exception + protected void setupGenerator() + throws Exception { String generatorClassName = getClass().getName(); @@ -115,9 +117,9 @@ } catch ( Exception e ) { - throw new Exception( "Cannot find " + generatorClassName - + "! Make sure your test case is named in the form ${generatorClassName}Test " - + "or override the setupPlugin() method to instantiate the mojo yourself." ); + throw new Exception( "Cannot find " + generatorClassName + + "! Make sure your test case is named in the form ${generatorClassName}Test " + + "or override the setupPlugin() method to instantiate the mojo yourself." ); } } @@ -125,7 +127,8 @@ // // ---------------------------------------------------------------------- - protected void validate() throws Exception + protected void validate() + throws Exception { // empty } 1.3 +6 -4 maven-components/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java Index: PluginDescriptorGeneratorTest.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin-tools/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginDescriptorGeneratorTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PluginDescriptorGeneratorTest.java 21 Mar 2005 01:17:15 -0000 1.2 +++ PluginDescriptorGeneratorTest.java 5 Apr 2005 08:17:28 -0000 1.3 @@ -39,7 +39,8 @@ public class PluginDescriptorGeneratorTest extends AbstractGeneratorTestCase { - protected void validate() throws Exception + protected void validate() + throws Exception { PluginDescriptorBuilder pdb = new PluginDescriptorBuilder(); @@ -69,7 +70,8 @@ assertEquals( "0.0.0", dependency.getVersion() ); } - private String readFile( File pluginDescriptorFile ) throws IOException + private String readFile( File pluginDescriptorFile ) + throws IOException { StringWriter sWriter = new StringWriter(); PrintWriter pWriter = new PrintWriter( sWriter ); @@ -77,7 +79,7 @@ BufferedReader reader = new BufferedReader( new FileReader( pluginDescriptorFile ) ); String line = null; - while ( (line = reader.readLine()) != null ) + while ( ( line = reader.readLine() ) != null ) { pWriter.println( line ); } @@ -96,7 +98,7 @@ // The following should be defaults assertEquals( "per-lookup", mojoDescriptor.getInstantiationStrategy() ); - assertTrue( mojoDescriptor.requiresDependencyResolution() ); + assertNotNull( mojoDescriptor.getRequiresDependencyResolution() ); // check the parameter. checkParameter( (Parameter) mojoDescriptor.getParameters().get( 0 ) ); 1.1 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java Index: ScopeArtifactFilter.java =================================================================== package org.apache.maven.artifact.resolver.filter; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DefaultArtifact; /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Filter to only retain objects in the given scope or better. * * @author <a href="mailto:[EMAIL PROTECTED]">Brett Porter</a> * @version $Id: ScopeArtifactFilter.java,v 1.1 2005/04/05 08:17:28 brett Exp $ */ public class ScopeArtifactFilter implements ArtifactFilter { private final boolean compileScope; private final boolean runtimeScope; private final boolean testScope; public ScopeArtifactFilter( String scope ) { if ( DefaultArtifact.SCOPE_COMPILE.equals( scope ) ) { compileScope = true; runtimeScope = false; testScope = false; } else if ( DefaultArtifact.SCOPE_RUNTIME.equals( scope ) ) { compileScope = true; runtimeScope = true; testScope = false; } else if ( DefaultArtifact.SCOPE_TEST.equals( scope ) ) { compileScope = true; runtimeScope = true; testScope = true; } else { compileScope = false; runtimeScope = false; testScope = false; } } public boolean include( Artifact artifact ) { if ( DefaultArtifact.SCOPE_COMPILE.equals( artifact.getScope() ) ) { return compileScope; } else if ( DefaultArtifact.SCOPE_RUNTIME.equals( artifact.getScope() ) ) { return runtimeScope; } else if ( DefaultArtifact.SCOPE_TEST.equals( artifact.getScope() ) ) { return testScope; } else { // TODO: should this be true? return false; } } } 1.35 +0 -2 maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Index: DefaultArtifactResolver.java =================================================================== RCS file: /home/cvs/maven-components/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- DefaultArtifactResolver.java 30 Mar 2005 05:24:50 -0000 1.34 +++ DefaultArtifactResolver.java 5 Apr 2005 08:17:28 -0000 1.35 @@ -280,8 +280,6 @@ knownVersion, newArtifact.getScope(), knownArtifact.getType() ); - // don't copy file - these aren't resolved yet - resolvedArtifacts.put( artifact.getConflictId(), artifact ); } } 1.8 +3 -3 maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java Index: MojoDescriptor.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/descriptor/MojoDescriptor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MojoDescriptor.java 21 Mar 2005 01:17:15 -0000 1.7 +++ MojoDescriptor.java 5 Apr 2005 08:17:28 -0000 1.8 @@ -54,7 +54,7 @@ private List prereqs; - private boolean requiresDependencyResolution = false; + private String requiresDependencyResolution = null; private boolean requiresProject = true; @@ -150,12 +150,12 @@ // Dependency requirement // ---------------------------------------------------------------------- - public void setRequiresDependencyResolution( boolean requiresDependencyResolution ) + public void setRequiresDependencyResolution( String requiresDependencyResolution ) { this.requiresDependencyResolution = requiresDependencyResolution; } - public boolean requiresDependencyResolution() + public String getRequiresDependencyResolution() { return requiresDependencyResolution; } 1.10 +3 -3 maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java Index: PluginDescriptorBuilder.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptorBuilder.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- PluginDescriptorBuilder.java 23 Mar 2005 06:52:54 -0000 1.9 +++ PluginDescriptorBuilder.java 5 Apr 2005 08:17:28 -0000 1.10 @@ -1,10 +1,10 @@ package org.apache.maven.plugin.descriptor; +import org.apache.maven.plugin.AbstractPlugin; import org.codehaus.plexus.configuration.PlexusConfiguration; import org.codehaus.plexus.configuration.PlexusConfigurationException; import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.apache.maven.plugin.AbstractPlugin; import java.io.Reader; import java.util.ArrayList; @@ -105,7 +105,7 @@ if ( dependencyResolution != null ) { - mojo.setRequiresDependencyResolution( dependencyResolution.equals( "true" ) ? true : false ); + mojo.setRequiresDependencyResolution( dependencyResolution ); } // ---------------------------------------------------------------------- 1.6 +7 -5 maven-components/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java Index: MetadataTag.java =================================================================== RCS file: /home/cvs/maven-components/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/MetadataTag.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- MetadataTag.java 4 Mar 2005 09:04:23 -0000 1.5 +++ MetadataTag.java 5 Apr 2005 08:17:28 -0000 1.6 @@ -27,7 +27,7 @@ /** * Aggregator tag for the actual meat of the mojo. - * + * * @author jdcasey Created on Feb 8, 2005 */ public class MetadataTag @@ -39,7 +39,7 @@ private String goal; - private boolean requiresDependencyResolution = true; + private String requiresDependencyResolution = null; private boolean requiresProject = true; @@ -58,7 +58,8 @@ return false; } - protected void doExecute( MarmaladeExecutionContext context ) throws MarmaladeExecutionException + protected void doExecute( MarmaladeExecutionContext context ) + throws MarmaladeExecutionException { processChildren( context ); @@ -66,7 +67,8 @@ context.setVariable( MarmaladeMojoExecutionDirectives.METADATA_OUTVAR, descriptor, true ); } - private MojoDescriptor buildDescriptor( MarmaladeExecutionContext context ) throws MarmaladeExecutionException + private MojoDescriptor buildDescriptor( MarmaladeExecutionContext context ) + throws MarmaladeExecutionException { MojoDescriptor descriptor = new MojoDescriptor(); @@ -146,7 +148,7 @@ this.description = description; } - public void setRequiresDependencyResolution( boolean requiresDependencyResolution ) + public void setRequiresDependencyResolution( String requiresDependencyResolution ) { this.requiresDependencyResolution = requiresDependencyResolution; } 1.2 +4 -3 maven-components/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/RequiresDependencyResolutionTag.java Index: RequiresDependencyResolutionTag.java =================================================================== RCS file: /home/cvs/maven-components/maven-script/maven-script-marmalade/src/main/java/org/apache/maven/script/marmalade/tags/RequiresDependencyResolutionTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RequiresDependencyResolutionTag.java 24 Feb 2005 05:12:28 -0000 1.1 +++ RequiresDependencyResolutionTag.java 5 Apr 2005 08:17:28 -0000 1.2 @@ -22,13 +22,14 @@ * @author jdcasey Created on Feb 8, 2005 */ public class RequiresDependencyResolutionTag - extends AbstractBooleanValuedBodyTag + extends AbstractStringValuedBodyTag { - protected void setValue( Boolean value ) throws MarmaladeExecutionException + protected void setValue( String value ) + throws MarmaladeExecutionException { MetadataTag metadataTag = (MetadataTag) requireParent( MetadataTag.class ); - metadataTag.setRequiresDependencyResolution( value.booleanValue() ); + metadataTag.setRequiresDependencyResolution( value ); } } \ No newline at end of file 1.2 +1 -1 maven-components/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java Index: IdeaMojo.java =================================================================== RCS file: /home/cvs/maven-components/maven-plugins/maven-idea-plugin/src/main/java/org/apache/maven/plugin/idea/IdeaMojo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- IdeaMojo.java 31 Mar 2005 11:27:00 -0000 1.1 +++ IdeaMojo.java 5 Apr 2005 08:17:28 -0000 1.2 @@ -38,7 +38,7 @@ /** * @goal idea - * @requiresDependencyResolution + * @requiresDependencyResolution test * @description Goal for generating IDEA files from a POM * @parameter name="project" * type="MavenProject"