JAL-3033 WIP ant tasks for jalviewjs
[jalview.git] / build.xml
index d636a42..89b5089 100755 (executable)
--- a/build.xml
+++ b/build.xml
@@ -38,7 +38,7 @@
     <echo message="testng - run jalview's tests via testNG. Default group is '${testng-groups}'" />
     <echo message="      you can specify particular test groups as a list via -Dtestng-groups=" />
     <echo message="See docs/building.html and the comments in build file for other targets." />
-    <echo message="note: compile and makeApplet require the property java118.home to be set to point to a java 1.1.8 jdk." />
+    <echo message="note: compile and makeApplet optionally compile/obfuscate applet against a different Java version by specifying -Djava118.home=PathtoJDK/lib which is the lib directory in the JDK install that contains rt.jar " />
     <echo message="Useful -D flags: -Ddonotobfuscate will prevent applet obfuscation" />
   </target>
 
     </path>
     <property name="source.dist.name" value="${basedir}/jalview-src.tar.gz" />
     <!-- The Location of the java 1.1.8 jdk -->
-    <!--<property name="java118.home" value="C:\Sun\jdk1.1.8" /> -->
     <property name="java118.home" value="${java.home}" />
-    <!-- <property name="applet.jre.tools" value="${java118.home}/lib/classes.zip" />
-               -->
     <!-- jre for 1.4 version -->
-    <property name="applet.jre.tools" value="${java.home}/lib/rt.jar" />
+    <property name="applet.jre.tools" value="${java118.home}/lib/rt.jar" />
 
     <!-- the classpath for building the 1.1 applet -->
     <path id="jalviewlite.deps">
       <fileset dir="${java118.home}">
-        <include name="lib/classes.zip" />
+        <include name="lib/rt.jar" />
       </fileset>
       <fileset dir="${java.home}/lib">
         <include name="plugin.jar" />
   </target>
 
   <target name="buildindices" depends="init, prepare" unless="help.uptodate">
+    <replace value="${JALVIEW_VERSION}">
+      <replacetoken><![CDATA[$$Version-Rel$$]]></replacetoken>
+      <fileset dir="${outputDir}/${helpDir}">
+        <include name="help.jhm" />
+      </fileset>
+    </replace>
+
     <java classname="com.sun.java.help.search.Indexer" classpathref="build.classpath" fork="true" dir="${outputDir}/${helpDir}">
       <arg line="html" />
     </java>
     <arg value="-nointernet"/>
   </java>
 </target>
+  
+  <target name="eclipse-install" depends="init,prepare">
+    
+    <property name="eclipseTempFile" value="eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz"/>
+    <property name="eclipseInstallURL" value="http://mirror.csclub.uwaterloo.ca/eclipse/technology/epp/downloads/release/oxygen/R/eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz"/>
+    <property name="java2scriptURL" value="https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.core/dist/dropins/net.sf.j2s.core.jar?raw=true"/>
+    
+    <get url="${eclipseInstallURL}" dest="${eclipseTempFile}"/>
+    <untar compression="gzip" src="${eclipseTempFile}" dest="eclipse-inst"/>
+    <get url="${java2scriptURL}" dest="eclipse-inst/dropins/net.sf.j2s.core.jar"/>
+    
+  </target>
+<target name="build-site" depends="init,prepare">
+  <!-- execute eclipse build, trap log and dump to stdout here -->
+      
+  <!-- <mkdir dir="${packageDir}/${site}" /> -->
+  <property name="swingjs.zipurl" value="https://github.com/BobHanson/java2script/blob/master/sources/net.sf.j2s.java.core/dist/SwingJS-site.zip?raw=true" />
+  <property name="swingjs.zip" value="SwingJS-site.zip" />
+  <get src="${swingjs.zipurl}" dest="" usetimestamp="true" />
+  <unzip src="${swingjs.zip}" dest="${packageDir}/${site}/" />
+</target>
+  <!-- closure compile -->
+  <!-- copy test files into place in site -->
 </project>