-
Notifications
You must be signed in to change notification settings - Fork 2
/
stub.xml
141 lines (114 loc) · 4.09 KB
/
stub.xml
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
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="UTF-8"?>
<!--
The property mibble.dir is defined in build.xml and (maybe) overwritten
in build.properties
-->
<fileset id="mibble.jars" dir="${mibble.dir}">
<include name="lib/grammatica-bin-1.4.jar"/>
<include name="lib/mibble-parser-2.5.jar"/>
<include name="lib/mibble-mibs-2.5.jar"/>
</fileset>
<path id="mibble.classpath">
<fileset refid="mibble.jars"/>
</path>
<target name="runStubBrowser"
description="Runs an example application"
depends="compileStubBrowser">
<property name="package.name" value="uk.co.westhawk.stub"/>
<property name="package.dir" value="uk/co/westhawk/stub"/>
<property name="classname" value="StubBrowser"/>
<echo message="run ${package.name}.${classname} "/>
<!-- run the example -->
<java classname="${package.name}.${classname}"
fork="true">
<classpath>
<pathelement location="${snmp.jar}"/>
<path refid="mibble.classpath"/>
<pathelement location="${classes.dir}"/>
</classpath>
<arg value="${mibble.dir}/src/mibs/ietf/RFC1213-MIB"/>
<arg value="${mibble.dir}/src/mibs/ietf/SNMPv2-MIB"/>
<arg
value="/opt/scotty-2.1.11/lib/tnm2.1.11/mibs/linksys/LINKSYS-MODEL-MIB.mib"/>
<!-- add here your additional MIB files -->
</java>
</target>
<target name="buildStubBrowser" if="mibble.dir">
<antcall target="clean"/>
<antcall target="compileStubBrowser"/>
<antcall target="jarStubBrowser"/>
<antcall target="zipStubBrowser"/>
</target>
<target name="compileStubBrowser"
description="Compiling the Stub example">
<tstamp/>
<mkdir dir="${classes.dir}"/>
<javac destdir="${classes.dir}"
debug="${javac.debug}"
deprecation="on"
verbose="false">
<src>
<pathelement path="${src.dir}/uk"/>
</src>
<include name="**/westhawk/stub/*"/>
<classpath>
<pathelement location="${snmp.jar}"/>
<path refid="mibble.classpath"/>
</classpath>
</javac>
</target>
<!--
<target name="javadocStubBrowser"
description="Generates javadoc documentation">
<tstamp/>
<mkdir dir="${javadoc.dir}"/>
<property name="title" value="SNMP Stack ${version.no}"/>
<javadoc destdir="${javadoc.dir}"
header="<i>${title}</i>"
doctitle="${title}"
windowtitle="${title}"
additionalparam="-breakiterator">
<packageset dir="${src.dir}">
<include name="uk/co/westhawk/stub/**"/>
</packageset>
<classpath>
<path refid="general.classpath"/>
<path refid="mibble.classpath"/>
</classpath>
</javadoc>
</target>
-->
<target name="jarStubBrowser"
description="Target to create the stubbrowser jar file">
<property name="build.compiler" value="javac1.4"/>
<mkdir dir="${lib.dir}"/>
<jar destfile="${lib.dir}/stubBrowser${version.no}.jar"
basedir="${classes.dir}">
<include name="uk/co/westhawk/stub/**"/>
<manifest>
<section name="uk/co/westhawk/">
<attribute name="Implementation-Title" value="Westhawk Java SNMP Stub Browser"/>
<attribute name="Implementation-Version" value="${impl_version}"/>
</section>
</manifest>
</jar>
</target>
<target name="zipStubBrowser"
description="Zip up files for the stubbrowser distribution">
<delete file="stubBrowser${version.no}.zip"/>
<zip destfile="stubBrowser${version.no}.zip"
basedir=".">
<include name="*.xml"/>
<include name="*.properties"/>
<include name="${lib.dir}/stubBrowser${version.no}.jar"/>
<include name="${src.dir}/uk/co/westhawk/stub/**"/>
<exclude name="**/CVS*/**"/>
<exclude name="**/*~"/>
<exclude name="**/*.old"/>
<exclude name="**/*.swp"/>
<exclude name="**/*out*"/>
<exclude name="**/*.diff"/>
<exclude name="**/Makefile*"/>
<exclude name="**/package.html*"/>
</zip>
</target>