So, I've found myself in a position where I need to sign all the jars in a project at the time of exporting to jar. So I'm trying to write this logic into my ant buildfile but I haven't had much luck yet. It looks something like this:

Java Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
              Any modifications will be overwritten.
              To include a user specific buildfile here, simply create one in the same
              directory with the processing instruction <?eclipse.ant.import?>
              as the first entry and export the buildfile again. -->

<project name="ToeChat" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
    <property environment="env"/>
    <property name="ECLIPSE_HOME" value="../../../../../Eclipse"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <property name="target" value="1.7"/>
    <property name="source" value="1.7"/>
    <path id="Ivy-final.classpath">
        <pathelement location="bin"/>
    <target name="init">
        <mkdir dir="bin"/>
        <copy includeemptydirs="false" todir="bin">
            <fileset dir="src">
                <exclude name="**/*.java"/>
        <copy includeemptydirs="false" todir="bin">
            <fileset dir=".">
                <exclude name="**/*.java"/>
                <exclude name="src/"/>
    <target name="clean">
        <delete dir="bin"/>
	    alias="MyAlias" keystore="MyKeyStore"
	    <fileset dir="bin" includes="**/*.jar" />
	<target name="resolve">
		<mkdir dir="${lib.dir}" />
		<ivy:resolve file="${ivy.file}"/>
		<ivy:retrieve />
	    <ivy:report todir='build/reports' graph='false' xml='false'/>
	    <ivy:cachepath pathid="compile.path" conf="compile"/>
    <target depends="clean" name="cleanall"/>
    <target depends="build-subprojects,build-project" name="build"/>
    <target name="build-subprojects"/>
    <target depends="init" name="build-project">
        <echo message="${}: ${ant.file}"/>
        <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
            <src path="src"/>
            <src path="."/>
            <exclude name="src/"/>
            <classpath refid="Ivy-final.classpath"/>
    <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
    <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
        <copy todir="${ant.library.dir}">
            <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
        <unzip dest="${ant.library.dir}">
            <patternset includes="jdtCompilerAdapter.jar"/>
            <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
    <target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
        <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
        <antcall target="build"/>
If anyone can help me fix this so it works I would love you forever <3

As an aside I'm not sure if I'm supposed to be including the keystore by name or anything else. It's in my jdk\bin\ folder.

Thanks guys!