Revision 77:e1867aefde6d
b/java/jgsscli/build.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 | 2 |
<project basedir="." default="build-project" name="jgsscli"> |
3 |
<property environment="env"/> |
|
4 |
<property name="debuglevel" value="source,lines,vars"/> |
|
5 |
<property name="target" value="1.5"/> |
|
6 |
<property name="source" value="1.5"/> |
|
7 |
<property name="src" value="src"/> |
|
8 |
<property name="build" value="bin"/> |
|
9 |
<property name="deploy" value="deploy"/> |
|
10 |
<property name="lib" value="lib"/> |
|
11 |
<path id="jgsscli.libclasspath"> |
|
12 |
<pathelement location="lib/commons-codec-1.3.jar"/> |
|
13 |
<pathelement location="lib/commons-io-1.4.jar"/> |
|
14 |
<pathelement location="lib/commons-logging-1.1.1.jar"/> |
|
15 |
<pathelement location="lib/log4j-1.2.15.jar"/> |
|
16 |
<pathelement location="lib/httpclient-4.0.1.jar"/> |
|
17 |
<pathelement location="lib/httpcore-4.0.1.jar"/> |
|
18 |
<pathelement location="lib/httpmime-4.0.1.jar"/> |
|
19 |
</path> |
|
20 |
<path id="jgsscli.classpath"> |
|
21 |
<pathelement location="${build}"/> |
|
22 |
<path refid="jgsscli.libclasspath"/> |
|
23 |
</path> |
|
24 |
|
|
25 |
<target name="init"> |
|
26 |
<mkdir dir="${build}"/> |
|
27 |
<mkdir dir="${deploy}"/> |
|
28 |
<copy includeemptydirs="false" todir="bin"> |
|
29 |
<fileset dir="${src}"> |
|
30 |
<exclude name="**/*.launch"/> |
|
31 |
<exclude name="**/*.java"/> |
|
32 |
</fileset> |
|
33 |
</copy> |
|
34 |
</target> |
|
35 |
|
|
36 |
<target name="clean"> |
|
37 |
<delete dir="${build}"/> |
|
38 |
<delete dir="${deploy}"/> |
|
39 |
</target> |
|
40 |
|
|
41 |
<target name="build-project" depends="init"> |
|
42 |
<echo message="${ant.project.name}: ${ant.file}"/> |
|
43 |
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}"> |
|
44 |
<src path="${src}"/> |
|
45 |
<classpath refid="jgsscli.libclasspath"/> |
|
46 |
</javac> |
|
47 |
</target> |
|
48 |
|
|
49 |
<target name="deploy" depends="build-project"> |
|
50 |
<pathconvert property="mf.classpath" pathsep=" " targetos="unix"> |
|
51 |
<map from="c:" to=""/> |
|
52 |
<path refid="jgsscli.libclasspath" /> |
|
53 |
</pathconvert> |
|
54 |
<jar destfile="${deploy}/jgsscli.jar"> |
|
55 |
<fileset dir="${build}"/> |
|
56 |
<fileset dir="${lib}"/> |
|
57 |
<fileset dir="${src}" includes="cli/*.properties"/> |
|
58 |
<manifest> |
|
59 |
<attribute name="Main-Class" value="jgsscli.cli.GSSClient"/> |
|
60 |
<attribute name="Class-Path" value="${mf.classpath}"/> |
|
61 |
</manifest> |
|
62 |
</jar> |
|
63 |
</target> |
|
64 |
|
|
65 |
<target name="run" depends="build-project"> |
|
66 |
<java classname="jgsscli.cli.GSSClient" fork="true"> |
|
67 |
<classpath refid="jgsscli.classpath"/> |
|
68 |
<arg line="${args}"/> |
|
69 |
<sysproperty key="java.util.logging.config.file" value="logging.properties"/> |
|
70 |
</java> |
|
71 |
</target> |
|
72 |
|
|
3 |
<property environment="env"/> |
|
4 |
<property name="debuglevel" value="source,lines,vars"/> |
|
5 |
<property name="target" value="1.5"/> |
|
6 |
<property name="source" value="1.5"/> |
|
7 |
<property name="src" value="src"/> |
|
8 |
<property name="build" value="bin"/> |
|
9 |
<property name="deploy" value="deploy"/> |
|
10 |
<property name="lib" value="lib"/> |
|
11 |
<path id="jgsscli.libclasspath"> |
|
12 |
<pathelement location="${lib}/commons-codec-1.3.jar"/> |
|
13 |
<pathelement location="${lib}/commons-io-1.4.jar"/> |
|
14 |
<pathelement location="${lib}/commons-logging-1.1.1.jar"/> |
|
15 |
<pathelement location="${lib}/log4j-1.2.15.jar"/> |
|
16 |
<pathelement location="${lib}/httpclient-4.0.1.jar"/> |
|
17 |
<pathelement location="${lib}/httpcore-4.0.1.jar"/> |
|
18 |
<pathelement location="${lib}/httpmime-4.0.1.jar"/> |
|
19 |
</path> |
|
20 |
<path id="jgsscli.classpath"> |
|
21 |
<pathelement location="${build}"/> |
|
22 |
<path refid="jgsscli.libclasspath"/> |
|
23 |
</path> |
|
24 |
|
|
25 |
<target name="init"> |
|
26 |
<mkdir dir="${build}"/> |
|
27 |
<mkdir dir="${deploy}"/> |
|
28 |
<copy includeemptydirs="false" todir="bin"> |
|
29 |
<fileset dir="${src}"> |
|
30 |
<exclude name="**/*.launch"/> |
|
31 |
<exclude name="**/*.java"/> |
|
32 |
</fileset> |
|
33 |
</copy> |
|
34 |
</target> |
|
35 |
|
|
36 |
<target name="clean"> |
|
37 |
<delete dir="${build}"/> |
|
38 |
<delete dir="${deploy}"/> |
|
39 |
</target> |
|
40 |
|
|
41 |
<target name="build-project" depends="init"> |
|
42 |
<echo message="${ant.project.name}: ${ant.file}"/> |
|
43 |
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}"> |
|
44 |
<src path="${src}"/> |
|
45 |
<classpath refid="jgsscli.libclasspath"/> |
|
46 |
</javac> |
|
47 |
</target> |
|
48 |
|
|
49 |
<target name="deploy" depends="build-project"> |
|
50 |
<pathconvert property="mf.classpath" pathsep=" " targetos="unix"> |
|
51 |
<map from="${basedir}/" to=""/> |
|
52 |
<path refid="jgsscli.libclasspath" /> |
|
53 |
</pathconvert> |
|
54 |
<copy todir="${deploy}/lib"> |
|
55 |
<fileset dir="${lib}"/> |
|
56 |
</copy> |
|
57 |
<jar destfile="${deploy}/jgsscli.jar"> |
|
58 |
<fileset dir="${build}"/> |
|
59 |
<fileset dir="${src}" includes="cli/*.properties"/> |
|
60 |
<manifest> |
|
61 |
<attribute name="Main-Class" value="jgsscli.cli.GSSClient"/> |
|
62 |
<attribute name="Class-Path" value="${mf.classpath}"/> |
|
63 |
</manifest> |
|
64 |
</jar> |
|
65 |
<zip destfile="${deploy}/jgsscli.zip" basedir="${deploy}" update="true"/> |
|
66 |
</target> |
|
67 |
|
|
68 |
<target name="run" depends="build-project"> |
|
69 |
<java classname="jgsscli.cli.GSSClient" fork="true"> |
|
70 |
<classpath refid="jgsscli.classpath"/> |
|
71 |
<arg line="${args}"/> |
|
72 |
<sysproperty key="java.util.logging.config.file" value="logging.properties"/> |
|
73 |
</java> |
|
74 |
</target> |
|
75 |
|
|
73 | 76 |
</project> |
Also available in: Unified diff