[go: up one dir, main page]

Menu

[r147]: / trunk / build.xml  Maximize  Restore  History

Download this file

175 lines (141 with data), 6.4 kB

  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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0"?>
<!-- Written to assume that classpath is rooted in the current directory. -->
<!-- So this should be OK if you make this script in the root of a filesystem. -->
<!-- If not, you may prefer to adjust the basedir, or move some directories around. -->
<!-- The idea is that both Ant and NetBeans have to know what the package root is -->
<!-- for the classes in your application. -->
<project name="NobleTools" basedir="." default="all">
<!-- Don't worry if you don't know the Ant syntax completely or need help on some tasks! -->
<!-- The standard Ant documentation is bundled. See Help | Shortcuts | Ant 1.3 Documentation. -->
<property environment="env" />
<property name="manifest.app.name" value="NobleCoder" />
<property name="manifest.created.by" value="University of Pittsburgh" />
<property name="manifest.main.class" value=" edu.pitt.dbmi.nlp.noble.ui.NobleCoderTool" />
<property name="version.number" value="1.0" />
<!-- directories -->
<property name="lib.dir" value="lib" />
<property name="src.dir" value="src" />
<property name="bin.dir" value="bin" />
<property name="resource.dir" value="src/resources" />
<property name="icon.dir" value="src/icons" />
<property name="doc.dir" value="doc" />
<!-- buildc dir sits OUTSIDE the cvs -->
<property name="build.dir" value="./build" />
<property name="build.classes" value="${build.dir}/classes" />
<!-- 3rd party libraries -->
<property name="servlet" value="servlet-2_3.jar" />
<property name="owl" value="owlapi-distribution-3.5.0.jar" />
<property name="jdbm3" value="jdbm-3.0.jar" />
<property name="protege" value="protege.jar" />
<property name="protege-owl" value="protege-owl.jar" />
<!-- libs for this projects -->
<property name="library.file" value="${build.dir}/NobleTools-${version.number}.jar" />
<property name="package.file" value="${build.dir}/NobleCoder.jar" />
<!-- CLASSPATH definitions -->
<path id="class.path">
<pathelement location="${lib.dir}/${jdbm3}" />
<pathelement location="${lib.dir}/${owl}" />
</path>
<!-- targets -->
<!-- Utility Targets -->
<target name="clean" depends="">
<delete dir="${build.classes}" />
<delete dir="${build.lib}" />
<delete dir="${build.sign}" />
</target>
<target name="all" depends="" description="Build, Move everything.">
<echo message="Application built. No Problems!" />
</target>
<!-- create build directories???? (I don't know if it is necessary thought) -->
<target name="makedirs" depends="">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.classes}" />
<mkdir dir="${build.classes}/icons" />
<mkdir dir="${build.classes}/resources" />
</target>
<!-- compile client code -->
<target name="compile" depends="clean,makedirs">
<javac srcdir="${src.dir}" destdir="${build.classes}" debug="true" deprecation="true" classpathref="class.path" source="1.5" target="1.5">
<exclude name="**/protege/**" />
<exclude name="**/servlet/**" />
</javac>
</target>
<target name="jar" depends="compile" description="create a NobleTools.jar library to use for API calls">
<copy todir="${build.classes}/resources">
<fileset dir="${resource.dir}" includes="*.*" />
</copy>
<copy todir="${build.classes}/icons">
<fileset dir="${icon.dir}" includes="*.gif" />
</copy>
<jar jarfile="${library.file}" basedir="${build.classes}">
<manifest>
<attribute name="Trusted-Library" value="true" />
</manifest>
</jar>
</target>
<target name="exec_NobleCoder" description="build stand-alone NobleCoder.jar application">
<echo>=== PACKAGE ===</echo>
<!-- convert build.classpath to mf.classpath (the string needed for the manifest task) -->
<pathconvert property="mf.classpath" pathsep=" ">
<path refid="class.path" />
<flattenmapper />
</pathconvert>
<!-- now build the manifest file, using mf.classpath -->
<tstamp />
<!-- needed for TODAY -->
<!-- create the jar file, including the manifest file we just created -->
<jar destfile="${package.file}" filesetmanifest="mergewithoutmain">
<zipgroupfileset dir="${lib.dir}">
<exclude name="servlet*" />
<exclude name="protege*" />
<exclude name="jena*" />
<include name="*.jar" />
</zipgroupfileset>
<fileset dir="${bin.dir}"/>
<manifest>
<attribute name="Application-Name" value="${manifest.app.name}" />
<attribute name="Created-By" value="${manifest.created.by}" />
<attribute name="Main-Class" value="${manifest.main.class}" />
<attribute name="Implementation-Version" value="${version.number}" />
<attribute name="Built-Date" value="${TODAY}" />
<attribute name="Class-Path" value="${mf.classpath}" />
<attribute name="Permissions" value="all-permissions" />
<attribute name="Codebase" value="*" />
</manifest>
</jar>
</target>
<target name="exec_InformationExtractor" description="build stand-alone NobleCoder.jar application">
<echo>=== PACKAGE ===</echo>
<!-- convert build.classpath to mf.classpath (the string needed for the manifest task) -->
<pathconvert property="mf.classpath" pathsep=" ">
<path refid="class.path" />
<flattenmapper />
</pathconvert>
<!-- now build the manifest file, using mf.classpath -->
<tstamp />
<!-- needed for TODAY -->
<!-- create the jar file, including the manifest file we just created -->
<jar destfile="${build.dir}/InformationExtractor.jar" filesetmanifest="mergewithoutmain">
<zipgroupfileset dir="${lib.dir}">
<exclude name="servlet*" />
<exclude name="protege*" />
<exclude name="jena*" />
<include name="*.jar" />
</zipgroupfileset>
<fileset dir="${bin.dir}"/>
<manifest>
<attribute name="Application-Name" value="InformationExtractor" />
<attribute name="Created-By" value="${manifest.created.by}" />
<attribute name="Main-Class" value="edu.pitt.dbmi.nlp.noble.extract.InformationExtractor" />
<attribute name="Implementation-Version" value="${version.number}" />
<attribute name="Built-Date" value="${TODAY}" />
<attribute name="Class-Path" value="${mf.classpath}" />
<attribute name="Permissions" value="all-permissions" />
<attribute name="Codebase" value="*" />
</manifest>
</jar>
</target>
<target name="doc">
<javadoc sourcepath="${src.dir}" destdir="${doc.dir}/api/" packagenames="edu.pitt.*" />
</target>
</project>