Statistics
| Branch: | Revision:

root / java / jgsscli / build.xml @ 116:c7e990050e01

History | View | Annotate | Download (2.6 kB)

1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
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="clean, 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
                <!--<copy file="gss.properties" todir="${deploy}"/>-->
58
                <copy file="${src}/log4j-deploy.properties" tofile="${deploy}/log4j.properties"/>
59
                <jar destfile="${deploy}/jgsscli.jar">
60
                        <fileset dir="${build}"/>
61
                        <fileset dir="${deploy}" includes="*.properties"/>
62
                        <manifest>
63
                                <attribute name="Main-Class" value="jgsscli.cli.GSSClient"/>
64
                                <attribute name="Class-Path" value="${mf.classpath}"/>
65
                        </manifest>
66
                </jar>
67
                <zip destfile="${deploy}/jgsscli.zip" basedir="${deploy}"/>
68
        </target>
69

    
70
        <target name="run" depends="build-project">
71
                <java classname="jgsscli.cli.GSSClient" fork="true">
72
                        <classpath refid="jgsscli.classpath"/>
73
                        <arg line="${args}"/>
74
                        <sysproperty key="java.util.logging.config.file" value="logging.properties"/>
75
                </java>
76
        </target>
77

    
78
</project>