-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.xml
51 lines (40 loc) · 1.43 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="jprotobuf" default="jar">
<property environment="env" />
<property name="java.home" value="${env.JAVA_HOME}" />
<property name="ant.home" value="${env.ANT_HOME}" />
<property name="src.dir" value="src/main/java" />
<property name="classes.dir" value="build" />
<property name="lib.dir" value="lib" />
<property name="jar.file" value="jprotobuf-rpc-http-1.6.0.jar" />
<property name="encoding" value="UTF-8" />
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init" depends="clean">
<echo message="Java home: ${java.home}" />
<echo message="Ant home: ${ant.home}" />
</target>
<target name="compile" depends="init">
<mkdir dir="${classes.dir}" />
<javac destdir="${classes.dir}" deprecation="true" encoding="${encoding}" debug="on" debuglevel="lines,vars,source" fork="yes" includeantruntime="false" memoryMaximumSize="1000M">
<src path="${src.dir}" />
<classpath refid="project.classpath" />
</javac>
<copy todir="${classes.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="jar" depends="compile">
<jar jarfile="output/${jar.file}" basedir="${classes.dir}">
</jar>
</target>
<target name="clean">
<echo message="Delete classes: ${classes.dir}" />
<delete dir="${build.src.dir}" />
</target>
</project>