You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by mjdenham <mj...@gmail.com> on 2007/11/20 19:24:43 UTC

Specify non-top level target

My ant build file is getting quite long and has a lot of targets.  When I
view the ant file in Eclipse it can be difficult to see which targets are
the top-level ones which I would call and which are just helper targets like
"init".

Is it possible to remove some of the "targets" from the external interface
just leaving a set of targets which people will actually invoke.

Thanks

Martin
-- 
View this message in context: http://www.nabble.com/Specify-non-top-level-target-tf4845485.html#a13862895
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Tool for documenting Ant scripts

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----Original Message-----
From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
Sent: Wednesday, November 21, 2007 8:59 AM
To: Ant Users List
Subject: RE: Tool for documenting Ant scripts

/*
Thank you. But it does not seem to be the tool I have seen a while ago.
   
  The tool could reverse engineer the Ant scripts and create images
which look like an UML class diagram. It would graphically show what
other Ant scripts a certain script uses and by which other scripts it is
used itself.
  */

hm, maybe either

http://www.yworks.com/en/products_antexplorer_about.htm
or
http://www.ericburke.com/antgraph/index.html
or
http://www.research.att.com/sw/tools/graphviz/


Regards, Gilbert

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


RE: Tool for documenting Ant scripts

Posted by Hans Schwaebli <ha...@yahoo.com>.
Thank you. But it does not seem to be the tool I have seen a while ago.
   
  The tool could reverse engineer the Ant scripts and create images which look like an UML class diagram. It would graphically show what other Ant scripts a certain script uses and by which other scripts it is used itself.
  

"Rebhan, Gilbert" <Gi...@huk-coburg.de> wrote:
  

-----Original Message-----
From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
Sent: Wednesday, November 21, 2007 8:25 AM
To: user@ant.apache.org
Subject: Tool for documenting Ant scripts

/*
I once seen that there is a tool to document Ant scripts. I think it
created HTML pages with images showing how the scripts and tasks relate
to each other.

Can you please tell me the name of that tool so that I can download
it?
*/

you meant AntDoc ? =
http://antdoc.free.fr/index.php

download
http://antdoc.free.fr/download_content.php

Regards, Gilbert





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



       
---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.

RE: Tool for documenting Ant scripts

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----Original Message-----
From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
Sent: Wednesday, November 21, 2007 8:25 AM
To: user@ant.apache.org
Subject: Tool for documenting Ant scripts

/*
I once seen that there is a tool to document Ant scripts. I think it
created HTML pages with images showing how the scripts and tasks relate
to each other.
   
  Can you please tell me the name of that tool so that I can download
it?
*/
  
you meant AntDoc  ? =
http://antdoc.free.fr/index.php

download
http://antdoc.free.fr/download_content.php

Regards, Gilbert





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


Re: Tool for documenting Ant scripts

Posted by Douglas Bullard <db...@nurflugel.com>.
I should have added a link to my earlier post on my Ant tool, this is  
the page with sample output from different types of Ant scripts:  http://www.nurflugel.com/webstart/AntScriptVisualizer/help/html/html/using_ant_script_visualizer.html

Douglas Bullard


On Nov 21, 2007, at 08:25, Hans Schwaebli wrote:

> I once seen that there is a tool to document Ant scripts. I think it  
> created HTML pages with images showing how the scripts and tasks  
> relate to each other.
>
>  Can you please tell me the name of that tool so that I can download  
> it?
>
>
> ---------------------------------
> Be a better sports nut! Let your teams follow you with Yahoo Mobile.  
> Try it now.


Re: Tool for documenting Ant scripts

Posted by Douglas Bullard <db...@nurflugel.com>.
Try my tool, which I've written to do exactly that:  http://www.nurflugel.com/webstart/AntScriptVisualizer

This is a little different than most tools, as it deals with multiple  
scripts (most tools only work with one), custom Ant tasks, macrodefs,  
etc.

Please let me know if you have feedback, I'm always trying to improve  
it.

Doug


On Nov 21, 2007, at 08:25, Hans Schwaebli wrote:

> I once seen that there is a tool to document Ant scripts. I think it  
> created HTML pages with images showing how the scripts and tasks  
> relate to each other.
>
>  Can you please tell me the name of that tool so that I can download  
> it?
>
>
> ---------------------------------
> Be a better sports nut! Let your teams follow you with Yahoo Mobile.  
> Try it now.


Tool for documenting Ant scripts

Posted by Hans Schwaebli <ha...@yahoo.com>.
I once seen that there is a tool to document Ant scripts. I think it created HTML pages with images showing how the scripts and tasks relate to each other.
   
  Can you please tell me the name of that tool so that I can download it?

       
---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.

RE: Specify non-top level target

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----Original Message-----
From: mjdenham [mailto:mjdenham@gmail.com] 
Sent: Tuesday, November 20, 2007 7:25 PM
To: user@ant.apache.org
Subject: Specify non-top level target

