You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jp4 <jo...@hnpsolutions.com> on 2006/11/03 16:16:39 UTC

Maven equivalent of ant optional task

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?
-- 
View this message in context: http://www.nabble.com/Maven-equivalent-of-ant-%3Cdepend%3E-optional-task-tf2568454s177.html#a7159353
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven equivalent of ant optional task

Posted by jp4 <jo...@hnpsolutions.com>.
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 <jo...@hnpsolutions.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven equivalent of ant optional task

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/3/06, jp4 <jo...@hnpsolutions.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org