[EMAIL PROTECTED] wrote:

jvanzyl 2004/04/01 16:13:07

Modified: maven-core/src/main/java/org/apache/maven/plugin/descriptor
GoalDescriptor.java
Log:
o does the goal require dependency resolution in order to execute, by
default we will assume yes. But for things like "clean" we don't.
Revision Changes Path
1.4 +3 -1 maven-components/maven-core/src/main/java/org/apache/maven/plugin/descriptor/GoalDescriptor.java
Index: GoalDescriptor.java
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/descriptor/GoalDescriptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GoalDescriptor.java 21 Mar 2004 00:33:17 -0000 1.3
+++ GoalDescriptor.java 2 Apr 2004 00:13:07 -0000 1.4
@@ -37,6 +37,8 @@
private MethodDescriptor method;
+ private boolean requiresDependencyResolution = true;
+
public String getName()
{
return name;


I think that this is already very cool improvement over what we have in 1.0.

I am just thinking out loud here: maybe we can go even one step further and leave the dependency resolution up to plugins?
I mean that plugin should process an execution of goal as long as all required dependecies for the goal which is processed are present.


if we have a pom like:

<project>
         <dependency>
                 ...
                <type>jar</type>
         </dependency>

         <dependency>
                 ...
                <type>plugin</type>
         </dependency>
</project>


there are two special cases here:


- probably java:compile goal should be executable even if plugin which is defined as dependency is missing (it can be plugin which contains just an extra report)
- dependency resolution mechanism should be already invoked and attempt to install plugin defined in this POM made. Probably the fact that plugin cannot be installed should not break the build as long as all required goals are available.


I can imagine more examples of that kind where all required artifacts for given goal are present and this goal can be executed, while other goal


<project> <dependency> ... <type>jar</type> </dependency>

         <dependency>
                 ...
                <type>web-compoents</type>
         </dependency>
</project>

java:compile should succed.
war:war should failed

but I am not yet convinced myself if such use- cases should be accepted or now.


Michal



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to