added ant build file -> build/build.xml master
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 9 Dec 2014 14:56:56 +0000 (14:56 +0000)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 9 Dec 2014 14:56:56 +0000 (14:56 +0000)
.gitignore
build/build.xml [new file with mode: 0644]

index e883e9e..91b6b83 100644 (file)
@@ -1,6 +1,11 @@
 .project
 /bin
 .project
 /bin
-/build
+/build/build
+/build/deploy
+/build/dist
+/build/externalLibs
+/build/project
+/build/projectRefs
 .DS_Store
 /.com.apple.timemachine.supported
 .gitattributes
 .DS_Store
 /.com.apple.timemachine.supported
 .gitattributes
diff --git a/build/build.xml b/build/build.xml
new file mode 100644 (file)
index 0000000..5d8a384
--- /dev/null
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="UTF-8"?>
+       <project name="JalviewFX" default="do-deploy" basedir="."  xmlns:fx="javafx:com.sun.javafx.tools.ant">
+       <target name="init-fx-tasks">
+               <path id="fxant">
+                       <filelist>
+                               <file name="${java.home}\..\lib\ant-javafx.jar"/>
+                               <file name="${java.home}\lib\jfxrt.jar"/>
+                       </filelist>
+               </path>
+       
+               <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"      
+                       uri="javafx:com.sun.javafx.tools.ant"
+                       classpathref="fxant"/>
+       </target>
+       <target name="setup-staging-area">
+               <delete dir="externalLibs" />
+               <delete dir="project" />
+               <delete dir="projectRefs" />
+               
+               <mkdir dir="externalLibs" />
+               
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="saaj.jar"/>     
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="json_simple-1.1.jar"/>  
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="mail.jar"/>     
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="Jmol-12.2.4.jar"/>      
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="miglayout-4.0-swing.jar"/>      
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="httpclient-4.0.3.jar"/> 
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jalview.jar"/>  
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="groovy-all-1.8.2.jar"/> 
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="httpcore-4.0.1.jar"/>   
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jsoup-1.8.1.jar"/>      
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="castor-1.1-cycle-xml.jar"/>     
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="min-jabaws-client-2.1.0.jar"/>  
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="wsdl4j.jar"/>   
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="spring-web-3.0.5.RELEASE.jar"/> 
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="axis.jar"/>     
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="slf4j-log4j12-1.7.7.jar"/>      
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jaxrpc.jar"/>   
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="apache-mime4j-0.6.jar"/>        
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="commons-discovery.jar"/>        
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="xml-apis.jar"/> 
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="log4j-to-slf4j-2.0-rc2.jar"/>   
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jdas-1.0.4.jar"/>       
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="spring-core-3.0.5.RELEASE.jar"/>        
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="commons-codec-1.3.jar"/>        
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jfreesvg-2.1.jar"/>     
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="xercesImpl.jar"/>       
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="VARNAv3-91.jar"/>       
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jhall.jar"/>    
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="jswingreader-0.3.jar"/> 
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="JGoogleAnalytics_0.3.jar"/>     
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="activation.jar"/>       
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="regex.jar"/>    
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="commons-logging-1.1.1.jar"/>    
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="slf4j-api-1.7.7.jar"/>  
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="httpmime-4.0.3.jar"/>   
+                       </fileset>
+               </copy>
+               <copy todir="externalLibs">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX/lib">
+                               <filename name="vamsas-client.jar"/>    
+                       </fileset>
+               </copy>
+               
+               <mkdir dir="project" />
+               <copy todir="project">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX">
+                               <include name="src/**" />
+                       </fileset>
+               </copy>
+               <copy todir="project">
+                       <fileset dir="/Users/tcnofoegbu/Documents/workspace/java/dev/JalviewFX">
+                               <include name="resources/**" />
+                       </fileset>
+               </copy>
+               
+               <mkdir dir="projectRefs" />
+       </target>
+       <target name='do-compile'>
+               <delete dir="build" />
+               <mkdir dir="build/src" />
+               <mkdir dir="build/libs" />
+               <mkdir dir="build/classes" />
+       
+               <!-- Copy project-libs references -->
+               <copy todir="build/libs">
+                       <fileset dir="externalLibs">
+                               <include name="jaxrpc.jar"/>
+                               <include name="jswingreader-0.3.jar"/>
+                               <include name="regex.jar"/>
+                               <include name="activation.jar"/>
+                               <include name="groovy-all-1.8.2.jar"/>
+                               <include name="miglayout-4.0-swing.jar"/>
+                               <include name="JGoogleAnalytics_0.3.jar"/>
+                               <include name="apache-mime4j-0.6.jar"/>
+                               <include name="commons-logging-1.1.1.jar"/>
+                               <include name="jsoup-1.8.1.jar"/>
+                               <include name="commons-discovery.jar"/>
+                               <include name="Jmol-12.2.4.jar"/>
+                               <include name="axis.jar"/>
+                               <include name="castor-1.1-cycle-xml.jar"/>
+                               <include name="jdas-1.0.4.jar"/>
+                               <include name="spring-web-3.0.5.RELEASE.jar"/>
+                               <include name="httpclient-4.0.3.jar"/>
+                               <include name="slf4j-api-1.7.7.jar"/>
+                               <include name="httpmime-4.0.3.jar"/>
+                               <include name="wsdl4j.jar"/>
+                               <include name="commons-codec-1.3.jar"/>
+                               <include name="xercesImpl.jar"/>
+                               <include name="vamsas-client.jar"/>
+                               <include name="json_simple-1.1.jar"/>
+                               <include name="xml-apis.jar"/>
+                               <include name="jhall.jar"/>
+                               <include name="spring-core-3.0.5.RELEASE.jar"/>
+                               <include name="saaj.jar"/>
+                               <include name="jfreesvg-2.1.jar"/>
+                               <include name="mail.jar"/>
+                               <include name="VARNAv3-91.jar"/>
+                               <include name="httpcore-4.0.1.jar"/>
+                               <include name="log4j-to-slf4j-2.0-rc2.jar"/>
+                               <include name="jalview.jar"/>
+                               <include name="slf4j-log4j12-1.7.7.jar"/>
+                               <include name="min-jabaws-client-2.1.0.jar"/>
+                       </fileset>
+               </copy>
+       
+               <!-- Copy project references -->
+       
+               <!-- Copy project sources itself -->
+               <copy todir="build/src">
+                       <fileset dir="project/src">
+                               <include name="**/*"/>
+                       </fileset>
+               </copy>
+               <copy todir="build/src">
+                       <fileset dir="project/resources">
+                               <include name="**/*"/>
+                       </fileset>
+               </copy>
+       
+               <javac includeantruntime="false" source="1.8" target="1.8" srcdir="build/src" destdir="build/classes" encoding="UTF-8">
+                       <classpath>
+                               <fileset dir="build/libs">
+                                       <include name="*"/>
+                               </fileset>
+                       </classpath>
+               </javac>
+               
+               <!-- Copy over none Java-Files -->
+               <copy todir="build/classes">
+               <fileset dir="project/src">
+                       <exclude name="**/*.java"/>
+               </fileset>
+               <fileset dir="project/resources">
+                       <exclude name="**/*.java"/>
+               </fileset>
+               </copy>
+       
+       
+       </target>
+       <target name="do-deploy" depends="setup-staging-area, do-compile, init-fx-tasks">
+               <delete file="dist"/>
+               <delete file="deploy" />
+               
+               <mkdir dir="dist" />
+               <mkdir dir="dist/libs" />
+               
+               <copy todir="dist/libs">
+                       <fileset dir="externalLibs">
+                               <include name="*" />
+                       </fileset>
+               </copy>
+               
+               
+               <fx:resources id="appRes">
+                       <fx:fileset dir="dist" includes="JalviewFX.jar"/>
+                       <fx:fileset dir="dist" includes="libs/*"/>
+               </fx:resources> 
+               
+               <fx:application id="fxApplication"
+                       name="JalviewFx"
+                       mainClass="application.App"
+               />
+       
+               <mkdir dir="build/classes/META-INF" />
+               
+               
+               
+               <fx:jar destfile="dist/JalviewFX.jar">
+                       <fx:application refid="fxApplication"/>
+                       <fileset dir="build/classes">
+                       </fileset>
+                       <fx:resources refid="appRes"/>
+                       
+                       <manifest>
+                               <attribute name="Implementation-Vendor" value="Charles"/>
+                               <attribute name="Implementation-Title" value="JalviewFx"/>
+                               <attribute name="Implementation-Version" value="1.0"/>
+                               <attribute name="JavaFX-Feature-Proxy" value="None"/>
+                       </manifest>
+               </fx:jar>
+               
+       
+               <mkdir dir="deploy" />
+               <!-- Need to use ${basedir} because somehow the ant task is calculating the directory differently -->
+               <fx:deploy
+                       embedJNLP="true"
+                       extension="false"
+                       width="500" height="500" 
+                       includeDT="true"
+                       offlineAllowed="true"
+                       outdir="${basedir}/deploy"
+                       outfile="JalviewFX" nativeBundles="all"
+                       updatemode="background" >
+       
+                       <fx:info title="JalviewFX" vendor="Charles"/>
+                       <fx:application refId="fxApplication"/>
+                       <fx:resources refid="appRes"/>
+               </fx:deploy>
+               
+               
+       </target>
+</project>