-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
executable file
·105 lines (88 loc) · 3.39 KB
/
build.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
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY buildProps SYSTEM "./build.properties">
]>
<project name="agris2agrif" default="build" basedir=".">
&buildProps;
<property name="appname" value="${ant.project.name}" />
<property name="compile.debug" value="true" />
<property name="compile.optimize" value="false" />
<path id="compile.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="run.classpath">
<pathelement location="${build.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<echo message="-------- Start building, please wait --------" />
</target>
<target name="build" depends="compile">
<echo message=" Building with ${ant.version} on Java ${ant.java.version}...." />
</target>
<target name="prepare" depends="init">
<mkdir dir="${dist.dir}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${tokenizerOuptputDir}" />
</target>
<target name="compile" depends="generateParser">
<javac srcdir="${src.dir}/" destdir="${build.dir}/" encoding="utf8" debug="${compile.debug}">
<classpath refid="compile.classpath" />
<!--
<compilerarg value="-Xlint:unchecked" />
-->
</javac>
</target>
<target name="clean">
<delete dir="${dist.dir}" />
<delete dir="${build.dir}" />
<delete file="${tokenizerOuptputDir}/AGRIS2AGRIF.java" />
<delete file="${tokenizerOuptputDir}/AGRIS2AGRIF.java~" />
</target>
<target name="dist" depends="package">
<echo message=" Packaging jar file...." />
</target>
<target name="package" depends="build">
<jar destfile="${dist.dir}/${appname}.jar"
basedir="${build.dir}" >
<manifest>
<attribute name="Main-Class" value="gr.agroknow.metadata.transformer.agris2agrif.Main" />
<attribute name="Class-Path" value="./lib/commons-io-2.4.jar ./lib/json-simple-1.1.1.jar ./lib/agrif.jar ./lib/zettatoolbox.jar ./lib/langdetect.jar ./lib/jsonic-1.3.0.jar" />
</manifest>
</jar>
</target>
<target name="runtest">
<java classname="gr.agroknow.metadata.transformer.agris2agrif.Main" classpathref="run.classpath">
<arg value="-input"/>
<arg path="${data.dir}/AGRIS/TEST"/>
<arg value="-output"/>
<arg path="${data.dir}/AGRIF/TEST"/>
<arg value="-bad"/>
<arg path="${data.dir}/BAD"/>
<arg value="-set"/>
<arg value="TEST"/>
<arg value="-manifestation"/>
<arg value="landingPage"/>
<arg value="-mtdLanguage"/>
<arg value="pt"/>
<!--arg value="-potentialLanguages"/>
<arg value="en,pt"/-->
</java>
</target>
<target name="generateParser" depends="prepare">
<java jar="${jflex.jar}" fork="true">
<arg value="-d"/>
<arg value="${tokenizerOuptputDir}"/>
<arg value="${tokenizer}"/>
</java>
</target>
<!--target name="generateAnalyzer" depends="prepare">
<exec dir="${tokenizerOuptputDir}" executable="${bin.dir}/yacc.macosx" failonerror="true">
<arg line="-J -Jclass=Analyzer -Jpackage=org.eun.cnf ${analyzer}"/>
</exec>
</target-->
</project>