Source

netbar-agent / build.xml

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<project name="netbar-agent" default="dist" basedir=".">
    <property name="src" location="src"/>
    <property name="dist" location="dist"/>
    <property name="build" location="build"/>
    <property name="lib" location="lib"/>
    <path id="compile.classpath">
        <pathelement path="${lib}/log4j.jar"/>
        <pathelement path="${lib}/snmp4j.jar"/>
        <pathelement path="${lib}/snmp4j-agent.jar"/>
    </path>
    <target name="init">
        <mkdir dir="${build}"/>
    </target>
    <target name="compile" depends="init">
        <javac srcdir="${src}" destdir="${build}" debug="on" source="1.5">
            <classpath refid="compile.classpath"/>
        </javac>
    </target>
	<target name="dist" depends="compile">
        <mkdir dir="${dist}"/>
        <mkdir dir="${dist}/agent"/>
        <copy todir="${dist}/agent">
            <fileset dir="${lib}"/>
        </copy>
        <copy file="${src}/start.bat" todir="${dist}/agent"/>
		<copy file="config.properties" todir="${dist}/agent"/>
        <copy file="c.properties" todir="${dist}/agent"/>
        <jar jarfile="${dist}/agent/agent.jar" basedir="${build}"/>
	</target>
	<target name="clean">
        <delete dir="${build}"/>
        <delete dir="${dist}"/>
	</target>
	<target name="zip" depends="init">
		<zip destfile="${dist}/agent.zip">
            <zipfileset dir="${src}" prefix="src"/>
            <zipfileset dir="${lib}" prefix="lib"/>
            <zipfileset dir="." includes="build.xml config.properties c.properties"/>
		</zip>
	</target>
</project>