<project name="signjartest" default="help" basedir="..">
  <property name="classes.dir" value="../../../build/classes"/>

  <target name="basic">
    <jar jarfile="signtest.jar" basedir="${classes.dir}" includes="**/Task.class"/>
    <signjar jar="signtest.jar" alias="testonly" keystore="testkeystore"
             storepass="apacheant"/>
  </target>

  <target name="sigfile">
    <jar jarfile="signtest.jar" basedir="${classes.dir}" includes="**/Task.class"/>
    <signjar jar="signtest.jar" alias="testonly" keystore="testkeystore"
             storepass="apacheant" sigfile="TEST"/>
  </target>

  <target name="maxmemory">
    <jar jarfile="signtest.jar" basedir="${classes.dir}" includes="**/Task.class"/>
    <signjar jar="signtest.jar" alias="testonly" keystore="testkeystore"
             storepass="apacheant" maxmemory="128m"/>
  </target>

  <target name="urlKeystoreFile">
    <jar jarfile="signtest.jar" basedir="${classes.dir}" includes="**/Task.class"/>
    <signjar jar="signtest.jar" alias="testonly" keystore="file://../testkeystore"
             storepass="apacheant" maxmemory="128m"/>
  </target>

  <target name="urlKeystoreHTTP">
    <jar jarfile="signtest.jar" basedir="${classes.dir}" includes="**/Task.class"/>
    <signjar jar="signtest.jar" alias="testonly"
             keystore="http://cvs.apache.org/viewcvs.cgi/*checkout*/ant/src/etc/testcases/testkeystore?rev=HEAD"
             storepass="apacheant" maxmemory="128m"/>
  </target>

  <target name="preserveLastModified">
    <jar jarfile="signtest.jar" basedir="${classes.dir}" includes="**/Task.class"/>
    <touch file="signtest.jar" datetime="06/28/2000 2:02 pm"/>
    <signjar jar="signtest.jar" alias="testonly" keystore="testkeystore" storepass="apacheant" 
    	preservelastmodified="true"/>

    <fail message="preserveLastModified did not preserve the last modified time">
      <condition>
        <not>
          <isfileselected file="signtest.jar">
            <date datetime="06/28/2000 2:02 pm" when="equal"/>
          </isfileselected>
        </not>
      </condition>
    </fail>
  </target>

  <target name="clean">
    <delete file="signtest.jar"/>
  </target>

  <target name="help">
    <echo>This build is for use with Ant's test cases</echo>
  </target>

</project>