/*
My ant build file is getting quite long and has a lot of targets.  When
I
view the ant file in Eclipse it can be difficult to see which targets
are
the top-level ones which I would call and which are just helper targets
like
"init".

Is it possible to remove some of the "targets" from the external
interface
just leaving a set of targets which people will actually invoke.
*/

The eclipse outline view shows a nice overview of your script, if your
file is associated to the ant editor and if the outline view is opened.
You may then choose any target to be executed via right mouse, context
menu and Run As | Debug As

here is how to =

( i'm using the ant editor in eclipse version 3.2.2 )

first =
i've changed my settings in General | Editors | File Associations to
combine
all *.xml files with the ant editor. By default only files named
build.xml are bound
to the ant editor.
You may also create a new list of buildscript file names via File
Associations
and Add a comma separated list of file name patterns that should be
associated
to the ant editor, i.e. build.xml, foobar.xml, install.xml ... 

second=
Open the Outline View via Window | Show View | Outline
Now when a build script is opened with the ant editor, the target and
stuff are
listed in the Outline View, main target is marked blue.
The Outline View has several filters you may change to your like, i.e.
Hide Internal Target ( = only the main target is listed), Hide
Properties ...

third=
here is a nice plugin that is sometimes helpful to get a better
understanding on
large and complex build scripts :
http://www.yworks.com/en/products_antexplorer_eclipse.htm


Regards, Gilbert








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


AW: Specify non-top level target

Posted by Knuplesch, Jürgen <Ju...@icongmbh.de>.
In the outline in Eclipse ther is a button, by which you can hide internal targets. Internal targets are targets without description. 


-- 
Jürgen

-----Ursprüngliche Nachricht-----
Von: mjdenham [mailto:mjdenham@gmail.com] 
Gesendet: Dienstag, 20. November 2007 19:25
An: user@ant.apache.org
Betreff: Specify non-top level target


My ant build file is getting quite long and has a lot of targets.  When I view the ant file in Eclipse it can be difficult to see which targets are the top-level ones which I would call and which are just helper targets like "init".

Is it possible to remove some of the "targets" from the external interface just leaving a set of targets which people will actually invoke.

Thanks

Martin
--
View this message in context: http://www.nabble.com/Specify-non-top-level-target-tf4845485.html#a13862895
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Specify non-top level target

Posted by David Weintraub <qa...@gmail.com>.
Actually, the problem is solved with Eclipse itself. Eclipse can
filter out all targets that don't have a description parameter. Use
this feature, and names themselves don't matter so much. This also
works in the command line since "ant -projecthelp" will only print out
targets that have a description parameter.

If you do want to specify names, then make top level targets start
with an uppercase letter (or be all uppercase) and internal targets
start with a lowercase letter (or be all lowercase). After "z" comes
the curly braces, the pipe, and the tilde character -- all characters
with special Unix meanings.


On Nov 21, 2007 8:06 AM, Gilles Scokart <gs...@gmail.com> wrote:
> The problem with ~ is that it has a special meaning in unix command line.  If you have a user having the name of the
> target, you will have to escape it.
>
> Unfortunately, there is no ascii characters after ~.  Maybe starting the top level target by an uppercase and using _
> might work.
>
> Gilles
>
> > -----Original Message-----
> > From: mjdenham [mailto:mjdenham@gmail.com]
> > Sent: mercredi 21 novembre 2007 12:57
> > To: user@ant.apache.org
>
> > Subject: Re: Specify non-top level target
> >
> >
> > Thanks for all those great ideas everybody.
> >
> > Two ideas that I liked the most were:
> > 1. add a description to the target, making it non-internal.  Then click the
> > "Hide Internal Targets" toolbar button in Eclipse ant View.
> >
> > 2. Use a special prefix for internal ant targets.  The standard seems to be
> > '-' e.g. '-init'.  However I have found that using '~' has the benefit of
> > moving the internal targets to the bottom because Eclipse ant viewer sorts
> > targets alphabetically and '-' < a-z < '~' in ASCII.
> >
> > Thanks
> >
> > Martin
> > --
> > View this message in context: http://www.nabble.com/Specify-non-top-level-target-
> > tf4845485.html#a13875826
> > Sent from the Ant - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>



-- 
--
David Weintraub
qazwart@gmail.com

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


RE: Specify non-top level target

Posted by Gilles Scokart <gs...@gmail.com>.
The problem with ~ is that it has a special meaning in unix command line.  If you have a user having the name of the
target, you will have to escape it.

Unfortunately, there is no ascii characters after ~.  Maybe starting the top level target by an uppercase and using _
might work.

Gilles

> -----Original Message-----
> From: mjdenham [mailto:mjdenham@gmail.com]
> Sent: mercredi 21 novembre 2007 12:57
> To: user@ant.apache.org
> Subject: Re: Specify non-top level target
> 
> 
> Thanks for all those great ideas everybody.
> 
> Two ideas that I liked the most were:
> 1. add a description to the target, making it non-internal.  Then click the
> "Hide Internal Targets" toolbar button in Eclipse ant View.
> 
> 2. Use a special prefix for internal ant targets.  The standard seems to be
> '-' e.g. '-init'.  However I have found that using '~' has the benefit of
> moving the internal targets to the bottom because Eclipse ant viewer sorts
> targets alphabetically and '-' < a-z < '~' in ASCII.
> 
> Thanks
> 
> Martin
> --
> View this message in context: http://www.nabble.com/Specify-non-top-level-target-
> tf4845485.html#a13875826
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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: Specify non-top level target

Posted by mjdenham <mj...@gmail.com>.
Thanks for all those great ideas everybody.

Two ideas that I liked the most were:
1. add a description to the target, making it non-internal.  Then click the
"Hide Internal Targets" toolbar button in Eclipse ant View.

2. Use a special prefix for internal ant targets.  The standard seems to be
'-' e.g. '-init'.  However I have found that using '~' has the benefit of
moving the internal targets to the bottom because Eclipse ant viewer sorts
targets alphabetically and '-' < a-z < '~' in ASCII.

Thanks

Martin
-- 
View this message in context: http://www.nabble.com/Specify-non-top-level-target-tf4845485.html#a13875826
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Specify non-top level target

Posted by David Weintraub <qa...@gmail.com>.
When you create top level targets, use the "description" parameter.
Then, when you do ant -projecthelp, the names of the targets show up:

<target name="archive"
    description="Builds the compressed tarball archive in directory
&quot;archive&quot;"/>

$ ant -projecthelp
Buildfile: build.xml

Main targets:
archive   Builds the compressed tarball archive in directory "archive"

Default target: ???
$

Now through Eclipse...

You could create special "eclipse" targets that merely rename other
targets. I don't know how Eclipse lists targets (whether by file
location or alphabetically), but this could help:

