JAL-1791 add explicit proxy for benefit of jalview's build server when timestamping...
[jalview.git] / build.xml
index e1ca55f..6b5fead 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!--
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -27,7 +27,8 @@
     <echo message="build - compiles all necessary files for Application" />
     <echo message="makedist - compiles and places all necessary jar files into directory dist" />
     <echo message="makefulldist - signs all jar files and builds jnlp file for full distribution" />
-    <echo message="              this needs a keystore and key. See docs/building.html for more information." />
+    <echo message="              this needs a keystore and key. Add -Dtimestamp to timestamp signed jars"/>
+    <echo message="              See docs/building.html for more information." />
     <echo message="compileApplet - compiles all necessary files for Applet" />
     <echo message="makeApplet - compiles, then packages and obfuscates the Applet" />
     <echo message="testng - run jalview's tests via testNG. Default group is '${testng-groups}'" />
@@ -82,7 +83,9 @@
     <property name="jalview.key" value="jalview" />
     <!-- Key Password -->
     <property name="jalview.key.pass" value="alignmentisfun" />
-
+       <!-- time stamp server URL -->
+    <property name="jalview.tsaurl" value="" />
+         
     <property name="testng-groups" value="Functional" />
 
     <!-- Don't change anything below here unless you know what you are doing! -->
     </java>
   </target>
 
-  <target name="makefulldist" depends="makedist">
+    <target name="preparejnlp" depends="makedist">
     <copy todir="${packageDir}">
       <fileset dir="${resourceDir}/images">
         <include name="${WebStartImage}" />
         <association mime-type="application-x/ext-file" extensions="amsa"/>
         <association mime-type="application-x/ext-file" extensions="stk"/>
         <association mime-type="application-x/ext-file" extensions="jar"/>-->
-    <!-- and sign the jars -->
-    <!-- the default keystore details might need to be edited here -->
+      </target>
+  
+  <target name="-jarsignwithtsa" depends="makedist,preparejnlp" if="timestamp">
+    <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA"
+      tsaproxyhost="squid" tsaproxyport="80" tsaurl="${jalview.tsaurl}">
+      <fileset dir="${packageDir}">
+        <include name="*.jar" />
+      </fileset>      
+    </signjar>
+  </target>
+  <target name="-jarsignnotsa" depends="makedist,preparejnlp" unless="timestamp">
     <signjar storepass="${jalview.keystore.pass}" keypass="${jalview.key.pass}" keystore="${jalview.keystore}" alias="${jalview.key}" lazy="false" verbose="false" sigalg="SHA1withRSA">
       <fileset dir="${packageDir}">
         <include name="*.jar" />
-      </fileset>
+      </fileset>      
     </signjar>
   </target>
 
+  <target name="makefulldist" depends="makedist,preparejnlp,-jarsignwithtsa,-jarsignnotsa">
+    <!-- and sign the jars -->
+    <!-- the default keystore details might need to be edited here -->
+  </target>
+
   <target name="runenv" depends="init">
     <path id="run.classpath">
       <pathelement location="${outputDir}" />