build.xml 1.47 KB
Newer Older
Karel Rymeš's avatar
Karel Rymeš committed
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project AB1.0 with Jar-in-Jar Loader">
    <!--ANT 1.7 is required                                        -->
 <property name="lib.dir"     value="external"/>

    <path id="classpath">
        <fileset dir="${lib.dir}" includes="**/*.jar"/>
    </path>    
<target name="clean">
        <delete dir="src" includes = "**/*.class"/>
    </target>

    <target name="compile">
        <mkdir dir="src"/>
	 <javac srcdir="src" destdir="src" classpathref="classpath"/>
    </target>  


  <target name="jar">
        <jar destfile="ABSoftware.jar">
            <manifest>
                <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
                <attribute name="Rsrc-Main-Class" value="ab.demo.MainEntry"/>
                <attribute name="Class-Path" value="."/>
                <attribute name="Rsrc-Class-Path" value="./ Jama-1.0.2.jar json-simple-1.1.1.jar WebSocket.jar commons-codec-1.7.jar"/>
            </manifest>
            <zipfileset src="external/jar-in-jar-loader.zip"/>
            <fileset dir="src/"/>
            <zipfileset dir="external" includes="Jama-1.0.2.jar"/>
            <zipfileset dir="external" includes="json-simple-1.1.1.jar"/>
            <zipfileset dir="external" includes="WebSocket.jar"/>
            <zipfileset dir="external" includes="commons-codec-1.7.jar"/>
        </jar>
    </target>
</project>