Hi, Phil:
With my ant:
Apache Ant version 1.5.2-23 compiled on November 12
2003

I got:
build.xml:40: The <ant> type doesn't support the
"buildfile" attribute.

--- Phil Weighill-Smith
<[EMAIL PROTECTED]> wrote:

> Ted, in what way? You can create a main build.xml
> that does, for example:
>  
> <project ...>
>     <target name="dist">
>         <ant buildfile="third-party.xml"
> target="dist"/>
>         <ant buildfile="project.xml" target="dist"/>
>     </target>
>     ...
> </project>
>  
> which will ensure that the third party distribution
> is created before attempting to create the project
> distribution. This is less than ideal as there is no
> true dependency between the two.
>  
> However, it is also possible to use import to pull
> all the targets into the main build.xml directly.
> You then have to ensure that you provide targets in
> the build.xml that will define or correct the
> inter-script target inter-dependencies.
>  
> E.g. if the two scripts both have "dist" targets and
> you want to simulate the project.xml dist depending
> on the third-party.xml dist target you would do
> something like:
>  
> third-party.xml:
>  
> <project name="third-party"...>
>     <target name="dist" depends="...">
>         ...
>     </target>
> </project>
>  
> project.xml:
>  
> <project name="project" ...>
>     <target name="dist" depends="...">
>         ...
>     </target>
> </project>
>  
> build.xml:
>  
> <project name="main" ...>
>     <import file="third-party.xml"/>
>     <import file="project.xml"/>
>     <target name="dist"
> depends="third-party.dist,project.dist"/>
> </project>
>  
> The benefit here over the "ant" task version is that
> if there are common targets they can be "merged"
> together (much as has been done here with "dist")
> and Ant will ensure that those targets are only
> invoked once in the dependency sequence (instead of
> the twice that would occur using the "ant" task
> version).
>  
> BTW, no guarantees the attributes are correctly
> named in this example!
>  
> As I said, this is a user list thing. If you want
> more help or examples re-post on the user list.
>  
> Phil
> 
>       -----Original Message----- 
>       From: Ted Yu [mailto:[EMAIL PROTECTED] 
>       Sent: Thu 1/19/2006 23:14 
>       To: Ant Developers List 
>       Cc: 
>       Subject: Re: project dependencies
>       
>       
> 
>       Thanks Phil.
>       But can I specify their dependency ?
>       
>       --- Phil Weighill Smith
>       <[EMAIL PROTECTED]> wrote:
>       
>       > Ted, this is something that should be addressed
> to
>       > the user list, not
>       > the developer list. However, short answer: no.
> But
>       > remember that you can
>       > call the ant build script anything you like. You
>       > could have a main
>       > "build.xml" that invokes targets in or imports
> (as
>       > appropriate) the two
>       > other build scripts, e.g. project.xml and
>       > third-party.xml.
>       >
>       > Phil :n)
>       >
>       > On Thu, 2006-01-19 at 11:19 -0800, Ted Yu wrote:
>       > > Hi,
>       > > Am I able to specify two projects in one
> build.xml
>       > > file such that one depends on the other ?
>       > > The reason is that I want to move thirdparty to
>       > same
>       > > level as the other project source tree.
>       > >
>       > > Thanks
>       > >
>       > >
> __________________________________________________
>       > > Do You Yahoo!?
>       > > Tired of spam?  Yahoo! Mail has the best spam
>       > protection around
>       > > http://mail.yahoo.com
>       > >
>       > >
>       >
> 
>
---------------------------------------------------------------------
>       > > To unsubscribe, e-mail:
>       > [EMAIL PROTECTED]
>       > > For additional commands, e-mail:
>       > [EMAIL PROTECTED]
>       > >
>       >
>       >
> 
>
---------------------------------------------------------------------
>       > To unsubscribe, e-mail:
>       > [EMAIL PROTECTED]
>       > For additional commands, e-mail:
>       > [EMAIL PROTECTED]
>       >
>       >
>       
>       
>       __________________________________________________
>       Do You Yahoo!?
>       Tired of spam?  Yahoo! Mail has the best spam
> protection around
>       http://mail.yahoo.com
>       
> 
>
---------------------------------------------------------------------
>       To unsubscribe, e-mail:
> [EMAIL PROTECTED]
>       For additional commands, e-mail:
> [EMAIL PROTECTED]
>       
>       
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to