<target name="01_archive"
    depends="archive"/>

I don't have Eclipse up and running, so I really can't test this, but
if Eclipse displays the targets in order in the build file, you could
put them on top. If it lists targets alphabetically, put a number
prefix in front of them.
On Nov 20, 2007 1:24 PM, mjdenham <mj...@gmail.com> wrote:
>
> My ant build file is getting quite long and has a lot of targets.  When I
> view the ant file in Eclipse it can be difficult to see which targets are
> the top-level ones which I would call and which are just helper targets like
> "init".
>
> Is it possible to remove some of the "targets" from the external interface
> just leaving a set of targets which people will actually invoke.
>
> Thanks
>
> Martin
> --
> View this message in context: http://www.nabble.com/Specify-non-top-level-target-tf4845485.html#a13862895
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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


RE: Specify non-top level target

Posted by Gilles Scokart <gs...@gmail.com>.
I also use target names starting with / for the targets that just set some properties modifying the behaviour of
whatever is executed after (for example '/offline', '/notest').  This doesn't change anything to visibility (they are
callable from command line), but regroup them logically, even when they have a description.

Gilles

> -----Original Message-----
> From: Dominique Devienne [mailto:ddevienne@gmail.com]
> Sent: mardi 20 novembre 2007 19:42
> To: Ant Users List
> Subject: Re: Specify non-top level target
> 
> On Nov 20, 2007 12:24 PM, mjdenham <mj...@gmail.com> wrote:
> > My ant build file is getting quite long and has a lot of targets.  When I
> > view the ant file in Eclipse it can be difficult to see which targets are
> > the top-level ones which I would call and which are just helper targets like
> > "init".
> >
> > Is it possible to remove some of the "targets" from the external interface
> > just leaving a set of targets which people will actually invoke.
> 
> No, I don't think so. But traditionally, some people (like me) used
> helper targets' name starting with a dask, as in "-init", which made
> them impossible to call from the command line, an in general indicates
> an "internal" (as in implement-detail) target of the build. IDEs don't
> have restrictions on calling these targets though. Having the leading
> dash would at least group these targets in a different lexicographic
> group, since targets are usually sorted by names in IDEs.
> 
> I would not be surprised to learn that some IDEs allow to hide some
> target names, but you can't do that in Ant AFAIK. --DD
> 
> ---------------------------------------------------------------------
> 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: Specify non-top level target

Posted by Dominique Devienne <dd...@gmail.com>.
On Nov 20, 2007 12:24 PM, mjdenham <mj...@gmail.com> wrote:
> My ant build file is getting quite long and has a lot of targets.  When I
> view the ant file in Eclipse it can be difficult to see which targets are
> the top-level ones which I would call and which are just helper targets like
> "init".
>
> Is it possible to remove some of the "targets" from the external interface
> just leaving a set of targets which people will actually invoke.

No, I don't think so. But traditionally, some people (like me) used
helper targets' name starting with a dask, as in "-init", which made
them impossible to call from the command line, an in general indicates
an "internal" (as in implement-detail) target of the build. IDEs don't
have restrictions on calling these targets though. Having the leading
dash would at least group these targets in a different lexicographic
group, since targets are usually sorted by names in IDEs.

I would not be surprised to learn that some IDEs allow to hide some
target names, but you can't do that in Ant AFAIK. --DD

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