You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by shreedhar natarajan <sh...@ami.com> on 2005/12/22 22:52:06 UTC

Reg. Main target

hi all,

Thanks jan for the reply. 
When I run ant with -projecthelp option, it says something like this. 

prompt>>ant -projecthelp
Buildfile: build.xml

        Sample ant file for demonstration purpose

Main targets:

Other targets:

 ant_sample
 import_ant
 say_hai
 spawn_ant
Default target: ant_sample

Now what is the diff. between Main targets and Other targets. How do I make a target as Main target and what is the purpose of it ?

Bst rgds
Shreedhar



-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Thursday, December 22, 2005 1:13 AM
To: user@ant.apache.org
Subject: AW: Ant queries


>Hello from shreedhar, my first mail to this group. And I have 
>couple of questions !

welcome


>BUT, I want to use Ant for 
>building my reasonably big C++ projec. Can it be used ? 

yes
using AntContribs cc tasks, <exec> ...
But for more infos ... not my topic ;-)


>I am 
>aware about things like ant-contrib and so forth. but they are 
>not maintained by Apache.  

What means "maintained" ... some Ant committers are also in the AC-team.
And AC-questions are done here also. Only the repository is at sourceforge.



>Has anybody out here used them to 
>build their c,c++ project successfully.

Have heard, but I havent.


>2) I have the task "java" that is used to compile java files. 
>But I can achieve the something by using task exec. What 
>advantage the task "java" gives me over the using exec task to 
>execute the java.exe.

s/java/javac/

* Why use Ant not invoking the tools from the command line? Because
  it´s easier ....
* <exec> needs an executable while <javac> accesses the compiler from tools.jar
* better support
  ** nested src-paths (e.g. filesets)
  ** compiler settings
* <javac> works as a facade to several compilers, JDK 1.3, 1.4, 5.0, Jikes...


Jan

---------------------------------------------------------------------
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


Re: Reg. Main target

Posted by Ivan Ivanov <ra...@yahoo.com>.
Hello Shreedhar,

--- shreedhar natarajan <sh...@ami.com> wrote:
> 
> prompt>>ant -projecthelp
> Buildfile: build.xml
> 
>         Sample ant file for demonstration purpose
> 
> Main targets:
> 
> Other targets:
> 
>  ant_sample
>  import_ant
>  say_hai
>  spawn_ant
> Default target: ant_sample
> 
> Now what is the diff. between Main targets and Other
> targets. 
Main targets are those that have "description"
atrribute:

<target name="mytarget" description="mytarget"/>

is considered main target.

> How do I make a target as Main target
By adding a non-empty description attribute.

> what is the purpose of it ?
Well, it is supposed that you are going to add
description to the important targets and leave the
other with no description. It is not alway the case -
I tend to describe all targets. 

I like "description" attribute more than XML comments,
becuase they are shown by ant -projecthelp and I can
get an idea what the targets do without reading the
build script.

Regards
Ivan


		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


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


RE: Reg. Main target

Posted by Steve <mc...@apache.org>.
 

> -----Original Message-----
> From: shreedhar natarajan [mailto:shreedharn@ami.com] 

> Now what is the diff. between Main targets and Other targets. 
> How do I make a target as Main target and what is the purpose of it ?

If you add a 'description' attribute to your tasks they will appear in the
Main section (however, tasks without a description will not be shown).

E.g.:

  <task name="foo" description="bar"/>

Cheers, Steve.



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