Yes, I understood. And my approach does exact that.

1. "main" is your main buildfile
2. The other buildfiles are <import>ed on root level
3. The other buildfiles are 'valid' buildfiles (with <ant> they also have to be)
4. Imported targets have the names "{targetname}" and 
"{projectname}.{targetname}".
5. The new compile-target makes use of the 2nd name pattern in its depends 
clause

Benefit over <ant>: <ant> is more heave-weight as it creates a new Ant instance 
for each new project.

But if <ant> is ok with you ... have you had a look at <subant>?


Jan   

>-----Ursprüngliche Nachricht-----
>Von: Mitja B. [mailto:[EMAIL PROTECTED] 
>Gesendet: Mittwoch, 19. September 2007 10:05
>An: Ant Users List
>Betreff: Re: AW: import file inside target
>
>Hi,
>
>thx boath
>
>Maybe i did not write ok what i want. Inside <target 
>name="compile" ../> i
>want to call other xml file (build_ModelIRC2000.xml,..) which 
>is separate
>project for compiling ModelIRC2000,...
>
>In this files i have ant compiler
>
>Thx
>--
>L.P.
>Mitja B.
>
>
>--------- Original Message --------
>From: Ant Users List <user@ant.apache.org>
>To: user@ant.apache.org <user@ant.apache.org>
>Subject: AW: import file inside target
>Date: 19/09/07 09:07
>
>> &lt;project name=&quot;main&quot;&gt;
>>   &lt;import file=&quot;build_ModelIRC200.xml&quot;/&gt;
>>   &lt;import file=&quot;build_Model.xml&quot;/&gt;
>>   &lt;import file=&quot;build_View.xml&quot;/&gt;
>> 
>>   &lt;target name=&quot;compile&quot;
>depends=&quot;init,ModelIRC200.compile,Model.compile,View.compile&quot;
>description=&quot;Compile&quot;&gt;
>>   &lt;/target&gt;
>> &lt;/project&gt;
>> 
>> &lt;project name=&quot;ModelIRC200&quot;&gt;
>>   &lt;target name=&quot;compile&quot;&gt; ...
>> &lt;/project&gt;
>> &lt;project name=&quot;Model&quot;&gt;
>>   &lt;target name=&quot;compile&quot;&gt; ...
>> &lt;/project&gt;
>> &lt;project name=&quot;View&quot;&gt;
>>   &lt;target name=&quot;compile&quot;&gt; ...
>> &lt;/project&gt;
>> 
>> 
>> Jan
>> 
>> &gt;-----Ursprüngliche Nachricht-----
>> &gt;Von: Rebhan, Gilbert [mailto:[EMAIL PROTECTED] 
>> &gt;Gesendet: Mittwoch, 19. September 2007 08:41
>> &gt;An: Ant Users List; Mitja B.
>> &gt;Betreff: RE: import file inside target
>> &gt;
>> &gt; 
>> &gt;Hi,
>> &gt;
>> &gt;-----Original Message-----
>> &gt;From: Mitja B. [mailto:[EMAIL PROTECTED] 
>> &gt;Sent: Wednesday, September 19, 2007 7:50 AM
>> &gt;To: user@ant.apache.org
>> &gt;Subject: import file inside target
>> &gt;
>> &gt;/*
>> &gt;&lt;target name=&quot;compile&quot; depends=&quot;init&quot;
>description=&quot;Compile&quot;&gt;
>> &gt;&lt;import file=&quot;build_ModelIRC200.xml&quot;/&gt;g
>> &gt;&lt;import file=&quot;build_Model.xml&quot;/&gt;
>> &gt;&lt;import file=&quot;build_View.xml&quot;/&gt;
>> &gt;&lt;/target&gt;
>> &gt;
>> &gt;i get error that import is only allowed as a top-level task.
>> &gt;
>> &gt;I need to call this files inside compile target. How can 
>i make this?
>> &gt;/*
>> &gt;
>> &gt;Do you want to load properties via import ?
>> &gt;Use &lt;xmlproperty ... /&gt;, &lt;property ... /&gt;,
>&lt;loadproperties ... /&gt;
>> &gt;or &lt;loadfile ... /&gt;
>> &gt;
>> &gt;Do you want to do some xml transformation / need to edit
>> &gt;xml files ?
>> &gt;Use the &lt;xmltask&gt;
>> &gt;
>> &gt;Do you want to call other buildfiles ?
>> &gt;Use the &lt;ant antfile=&quot;...&quot; ... /&gt; task
>> &gt;
>> &gt;
>> &gt;Regards, Gilbert
>> &gt;
>> 
>&gt;-----------------------------------------------------------
>----------
>> &gt;To unsubscribe, e-mail: [EMAIL PROTECTED]
>> &gt;For additional commands, e-mail: [EMAIL PROTECTED]
>> &gt;
>> &gt;
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
>
>________________________________________________
>Message sent using UebiMiau 2.7.10
>
>
>
>---------------------------------------------------------------------
>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]

Reply via email to