ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: import file inside target
Date Wed, 19 Sep 2007 11:47:07 GMT
You sort of have the <import> task backwards...

Think of it as a master build.xml file that contains the basic methods
such as how something is compiled and deployed. Then each sub-project
would import these master methods.

For example, the build.xml master might say when something is
deployed, it is compiled, jar'd, and certain files in your sub-project
would be copied to specific locations.  I find that <import> works
great with <macrodef>. I use the <macrodef> in my master build.xml
file, then each project imports the master build.xml and uses the
macros I defined as the template to build their project.

It makes life much simpler for the developers because the targets they
use are much easier to write. Plus, it helps keep the various projects
in sync with each other.

On 9/19/07, Mitja B. <info@mitjab.com> wrote:
> hi,
>
> <target name="compile" depends="init" description="Compile">
> <import file="build_ModelIRC200.xml"/>g
> <import file="build_Model.xml"/>
> <import file="build_View.xml"/>
> </target>
>
>
> i get error that import is only allowed as a top-level task.
>
> I need to call this files inside compile target. How can i make this?
>
> thx
>
>
> ________________________________________________
> Message sent using UebiMiau 2.7.10
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message