Ignore:
Timestamp:
May 29, 2009, 8:45:00 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #223: Add target in build.xml for downloading required GenePattern? jar files

Downloads some of required JAR files. There are probably some more, but which ones we need depends on the code we are writing.

Location:
extensions/net.sf.basedb.genepattern/trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.genepattern/trunk/build.xml

    r1091 r1103  
    2424  <property name="javac.encoding" value="UTF-8" />
    2525  <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.12.0" />
     26  <property name="genepattern.jars" value="http://genepattern.broad.mit.edu/gp/downloads" />
    2627
    2728  <!-- set up classpath for compiling -->
     
    112113    <available classname="net.sf.basedb.info.BioAssaySetInfo"
    113114      classpathref="classpath" property="base2webservice" />
     115    <available classname="org.genepattern.client.GPClient"
     116      classpathref="classpath" property="genepattern.lib" />
    114117    <fail unless="base2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    115118    <fail unless="base2plugins" message="Can't find BASE2CorePlugins.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    116119    <fail unless="base2web" message="Can't find BASE2Webclient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    117120    <fail unless="base2webservice" message="Can't find BASE2WSClient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
    118     <echo>Found BASE2Core.jar, BASE2CorePlugins.jar, BASE2Webclient.jar and BASE2WSClient.jar.</echo>
     121    <fail unless="genepattern.lib" message="Can't find GenePattern.jar in ./lib/genepattern. Try 'ant download-lib' to download the missing file." />
     122    <echo>Found all required BASE and GenePattern JAR files.</echo>
    119123  </target>
    120124 
    121125  <target
    122126    name="download-lib"
    123     description="Download BASE2Core.jar, BASE2Webclient.jar, BASE2CorePlugins.jar and BASE2WSClient.jar"
     127    description="Download BASE and GenePattern JAR files"
    124128    >
    125129    <echo>
    126130-------------------------------------------------------   
    127131NOTE! You may specifiy a different download location by
    128 creating the file './build.properties' and
    129 setting 'depend.jars' to the URL to download from.
     132creating the file './build.properties' and setting
     133'depend.jars' and 'genepattern.jars' to the URLs to
     134download from.
    130135-------------------------------------------------------
    131136    </echo>
     
    134139    <download-lib file="BASE2Webclient.jar" />
    135140    <download-lib file="BASE2WSClient.jar" />
     141    <!-- We only need some files from the GenePattern.zip file -->
     142    <download-lib file="GenePattern.zip" todir="${build}" from="${genepattern.jars}" />
     143    <unzip dest="lib/genepattern" src="${build}/GenePattern.zip">
     144      <patternset>
     145        <include name="GenePattern.jar" />
     146        <include name="lib/gp-modules.jar" />
     147      </patternset>
     148      <mapper type="flatten"/>
     149    </unzip>
    136150  </target>
    137151 
    138152  <macrodef name="download-lib" description="Download BASE core JAR files">
    139153    <attribute name="file" />
     154    <attribute name="todir" default="lib/compile"/>
     155    <attribute name="from" default="${depend.jars}" />
    140156    <sequential>
    141157      <get
    142         dest="lib/compile/@{file}"
    143         src="${depend.jars}/@{file}"
     158        dest="@{todir}/@{file}"
     159        src="@{from}/@{file}"
    144160        usetimestamp="true"
    145161        verbose="true"
Note: See TracChangeset for help on using the changeset viewer.