ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ram Krish <krish_j...@yahoo.co.in>
Subject Re: AW: Command line arguements..
Date Wed, 11 Dec 2002 10:48:42 GMT
Hi Jan Materne,
    i successfully built my project using the BT batch
file whatever you said.However i dont understand how
to do same thing with the XML buildfile.Please explain
me in detail..

Thanks,
Ram
   
 --- Jan.Materne@rzf.fin-nrw.de wrote: > <project
name="master">
>     <target name="Project1">
>         <ant antfile="project1.xml" />
>     </target>
>     <target name="Project2">
>         <ant antfile="project2.xml" />
>     </target>
>     <target name="project2.build">
>         <!-- You can invoke targets of your
> subproject by this master build
> file -->
>         <!-- But you have to write (generate) this
> targets for all of your
> sub-targets -->
>         <ant antfile="project2.xml" target="build"
> />
>     </target>
>     ...
> </project>
> 
> 
> 
> But faster would be shell script / batch file:
> 
> 
> NT-Batchfile:
>
--8-<----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<---
> @echo off
> if "%1%=="Project1" goto project1
> if "%1%=="Project2" goto project2
> goto end
>  
> :project1
> rem You cannot pass %* because the first parameter
> is only used for
> selecting the right buildfile
> ant -buildfile project1.xml %2 %3 %4 %5 %6 %7 %8 %9
> goto end
> 
> :project2
> ant -buildfile project1.xml %2 %3 %4 %5 %6 %7 %8 %9
> goto end
> 
> :end
>
--8-<----8-<-----8-<-----8-<-----8-<-----8-<-----8-<-----8-<---
> (not tested)
> 
> 
> Jan Matèrne
> 
> > -----Urspr√ľngliche Nachricht-----
> > Von: Ram Krish [mailto:krish_j2ee@yahoo.co.in]
> > Gesendet am: Dienstag, 10. Dezember 2002 11:49
> > An: ant-user@jakarta.apache.org
> > Betreff: Command line arguements..
> > 
> > 
> > Hi,
> > 
> > I want to build my project based on the argument
> passed from 
> > the commnad line
> > 
> >  i.e Ant Project1 or Ant Project2..
> > 
> > how to determine this?. any help would be
> appreciated..
> > 
> > thanks,
> > 
> > Krish
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > Catch all the cricket action. Download Yahoo!
> Score tracker
> > 
>  

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com

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


Mime
View raw message