ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kriss" <madrockr...@hotmail.com>
Subject Re: xsl script to generate graphical representation of build.xml
Date Thu, 27 Feb 2003 08:52:18 GMT
Sorry, I'm just going on a message from the archive but I didn't know how to
respond to an existing message in a thread.

To summarize :
    -  with this xsl you produce a .dot file
    - The dot file can be rendered using the dot command (from the graphviz
package, see http://www.graphviz.org/) to lots of formats like ps or png.
Minimal instructions are in the xsl file. (for windows version you need
cygwin www.cygwin.org with graphics packages)

Here are  samples ant task to do this (From: Erik Hatcher
[mailto:jakarta-ant@ehatchersolutions.com]):

<project name="diagram" default="main">

   <target name="build-dot">
     <xslt in="build.xml"
           style="${ant.home}/etc/ant2dot.xsl"
           out="dotfile.dot"
     />
   </target>

   <target name="diagram" depends="build-dot">
     <exec executable="c:\tools\graphviz\bin\dot.exe">
       <arg value="-Tpng"/>
       <arg file="dotfile.dot"/>
       <arg value="-obuild.png"/>
     </exec>
   </target>

   <target name="main" depends="diagram"/>
 </project>

 Of course hard-coded paths and such need to be factored out to properties,
 but thats not high on my to-do list!  :)  I call it like this from any
 directory:

     ant -f <path to this file>/diagram.xml -Dbasedir=.

 and it diagrams the build.xml in my current directory.

Kriss


----- Original Message -----
From: "Benoit Voisin" <benoit.voisin@ergoidp.dk>
To: "'Ant Users List'" <user@ant.apache.org>
Sent: Thursday, February 27, 2003 9:28 AM
Subject: RE: xsl script to generate graphical representation of build.xml


> Sorry to ask that, but what should I use to view the resulting file ? (a
> part from a text editor...)
>
> -----Original Message-----
> From: kriss [mailto:madrockriss@hotmail.com]
> Sent: 27 February 2003 09:04
> To: Ant Users List
> Subject: xsl script to generate graphical representation of build.xml
>
>
>
> Hi,
> I found it very useful and enhanced it a little bit to manage two targets
:
> ant and antcall.
>
> * ant : new lightblue box to see the differences  with dependences
>
> * antcall : new lightgray box for target, linked to grey box
> representing the buildfile (and dir)
>
> I didn't manage for the moment the possibility to use more than one build
> file to have a representation of build process, but I think I will work on
> it.
>
> Joined the new xsl, and a sample png.
>
> Kriss
>
>
> -----Original Message-----From: Chris Bailey
> <chris@codeintensity.com>Subject: xsl script to generate graphical
> representation of build.xmlDate: Thu, 6 Jun 2002
16:55:38 -0700Content-Type:
> text/plain; charset="iso-8859-1"
> I should also add, it'd be cool if someone enhanced this so that targets
>
> that call other targets in the same file (i.e. via <antcall>) are graphed.
>
>
>
> -----Original Message-----
>
> From: Chris Bailey [mailto:chris@codeintensity.com]
>
> Sent: Thursday, June 06, 2002 4:50 PM
>
> To: Ant Users List
>
> Subject: RE: xsl script to generate graphical representation of
>
> build.xml
>
>
>
>
>
> FYI, I set this up on my Linux box, and needed to change the font
specified
>
> in ant2dot.xsl.  I changed it from "Arial" to "verdana", but you may need
to
>
> fiddle around depending on what fonts you have.  I wasn't able to specify
a
>
> font name that had dashes in it (which may just be due to my lack of
knowing
>
> how to make that work in the XSL file).
>
>
>
>
>
>
>   _____
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
View raw message