-
Notifications
You must be signed in to change notification settings - Fork 11
/
README.txt
130 lines (86 loc) · 3.86 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Description
-----------
Grand is a tool to create visual representation of Ant target dependencies.
It works by taking a Ant build file and creating a DOT language file. This
file needs to be post-processed with Graphviz to produce the actual graph.
Usage
-----
Grand's front end is an Ant task that must be defined with the following line:
<typedef resource="net/ggtools/grand/antlib.xml"/>
You may have to add attribute classpath="path_to_grand.jar" if the grand jar
isn't already in the classpath.
The grand task takes the following attributes:
output name of the output file (mandatory).
buildfile name of the build file to graph. If omitted, the current
build file will be used.
outputconfigfile a property file to configure the output.
showgraphname if true, the generated graph will have the Ant project's
name displayed a the graph label.
inheritall If true, the properties of the current build file will be
passed to the graphed build file. The default is not to
pass the properties to the graphed project.
Beside these attributes, the task can take as nested elements: property,
propertyset and filter. The first two are the standard Ant elements and are
used to pass properties to the graphed project.
The filter element is used to apply filter on the full graph. The filter
element accepts the following attributes:
name filter name. Can be one of isolatednode, missingnode,
fromnode, tonode, connected or prefixed; mandatory.
node node name. Depending of the selected filter, this attribute
can have different meanings and may or may not be mandatory.
Isolated node
Removes isolated nodes (i.e.: nodes with no links) from the graph. The
node attribute is not used by this filter.
Missing node
Removes nodes created when a link make reference to a nonexistent one.
The node attribute is not used by this filter.
From node
Keeps only a selected node and the nodes it depends upon. The node
parameter is the name of the node to start from.
To node
Keeps only a selected node and the nodes depending upon it. The node
parameter is the name of the node to start from.
Connected
Keeps only a selected node and the nodes connected to it. The node
parameter is the name of the node to start from.
Prefixed
Removes prefixed nodes created by <import/> in Ant 1.8+ that may
clutter the graph. The node attribute is not used by this filter.
Examples
--------
The simplest form:
<grand output="build.dot"/>
Create a build.dot graph file using the current build file. Add a buildfile
attribute to process another file:
<grand output="build.dot" buildfile="ant-build.xml"/>
A two filter example:
<grand output="build.dot" buildfile="ant-build.xml">
<filter name="fromnode" node="dist"/>
<filter name="tonode" node="prepare"/>
</grand>
Known issues
------------
Subant dependencies on tasks not yet processed before invoking the grand task.
For instance in the following pseudo-build.xml:
<target name="subant-task-1">
<subant .../>
</target>
<target name="subant-task-2">
<subant .../>
</target>
<target name="dograph">
<grand .../>
</target>
Running "ant dograph" will get all the subant dependencies, while running
"ant subant-task-1 dograph" will only get dependencies from "subant-task-2"
and running "ant subant-task-1 subant-task-2 dograph" won't get any subant
dependencies at all.
More information
----------------
The Grand web site (https://ant-grand.github.io/Grand/grand.html) contains the full
documentation for Grand with some illustrated examples and the latest version.
You can contact me at [email protected].
Licensing
---------
This software is licensed under the terms you may find in the file
named "LICENSE" in this directory.