ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Command Line Argument
Date Tue, 26 Aug 2003 07:47:06 GMT
No problem, you´re not the first with that requirement :-)
The depend-order I wrote is:

full --> vssupdate + copy + falg
falg --> --
vssupdate --> --
copy --> jar --> stubs --> compile

That means, if you call "ant jar", the targets "compile", "stubs" and "jar"
are executed. <javac> compiles only source files which are newer than their
class files. And <jar> does the same (I think).

And so the user doen´t have to do multiple step (and in which order?).

BTW - you don´t have to use "-buildfile build.xml". If absent Ant uses
the build.xml in the local directory.


Jan



> -----Original Message-----
> From: Manav Ahuja [mailto:manav.ahuja@wipro.com]
> Sent: Tuesday, August 26, 2003 9:34 AM
> To: Ant Users List
> Subject: RE: Command Line Argument
> 
> 
> This I am aware,  but may be then I couldn't put the 
> requirement correctly...
>   I want the user when running the "build.xml" specify
> Ant -buildfile build.xml compile
> OR
> Ant -buildfile build.xml Get
> OR
> Ant -buildfile build.xml Rmic
> Etc etc..
> 
> Hope now it is clear..And if I put the same into the targets 
> can I do this demarcation
>   means say I am fixing some bug and so I have changed some 
> ten java files and so finally only one or two jars will 
> change. These java files donot need rmic..
>   So what I want is that I run the "build.xml" file as
> 
> Ant -buildfile build.xml Get
> Then 
> Ant -buildfile build.xml Compile.
> 
>   Since it doesnot need any other steps ..thats it. Since it 
> is affecting only one jar so I will create that manually and check...
> 
> 
> Hope am clear this time ..
> Any suggestions..
> 
> Cheers,
> Manav
> 
> 
> 
> 
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Tuesday, August 26, 2003 12:25 PM
> To: user@ant.apache.org
> Subject: RE: Command Line Argument
> 
> 
> Divide your buildfile in several targets. That´s why they are 
> there. :-) You can use target´s 'depends' clause for ensuring 
> that a needed step is done before.
> 
> <project main="full">
>     <target name="vssupdate" description="gets the latest 
> from the VSS">
>         <!-- your code for VSS update goes here -->
>     </target>
>     <target name="compile" description="Compiles the whole code"/>
>     <target name="stubs" description="Creates the stubs and 
> skeletons" depends="compile"/>
>     <target name="jar" description="Makes jars" depends="stubs"/>    
>     <target name="copy" description="Copies the jars and some 
> more files into a new folder" depends="jar"/>
>     <target name="falg" description="Replace the Falg inside 
> 2 files"/>
>     <target name="full" description="update and complete 
> build" depends="vssupdate,copy,falg"/> </project>
> 
> 
> I was working on the Wiki some minutes ago, maybe 
> http://nagoya.apache.org/wiki/apachewiki.cgi?TheElementsOfAntStyle
> would interest you.
> 
> 
> Jan
> 
> 
> > -----Original Message-----
> > From: Manav Ahuja [mailto:manav.ahuja@wipro.com]
> > Sent: Tuesday, August 26, 2003 8:41 AM
> > To: Ant Users List
> > Subject: Command Line Argument
> > 
> > 
> > Currently I am having ONE "build.xml" file. This file has 
> ONE target 
> > inside that various tasks are accomplished. Tasks are: 1. 
> It gets the 
> > latest from the VSS. 2. Compiles the whole code.
> > 3. Creates the stubs and skeletons.
> > 4. Makes jars
> > 5. Copies the jars and some more files(Properties and batch 
> > etc) into a
> > new folder.
> > 6. Replace the Falg inside 2 files.
> > 
> > 
> > Now my Issue is I am successful in the above in no time.
> > Still I want to
> > automate further. Is there any utility provided in ant so 
> that when I
> > run the "build.xml" in the command line itself I specify, 
> means I can
> > demarcate the 6 steps above according to what I want for example :
> > 
> > A) Get ---  to get the latest from VSS
> > B) Compile -- to compile
> > C) rmic -- to create the stubs and skeletons
> > 
> >   n so on and so forth.
> > 
> > Any light is heartedly welcome........
> > 
> > 
> > 
> > Thankx In Advance,
> > Manav
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message