-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.xml
84 lines (84 loc) · 3.09 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="fel" default="clean" basedir=".">
<property name="buildDir" value="bin" />
<property name="deployDir" value="deploy" />
<property name="srcDir" value="src\main" />
<property name="srcDirJava15" value="src\java15" />
<property name="srcDirJava16" value="src\java16" />
<property name="testDir" value="test" />
<property name="destClassDir" value="${deployDir}\classes" />
<property name="destLibPath" value="${deployDir}\fel.jar" />
<property name="destSrcPath" value="${deployDir}\fel-src.tar.gz" />
<property name="destAllInOnePath" value="${deployDir}\fel-all.tar.gz" />
<property name="classpathDir" value="LibClass" />
<property name="antlrJarPath" value="lib/antlr-min-3.4.jar" />
<property name="toolsPath" value="d:\jdk1.5\lib\tools.jar" />
<target name="prepare">
<echo>clean ${deployDir} folder</echo>
<mkdir dir="${deployDir}" />
<delete includeEmptyDirs="true">
<fileset dir="${deployDir}" includes="**/*" />
</delete>
<mkdir dir="${deployDir}" />
<mkdir dir="${destClassDir}" />
</target>
<!-- 编译成jdk1.6版本 -->
<target name="compile" description="编译源文件" depends="prepare">
<echo>compile ${srcDir} ${srcDirJava16} to ${destClassDir}</echo>
<javac srcdir="${srcDir}${path.separator}${srcDirJava16}" destdir="${destClassDir}" excludes="**/FelCompiler15.java" includeantruntime="on">
<classpath>
<!--
<fileset file="${toolsPath}">
</fileset>
-->
<fileset file="${antlrJarPath}">
</fileset>
</classpath>
</javac>
<copy todir="${destClassDir}">
<fileset dir="${srcDir}" excludes="**/*.java/" />
<fileset dir="${srcDirJava16}" excludes="**/*.java/" />
<!--
<fileset dir="${classpathDir}" excludes="**/*.java/" />
-->
</copy>
<echo>compile success</echo>
</target>
<target name="jar" depends="compile">
<jar compress="true" destfile="${destLibPath}">
<fileset dir="${destClassDir}">
</fileset>
<zipfileset excludes="META-INF/*.SF" src="${antlrJarPath}" />
</jar>
<echo>jar success</echo>
<exec executable="explorer">
<arg line="${deployDir}" />
</exec>
</target>
<target name="package" depends="jar">
<zip destfile="${destSrcPath}" compress="true">
<!--
<fileset dir="${srcDir}" excludes="**/FelCompiler15.*"></fileset>
<fileset dir="${testDir}" excludes="**/Test**.java"></fileset>
-->
<fileset dir="." includes="src/**,test/**" excludes="**/Test*.java"> </fileset>
</zip>
<zip destfile="${destAllInOnePath}" compress="true">
<fileset dir="." includes="src/**,test/**" excludes="**/Test*.java"> </fileset>
<fileset dir="." includes="docs/updateLog.txt,docs/Fel.pdf" > </fileset>
<fileset dir="." includes="lib/antlr-min-3.4.jar" > </fileset>
<fileset file="${destLibPath}"></fileset>
</zip>
</target>
<target name="clean" depends="package">
<delete includeEmptyDirs="true">
<fileset dir="${deployDir}">
<exclude name="fel*" />
<exclude name="fel*.tar.gz" />
</fileset>
</delete>
<copy todir="E:\workspace\yuqingsong\WebContent\WEB-INF\lib">
<fileset file="${destLibPath}"></fileset>
</copy>
</target>
</project>