The <depend> task is used to determine java class file dependencies.... From
the ant docs...

The depend task works by determining which classes are out of date with
respect to their source and then removing the class files of any other
classes which depend on the out-of-date classes.

For example, if you have Foo.java and Bar.java... Initially, BAR = "BAR"...
The first compilation prints BAR in both A & B.... If you change BAR = "FOO"
and recompile it only compiles Bar.java... As a result Foo prints BAR and
Bar prints FOO...  You can get around this with clean, but for big projects,
clean takes too long.

public class Foo {
 
    public static void main(String[] args) {
        System.out.println(Bar.BAR);
    }
}


public class Bar {

    public static final String BAR = "FOO";
    public static void main(String[] args) {
        System.out.println(BAR);
    }
}



Wendy Smoak-3 wrote:
> 
> On 11/3/06, jp4 <[EMAIL PROTECTED]> wrote:
> 
>> I have been searching for the Maven2 equivalent of the ant <depend> task
>> but
>> I can't seem to find it.  Can someone help me out with a link?
> 
> Everything in Maven centers around the build lifecycle.
>   
> http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
> Because of that, tasks don't 'depend' on other tasks, instead they are
> bound to different phases of the lifecycle.
> 
> What are you trying to get Maven to do?
> 
> -- 
> Wendy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-equivalent-of-ant-%3Cdepend%3E-optional-task-tf2568454s177.html#a7159988
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to