You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by jv...@apache.org on 2004/06/15 06:07:17 UTC
cvs commit: maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator AbstractGenerator.java PluginDescriptorGenerator.java
jvanzyl 2004/06/14 21:07:17
Modified: maven-plugin/src/main/java/org/apache/maven/plugin/descriptor
Goal.java
maven-plugin/src/main/java/org/apache/maven/plugin/generator
AbstractGenerator.java
PluginDescriptorGenerator.java
Log:
o allow the specification of dependency resolution for a goal, this is
now being utilized in maven-core.
Revision Changes Path
1.2 +12 -2 maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/descriptor/Goal.java
Index: Goal.java
===================================================================
RCS file: /home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/descriptor/Goal.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Goal.java 20 May 2004 16:59:45 -0000 1.1
+++ Goal.java 15 Jun 2004 04:07:17 -0000 1.2
@@ -32,7 +32,7 @@
private String description;
- private boolean requiresDependencyResolution = true;
+ private boolean requiresDependencyResolution = false;
private boolean requiresProject = true;
@@ -61,6 +61,16 @@
public String getMethod()
{
return method;
+ }
+
+ public boolean requiresDependencyResolution()
+ {
+ return requiresDependencyResolution;
+ }
+
+ public boolean requiresProject()
+ {
+ return requiresProject;
}
// ----------------------------------------------------------------------
1.13 +13 -0 maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/AbstractGenerator.java
Index: AbstractGenerator.java
===================================================================
RCS file: /home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/AbstractGenerator.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- AbstractGenerator.java 15 Jun 2004 03:20:48 -0000 1.12
+++ AbstractGenerator.java 15 Jun 2004 04:07:17 -0000 1.13
@@ -41,6 +41,8 @@
public static final String GOAL_PREREQ = "prereq";
+ public static final String GOAL_REQUIRES_DEPENDENCY_RESOLUTION = "requiresDependencyResolution";
+
protected abstract void processPluginDescriptors( MojoDescriptor[] pluginDescriptors, String destinationDirectory, Xpp3Dom pomDom )
throws Exception;
@@ -197,6 +199,17 @@
if ( goalDescriptionTag != null )
{
goal.setDescription( goalDescriptionTag.getValue() );
+ }
+
+ // ----------------------------------------------------------------------
+ // Dependency resolution flag
+ // ----------------------------------------------------------------------
+
+ DocletTag requiresDependencyResolution = javaClass.getTagByName( GOAL_REQUIRES_DEPENDENCY_RESOLUTION );
+
+ if ( requiresDependencyResolution != null )
+ {
+ goal.setRequiresDependencyResolution( true );
}
// ----------------------------------------------------------------------
1.10 +5 -0 maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/PluginDescriptorGenerator.java
Index: PluginDescriptorGenerator.java
===================================================================
RCS file: /home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/PluginDescriptorGenerator.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- PluginDescriptorGenerator.java 14 Jun 2004 15:02:05 -0000 1.9
+++ PluginDescriptorGenerator.java 15 Jun 2004 04:07:17 -0000 1.10
@@ -149,6 +149,11 @@
element( w, "description", goal.getDescription() );
}
+ if ( goal.requiresDependencyResolution() )
+ {
+ element( w, "requiresDependencyResolution", "true" );
+ }
+
// ----------------------------------------------------------------------
// Goal parameters
// ----------------------------------------------------------------------