Changeset 1291


Ignore:
Timestamp:
Feb 24, 2011, 8:43:46 AM (11 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #289: Add 'download-lib' target to ant buildfile and remove checked in BASE jar file

Also added Eclipse settings.

Location:
plugins/base2/net.sf.basedb.examples/trunk
Files:
4 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/base2/net.sf.basedb.examples/trunk/README

    r647 r1291  
    4343Follow these instructions:
    4444
    45  1. Type 'ant' to compile the code and generate the 'example-plugins.jar' file
     45 1. Type 'ant download-lib' to download dependencies that are not included in
     46    the subversion repository.
     47   
     48 2. Type 'ant' to compile the code and generate the 'example-plugins.jar' file
    4649    in the project directory.
    4750
    48  2. Use 'ant package' to create a downloadable tar.gz package in the project
     51 3. Use 'ant package' to create a downloadable tar.gz package in the project
    4952    directory.
    5053
  • plugins/base2/net.sf.basedb.examples/trunk/build.xml

    r1278 r1291  
    44  default="build"
    55  basedir=".">
     6
     7  <!--create this file if you need to override values from properties below -->
     8  <property file="build.properties" />
    69
    710  <!-- variables used -->
     
    1821  <property name="javac.target" value="1.6" />
    1922  <property name="javac.encoding" value="UTF-8" />
     23  <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.6.0" />
    2024
    2125  <!-- set up classpath for compiling -->
     
    108112    </jar>
    109113  </target>
     114 
     115  <target
     116    name="checkjar"
     117    description="Checks that the BASE2Core.jar exists."
     118    >
     119    <available classname="net.sf.basedb.core.plugin.Plugin"
     120      classpathref="classpath" property="base2core" />
     121    <fail unless="base2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
     122    <echo>Found BASE2Core.jar.</echo>
     123  </target>
     124
     125 
     126  <target
     127    name="download-lib"
     128    description="Download BASE2Core.jar"
     129    >
     130    <echo>
     131-------------------------------------------------------   
     132NOTE! You may specifiy a different download location by
     133creating the file './build.properties' and
     134setting 'depend.jars' to the URL to download from.
     135-------------------------------------------------------
     136    </echo>
     137    <download-lib file="BASE2Core.jar" />
     138  </target>
     139 
     140  <macrodef name="download-lib" description="Download BASE core JAR files">
     141    <attribute name="file" />
     142    <sequential>
     143      <get
     144        dest="lib/compile/@{file}"
     145        src="${depend.jars}/@{file}"
     146        usetimestamp="true"
     147        verbose="true"
     148        ignoreerrors="true"
     149      />
     150    </sequential>
     151  </macrodef>
    110152</project>
Note: See TracChangeset for help on using the changeset viewer.