File size: 6,077 Bytes
5a1f678
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!-- build.xml file for ant for JavaNLP -->

<!-- Before using this, unjar the sources' jar file into the src/ directory! -->

<!-- A "project" describes a set of targets that may be requested
     when Ant is executed.  The "default" attribute defines the
     target which is executed if no specific target is requested,
     and the "basedir" attribute defines the current working directory
     from which Ant executes the requested task.  This is normally
     set to the current working directory.
-->

<project name="JavaNLP" default="compile" basedir=".">

  <property name="build.home"    value="${basedir}/classes"/>
  <property name="build.tests"    value="${basedir}/classes"/>
  <property name="docs.home"     value="${basedir}/docs"/>
  <property name="src.home"      value="${basedir}/src"/>
  <property name="javadoc.home"  value="${basedir}/javadoc"/>


<!--  ==================== Compilation Control Options ==================== -->

<!--

  These properties control option settings on the Javac compiler when it
  is invoked using the <javac> task.

  compile.debug        Should compilation include the debug option?

  compile.deprecation  Should compilation include the deprecation option?

  compile.optimize     Should compilation include the optimize option?

  compile.source       Source version compatibility

  compile.target       Target class version compatibility

-->

  <property name="compile.debug"       value="true"/>
  <property name="compile.deprecation" value="false"/>
  <property name="compile.optimize"    value="true"/>
  <property name="compile.source"      value="1.8" />
  <property name="compile.target"      value="1.8" />
  <property name="compile.encoding"      value="utf-8" />




<!-- ==================== All Target ====================================== -->

<!--

  The "all" target is a shortcut for running the "clean" target followed
  by the "compile" target, to force a complete recompile.

-->

  <target name="all" depends="clean,compile"
   description="Clean build and dist directories, then compile"/>



<!-- ==================== Clean Target ==================================== -->

<!--

  The "clean" target deletes any previous "build" and "dist" directory,
  so that you can be ensured the application can be built from scratch.

-->

  <target name="clean" description="Delete old classes">
    <delete dir="${build.home}/edu"/>
  </target>



<!-- ==================== Compile Target ================================== -->

<!--

  The "compile" target transforms source files (from your "src" directory)
  into object files in the appropriate location in the build directory.
  This example assumes that you will be including your classes in an
  unpacked directory hierarchy under "/WEB-INF/classes".

-->

  <target name="compile" depends="prepare"
   description="Compile Java sources">

    <!-- Compile Java classes as necessary -->
    <mkdir    dir="${build.home}"/>
    <javac srcdir="${src.home}"
          destdir="${build.home}"
            debug="${compile.debug}"
         encoding="${compile.encoding}"
      deprecation="${compile.deprecation}"
         optimize="${compile.optimize}"
	   source="${compile.source}"
           target="${compile.target}"
            includeantruntime="false">
      <compilerarg value="-Xmaxerrs"/>
      <compilerarg value="20"/>
      <classpath>
        <fileset dir="${basedir}/lib">
          <include name="*.jar"/>
          <exclude name="javanlp*"/>
        </fileset>
      </classpath>
      <!-- <compilerarg value="-Xlint"/> -->
    </javac>

    <!-- Copy application resources -->
<!--
    <copy  todir="${build.home}/WEB-INF/classes">
      <fileset dir="${src.home}" excludes="**/*.java"/>
    </copy>
-->

  </target>


<!-- ==================== Javadoc Target ================================== -->

<!--

  The "javadoc" target creates Javadoc API documentation for the Java
  classes included in your application.  Normally, this is only required
  when preparing a distribution release, but is available as a separate
  target in case the developer wants to create Javadocs independently.

-->

  <target name="javadoc" depends="compile"
   description="Create Javadoc API documentation">

    <mkdir          dir="${javadoc.home}"/>
    <javadoc sourcepath="${src.home}"
                destdir="${javadoc.home}"
              maxmemory="1g"
                 author="true"
                 source="${compile.source}"
                overview="${src.home}/edu/stanford/nlp/overview.html"
                doctitle="Stanford JavaNLP API Documentation"
             windowtitle="Stanford JavaNLP API"
             encoding="${compile.encoding}"
	     docencoding="${compile.encoding}"
	     charset="${compile.encoding}"
            packagenames="*">
      <!-- Allow @generated, @modifiable and @ordered tags -->
      <tag name="generated" scope="all" description="Generated" />
      <tag name="modifiable" scope="all" description="Modifiable" />
      <tag name="ordered" scope="all" description="Ordered" />
      <!-- Depends on lib and classes folders -->
      <classpath>
        <fileset dir="${basedir}/lib">
          <include name="*.jar"/>
          <exclude name="javanlp*"/>
        </fileset>
        <pathelement path="${build.home}" />
      </classpath>
      <bottom><![CDATA[<font size="2"><a href="https://nlp.stanford.edu" target="_top">Stanford NLP Group</a></font>]]></bottom>
      <link href="https://docs.oracle.com/javase/8/docs/api/"/>
    </javadoc>

  </target>


<!-- ==================== Prepare Target ================================== -->

<!--

  The "prepare" target is used to create the "build" destination directory,
  and copy the static contents of your web application to it.  If you need
  to copy static files from external dependencies, you can customize the
  contents of this task.

  Normally, this task is executed indirectly when needed.

-->

  <target name="prepare">

    <!-- Create build directories as needed -->
    <mkdir  dir="${build.home}"/>

  </target>

</project>