Changeset 521

Show
Ignore:
Timestamp:
06/22/11 13:26:25 (11 months ago)
Author:
martijn
Message:

Use bnd to generate OSGi headers. Merge common build file bits in build-common.xml

Location:
trunk
Files:
9 added
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/org.bridgedb.bio/build.xml

    r514 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb.bio" default="dist" basedir="."> 
     3         
     4        <property name="jar.name" value="../dist/org.bridgedb.bio.jar"/> 
    35 
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    7          
    8   <property name="jar.name" value="../dist/org.bridgedb.bio.jar"/> 
    9    
    10   <target name="prepare"> 
    11         <mkdir dir="build"/> 
    12   </target> 
    13  
    14         <path id="class.path"> 
     6        <!-- absolute deps are used for building, testing and in the manifest classpath --> 
     7        <path id="absolute.deps"> 
    158                <pathelement location="../dist/org.bridgedb.jar"/> 
    169        </path> 
    1710 
    18   <target name="build" depends="prepare"> 
    19         <javac srcdir="src" 
    20                    includes="**" 
    21                    debug="true" 
    22                    destdir="build"> 
    23                    <classpath refid="class.path"/> 
    24         </javac> 
    25     <copy file="resources/org/bridgedb/bio/datasources.txt" 
    26           todir="build/org/bridgedb/bio" /> 
    27     <copy file="resources/org/bridgedb/bio/datasources.xml" 
    28           todir="build/org/bridgedb/bio" /> 
    29     <copy file="resources/org/bridgedb/bio/organisms.txt" 
    30           todir="build/org/bridgedb/bio" /> 
    31   </target> 
    32    
    33   <target name="jar" depends="build"> 
    34         <jar jarfile="${jar.name}"> 
    35           <manifest> 
    36                 <attribute name="Class-Path" value="derby.jar org.bridgedb.jar"/> 
    37           </manifest> 
    38           <fileset dir="build"/> 
    39           <fileset dir="src" includes="**/*.properties"/> 
    40         </jar> 
    41   </target> 
     11        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     12        <path id="transient.deps"> 
     13                <!-- None --> 
     14        </path> 
    4215 
    43   <target name="dist" depends="jar"/> 
     16        <!-- test deps are only used for testing --> 
     17        <path id="test.deps"> 
     18                <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
     19                <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
     20        </path> 
    4421 
    45   <target name="clean"> 
    46         <delete dir="build"/> 
    47   </target> 
    48  
    49   <target name="dist-clean" depends="clean"> 
    50         <delete file="${jar.name}"/> 
    51   </target> 
    52  
    53         <target name="test" depends="build"> 
    54                 <path id="test.classpath"> 
    55                         <path refid="class.path"/> 
    56                         <pathelement location="build"/> 
    57                         <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
    58                         <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
    59                 </path> 
    60                 <javac srcdir="test" debug="true"  
    61                                         includes="**" 
    62                                         destdir="build" 
    63                                         source="1.5"> 
    64                         <classpath refid="test.classpath"/> 
    65                 </javac>                 
    66                 <junit printsummary="on" haltonfailure="true" fork="true"> 
    67                         <formatter type="brief" usefile="false"/> 
    68                         <classpath refid="test.classpath"/> 
    69                         <batchtest> 
    70                                 <fileset dir="test"> 
    71                                         <include name="**/*Test*.java"/> 
    72                                 </fileset> 
    73                         </batchtest> 
    74                 </junit> 
    75         </target> 
     22        <import file="../build-common.xml" /> 
    7623 
    7724</project> 
  • trunk/org.bridgedb.gui/build.xml

    r502 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb.gui" default="dist" basedir="."> 
     3         
     4        <property name="jar.name" value="../dist/org.bridgedb.gui.jar"/> 
    35 
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    7          
    8   <property name="jar.name" value="../dist/org.bridgedb.gui.jar"/> 
    9    
    10   <target name="prepare"> 
    11         <mkdir dir="build"/> 
    12   </target> 
     6        <!-- absolute deps are used for building, testing and in the manifest classpath --> 
     7        <path id="absolute.deps"> 
     8                <fileset dir="../dist"> 
     9                        <include name="org.bridgedb.jar"/> 
     10                        <include name="org.bridgedb.webservice.bridgerest.jar"/> 
     11                        <include name="org.bridgedb.rdb.jar"/> 
     12                </fileset> 
     13        </path> 
    1314 
    14   <path id="class.path"> 
    15     <fileset dir="../dist"> 
    16       <include name="org.bridgedb.jar"/> 
    17       <include name="org.bridgedb.webservice.bridgerest.jar"/> 
    18       <include name="org.bridgedb.rdb.jar"/> 
    19     </fileset> 
    20     <fileset dir="lib"> 
    21       <include name="*.jar"/> 
    22     </fileset> 
    23   </path> 
     15        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     16        <path id="transient.deps"> 
     17                <!-- nothing --> 
     18        </path> 
    2419 
    25   <target name="build" depends="prepare"> 
    26         <javac srcdir="src" 
    27                    includes="**" 
    28                    debug="true" 
    29                    destdir="build"> 
    30                 <classpath refid="class.path"/> 
    31         </javac> 
    32   </target> 
    33    
    34   <target name="jar" depends="build"> 
    35         <jar jarfile="${jar.name}"> 
    36           <manifest> 
    37                 <attribute name="Class-Path" value="derby.jar"/> 
    38           </manifest> 
    39           <fileset dir="build" includes="**/*.class"/> 
    40           <fileset dir="src" includes="**/*.properties"/> 
    41         </jar> 
    42     <copy file="lib/forms-1.2.0.jar" 
    43           todir="../dist" /> 
    44   </target> 
     20        <!-- test deps are only used for testing --> 
     21        <path id="test.deps"> 
     22                <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
     23                <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
     24        </path> 
    4525 
    46   <target name="clean"> 
    47         <delete dir="build"/> 
    48         <delete dir="doc"/> 
    49   </target> 
    50  
    51   <target name="dist-clean" depends="clean"> 
    52         <delete file="${jar.name}"/> 
    53   </target> 
    54  
    55   <target name="dist" depends="jar"/> 
     26        <import file="../build-common.xml" /> 
    5627 
    5728</project> 
  • trunk/org.bridgedb.rdb.construct/build.xml

    r319 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb.rdb.construct" default="dist" basedir="."> 
     3         
     4        <property name="jar.name" value="../dist/org.bridgedb.rdb.construct.jar"/> 
    35 
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    7          
    8   <property name="jar.name" value="../dist/org.bridgedb.rdb.construct.jar"/> 
    9    
    10   <target name="prepare"> 
    11         <mkdir dir="build"/> 
    12   </target> 
     6        <!-- absolute deps are used for building, testing and in the manifest classpath --> 
     7        <path id="absolute.deps"> 
     8                <fileset dir="../dist"> 
     9                        <include name="org.bridgedb.jar"/> 
     10                        <include name="org.bridgedb.bio.jar"/> 
     11                        <include name="org.bridgedb.rdb.jar"/> 
     12                </fileset> 
     13        </path> 
    1314 
    14   <path id="class.path"> 
    15     <fileset dir="../dist"> 
    16       <include name="org.bridgedb.jar"/> 
    17       <include name="org.bridgedb.bio.jar"/> 
    18       <include name="org.bridgedb.rdb.jar"/> 
    19     </fileset> 
    20   </path> 
     15        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     16        <path id="transient.deps"> 
     17                <pathelement location="lib/derby.jar"/> 
     18        </path> 
    2119 
    22   <target name="build" depends="prepare"> 
    23         <javac srcdir="src" 
    24                    includes="**" 
    25                    debug="true" 
    26                    destdir="build"> 
    27                 <classpath refid="class.path"/> 
    28         </javac> 
    29   </target> 
    30    
    31   <target name="jar" depends="build"> 
    32         <jar jarfile="${jar.name}"> 
    33           <manifest> 
    34                 <attribute name="Class-Path" value="derby.jar"/> 
    35           </manifest> 
    36           <fileset dir="build" includes="**/*.class"/> 
    37           <fileset dir="src" includes="**/*.properties"/> 
    38         </jar> 
    39   </target> 
     20        <!-- test deps are only used for testing --> 
     21        <path id="test.deps"> 
     22                <!-- nothing yet... --> 
     23        </path> 
    4024 
    41   <target name="clean"> 
    42         <delete dir="build"/> 
    43         <delete dir="doc"/> 
    44   </target> 
    45  
    46   <target name="dist-clean" depends="clean"> 
    47         <delete file="${jar.name}"/> 
    48   </target> 
    49  
    50   <target name="dist" depends="jar"/> 
    51  
    52         <target name="test" depends="build"> 
    53                 <!-- no tests... yet.... --> 
    54         </target> 
     25        <import file="../build-common.xml" /> 
    5526 
    5627</project> 
  • trunk/org.bridgedb.rdb/build.xml

    r447 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb.rdb" default="dist" basedir="."> 
     3         
     4        <property name="jar.name" value="../dist/org.bridgedb.rdb.jar"/> 
     5   
     6        <!-- absolute deps are used for building, testing and in the manifest classpath --> 
     7        <path id="absolute.deps"> 
     8                <fileset dir="../dist"> 
     9                        <include name="org.bridgedb.jar"/> 
     10                        <include name="org.bridgedb.bio.jar"/> 
     11                </fileset> 
     12        </path> 
    313 
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    7          
    8   <property name="jar.name" value="../dist/org.bridgedb.rdb.jar"/> 
    9    
    10   <target name="prepare"> 
    11         <mkdir dir="build"/> 
    12   </target> 
     14        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     15        <path id="transient.deps"> 
     16                <pathelement location="lib/derby.jar"/> 
     17        </path> 
    1318 
    14   <path id="class.path"> 
    15     <fileset dir="../dist"> 
    16       <include name="org.bridgedb.jar"/> 
    17       <include name="org.bridgedb.bio.jar"/> 
    18     </fileset> 
    19   </path> 
     19        <!-- test deps are only used for testing --> 
     20        <path id="test.deps"> 
     21                <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
     22                <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
     23                <pathelement location="../org.bridgedb/build-lib/measure.jar"/> 
     24                <pathelement location="build-lib/derbyclient.jar"/> 
     25        </path> 
    2026 
    21   <target name="build" depends="prepare"> 
    22         <javac srcdir="src" 
    23                    includes="**" 
    24                    debug="true" 
    25                    destdir="build"> 
    26                 <classpath refid="class.path"/> 
    27         </javac> 
    28   </target> 
    29    
    30   <target name="jar" depends="build"> 
    31         <jar jarfile="${jar.name}"> 
    32           <manifest> 
    33                 <attribute name="Class-Path" value="derby.jar"/> 
    34           </manifest> 
    35           <fileset dir="build" includes="**/*.class"/> 
    36           <fileset dir="src" includes="**/*.properties"/> 
    37         </jar> 
    38     <copy file="lib/derby.jar" 
    39           todir="../dist" /> 
    40   </target> 
    41  
    42   <target name="clean"> 
    43         <delete dir="build"/> 
    44         <delete dir="doc"/> 
    45   </target> 
    46  
    47   <target name="dist-clean" depends="clean"> 
    48         <delete file="${jar.name}"/> 
    49   </target> 
    50  
    51   <target name="dist" depends="jar"/> 
    52  
    53         <taskdef resource="checkstyletask.properties" 
    54                          classpath="build-lib/checkstyle-all-5.0-beta01.jar"/> 
    55                           
    56         <target name="test" depends="build"> 
    57                 <path id="test.classpath"> 
    58                         <path refid="class.path"/> 
    59                         <pathelement location="build"/> 
    60                         <pathelement location="lib/derby.jar"/> 
    61                         <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
    62                         <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
    63                         <pathelement location="../org.bridgedb/build-lib/measure.jar"/> 
    64                         <pathelement location="build-lib/derbyclient.jar"/> 
    65                 </path> 
    66                 <javac srcdir="test" debug="true"  
    67                                         includes="**" 
    68                                         destdir="build" 
    69                                         source="1.5"> 
    70                         <classpath refid="test.classpath"/> 
    71                 </javac>                 
    72                 <junit printsummary="on" haltonfailure="true" fork="true"> 
    73                         <formatter type="brief" usefile="false"/> 
    74                         <classpath refid="test.classpath"/> 
    75                         <batchtest> 
    76                                 <fileset dir="test"> 
    77                                         <include name="**/*Test*.java"/> 
    78                                 </fileset> 
    79                         </batchtest> 
    80                 </junit> 
    81         </target> 
     27        <import file="../build-common.xml" /> 
    8228 
    8329</project> 
  • trunk/org.bridgedb.server/build.xml

    r507 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb.server" default="dist" basedir="."> 
    3   
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    7          
    8   <property name="dist.dir" value="../dist"/> 
    9   <property name="jar.name" value="${dist.dir}/org.bridgedb.server.jar"/> 
    10    
    11   <target name="prepare"> 
    12         <mkdir dir="build"/> 
    13   </target> 
     3         
     4        <property name="dist.dir" value="../dist"/> 
     5        <property name="jar.name" value="${dist.dir}/org.bridgedb.server.jar"/> 
    146 
    15         <path id="class.path"> 
     7        <!-- absolute deps are used for building, testing and in the manifest classpath --> 
     8        <path id="absolute.deps"> 
    169                <pathelement location="../dist/org.bridgedb.jar"/> 
    1710                <pathelement location="../dist/org.bridgedb.bio.jar"/> 
    1811                <pathelement location="../dist/org.bridgedb.rdb.jar"/> 
    19                 <pathelement location="lib/restlet-2.0m6/org.restlet.jar"/> 
    20                 <pathelement location="lib/commons-cli-1.2.jar"/> 
    2112        </path> 
    22          
    23   <target name="build" depends="prepare"> 
    24         <javac srcdir="src" 
    25                    includes="**" 
    26                    debug="true" 
    27                    destdir="build"> 
    28                 <classpath refid="class.path"/> 
    29         </javac> 
    30   </target> 
     13 
     14        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     15        <path id="transient.deps"> 
     16                <!-- None --> 
     17        </path> 
     18 
     19        <!-- test deps are only used for testing --> 
     20        <path id="test.deps"> 
     21                <pathelement location="../org.bridgedb.rdb/lib/derby.jar"/> 
     22                <pathelement location="../org.bridgedb/build-lib/junit.jar"/> 
     23        </path> 
     24 
    3125   
    32   <target name="jar" depends="build"> 
    33         <mkdir dir="${dist.dir}"/> 
    34         <jar jarfile="${jar.name}"> 
    35           <manifest> 
    36                 <attribute name="Main-Class" value="org.bridgedb.server.Server"/> 
    37                 <attribute name="Class-Path" value="derby.jar org.bridgedb.jar org.bridgedb.bio.jar org.bridgedb.rdb.jar org.restlet.jar commons-cli-1.2.jar"/> 
    38           </manifest> 
    39           <fileset dir="build"/> 
    40         </jar> 
    41   </target> 
    42  
    43   <target name="dist" depends="jar"> 
    44         <copy toDir="${dist.dir}" file="lib/restlet-2.0m6/org.restlet.jar"/> 
    45         <copy toDir="${dist.dir}" file="lib/commons-cli-1.2.jar"/> 
    46   </target> 
    47  
    48   <target name="clean"> 
    49         <delete dir="build"/> 
    50   </target> 
    51  
    52   <target name="dist-clean" depends="clean"> 
    53         <delete file="${jar.name}"/> 
    54         <delete dir="${dist.dir}/org.restlet.jar"/> 
    55         <delete file="${dist.dir}/bridgedb-webservice.war"/> 
    56   </target> 
     26        <target name="jar" depends="build"> 
     27                <mkdir dir="${dist.dir}"/> 
     28                <jar jarfile="${jar.name}"> 
     29                  <manifest> 
     30                        <attribute name="Main-Class" value="org.bridgedb.server.Server"/> 
     31                        <attribute name="Class-Path" value="derby.jar org.bridgedb.jar org.bridgedb.bio.jar org.bridgedb.rdb.jar org.restlet.jar commons-cli-1.2.jar"/> 
     32                  </manifest> 
     33                  <fileset dir="build"/> 
     34                </jar> 
     35        </target> 
    5736 
    5837        <target name="war" depends="jar"> 
     
    8059         
    8160        <target name="test" depends="build"> 
    82                 <path id="test.classpath"> 
    83                         <path refid="class.path"/> 
    84                         <pathelement location="build"/> 
    85                         <pathelement location="../org.bridgedb.rdb/lib/derby.jar"/> 
    86                         <pathelement location="../org.bridgedb/build-lib/junit.jar"/> 
    87                 </path> 
    88                 <javac srcdir="test" debug="true"  
    89                                         includes="**" 
    90                                         destdir="build" 
    91                                         source="1.5"> 
    92                         <classpath refid="test.classpath"/> 
    93                 </javac> 
    94 <!-- Disabled for now...                 
    95         <junit printsummary="on" haltonfailure="true" fork="true"> 
    96                         <formatter type="brief" usefile="false"/> 
    97                         <classpath refid="test.classpath"/> 
    98                         <batchtest> 
    99                                 <fileset dir="test"> 
    100                                         <include name="**/*Test*.java"/> 
    101                                 </fileset> 
    102                         </batchtest> 
    103                 </junit> --> 
     61                <!-- Disabled for now... --> 
    10462        </target> 
    105          
     63 
     64        <import file="../build-common.xml" /> 
     65 
    10666</project> 
  • trunk/org.bridgedb.tools.batchmapper/build.xml

    r334 r521  
    44        <property name="jar.file" value="../dist/org.bridgedb.tools.batchmapper.jar"/> 
    55         
    6         <path id="project.class.path"> 
    7                 <pathelement location="build"/> 
    8                 <pathelement location="../dist/org.bridgedb.jar"/> 
    9                 <pathelement location="../dist/org.bridgedb.bio.jar"/> 
    10                 <!--TODO make sure corelib build is called first --> 
     6        <!-- absolute deps are used for building, testing and in the manifest classpath --> 
     7        <path id="absolute.deps"> 
     8                <fileset dir="../dist"> 
     9                        <include name="org.bridgedb.jar"/> 
     10                        <include name="org.bridgedb.bio.jar"/> 
     11                </fileset> 
    1112        </path> 
    1213 
    13         <target name="prepare"> 
    14                 <mkdir dir="../dist"/> 
    15                 <mkdir dir="build"/> 
    16         </target> 
    17          
    18         <target name="clean" description="Remove all generated files."> 
    19                 <delete dir="build"/> 
    20         </target> 
    21          
    22         <target name="compile" depends="prepare" description="Compile all sources"> 
    23                 <javac srcdir="src"  
    24                             debug="true"         
    25                             destdir="build"> 
    26                         <classpath refid="project.class.path"/> 
    27                 </javac> 
    28         </target> 
     14        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     15        <path id="transient.deps"> 
     16        </path> 
    2917 
    30         <target name="test" depends="compile" description="Test batchmapper"> 
    31                 <!-- TODO --> 
    32         </target> 
     18        <!-- test deps are only used for testing --> 
     19        <path id="test.deps"> 
     20                <!-- nothing yet... --> 
     21        </path>  
    3322 
    34         <target name="jar" depends="compile"> 
     23        <target name="jar" depends="build"> 
    3524                <jar jarfile="${jar.file}"> 
    3625                        <manifest> 
     
    4130                </jar> 
    4231        </target> 
    43          
    44         <target name="dist-clean" depends="clean" description="Remove all generated files."> 
    45                 <delete file="${jar.file}"/> 
    46         </target> 
    47          
    48         <target name="dist" depends="jar"/> 
     32 
     33        <import file="../build-common.xml" /> 
     34 
    4935</project> 
  • trunk/org.bridgedb.webservice.biomart/build.xml

    r447 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb.webservice.biomart" default="dist" basedir="."> 
     3         
     4        <property name="jar.name" value="../dist/org.bridgedb.webservice.biomart.jar"/> 
    35 
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    7          
    8   <property name="jar.name" value="../dist/org.bridgedb.webservice.biomart.jar"/> 
    9   <property name="svn.exec.svnversion" value="svnversion"/> 
    10   <property name="checkstyle.output.file" value="warnings.txt"/> 
    11   <property file="version.props"/> 
    12    
    13   <target name="prepare"> 
    14         <mkdir dir="build"/> 
    15         <mkdir dir="../dist"/> 
    16   </target> 
    17  
    18         <path id="project.class.path"> 
    19                 <pathelement location="build"/> 
     6        <path id="absolute.deps"> 
    207                <pathelement location="../dist/org.bridgedb.jar"/> 
    218                <pathelement location="../dist/org.bridgedb.bio.jar"/> 
     
    2310        </path> 
    2411 
    25   <target name="build" depends="prepare"> 
    26                 <javac srcdir="src"  
    27                             debug="true"         
    28                             destdir="build"> 
    29                         <classpath refid="project.class.path"/> 
    30                 </javac> 
    31     <copy file="src/org/bridgedb/webservice/biomart/util/filterconversion.txt" 
    32           todir="build/org/bridgedb/webservice/biomart/util" /> 
    33   </target> 
    34    
    35   <target name="jar" depends="build"> 
    36         <jar jarfile="${jar.name}"> 
    37           <manifest> 
    38                 <attribute name="Class-Path" value="derby.jar"/> 
    39           </manifest> 
    40           <fileset dir="build" includes="**/*.class"/> 
    41       <fileset dir="build" includes="**/*.txt"/> 
    42           <fileset dir="src" includes="**/*.properties"/> 
    43         </jar> 
    44   </target> 
     12        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     13        <path id="transient.deps"> 
     14        </path> 
    4515 
    46   <target name="clean"> 
    47         <delete dir="build"/> 
    48         <delete dir="doc"/> 
    49   </target> 
     16        <!-- test deps are only used for testing --> 
     17        <path id="test.deps"> 
     18                <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
     19                <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
     20        </path> 
    5021 
    51   <target name="dist-clean" depends="clean"> 
    52         <delete file="${jar.name}"/> 
    53   </target> 
    54  
    55   <target name="dist" depends="jar"/> 
    56  
    57         <taskdef resource="checkstyletask.properties" 
    58                          classpath="../org.bridgedb/build-lib/checkstyle-all-5.0.jar"/> 
    59                           
    60         <target name="test" depends="build"> 
    61                 <path id="test.classpath"> 
    62                         <path refid="project.class.path"/> 
    63                         <pathelement location="build"/> 
    64                         <pathelement location="../org.bridgedb/build-lib/junit4.jar"/> 
    65                         <pathelement location="../org.bridgedb/build-lib/hamcrest-core.jar"/> 
    66                         <pathelement location="../org.bridgedb/build-lib/measure.jar"/> 
    67                 </path> 
    68                 <javac srcdir="test" debug="true"  
    69                                         includes="**" 
    70                                         destdir="build" 
    71                                         source="1.5"> 
    72                         <classpath refid="test.classpath"/> 
    73                 </javac>                 
    74                 <junit printsummary="on" haltonfailure="true" fork="true"> 
    75                         <formatter type="brief" usefile="false"/> 
    76                         <classpath refid="test.classpath"/> 
    77                         <batchtest> 
    78                                 <fileset dir="test"> 
    79                                         <include name="**/*Test*.java"/> 
    80                                 </fileset> 
    81                         </batchtest> 
    82                 </junit> 
     22        <target name="prepare"> 
     23                <mkdir dir="build/org/bridgedb/webservice/biomart/util"/> 
     24                <copy file="src/org/bridgedb/webservice/biomart/util/filterconversion.txt" 
     25                        todir="build/org/bridgedb/webservice/biomart/util" /> 
    8326        </target> 
    8427 
    85         <target name="checkstyle"> 
    86                 <checkstyle config="checks.xml"> 
    87                         <fileset dir="src"> 
    88                                 <include name="**/*.java"/> 
    89                         </fileset> 
    90                         <formatter toFile="${checkstyle.output.file}"/> 
    91                 </checkstyle>    
    92         </target> 
     28        <import file="../build-common.xml" /> 
    9329 
    9430</project> 
  • trunk/org.bridgedb.webservice.bridgerest/build.xml

    r313 r521  
    11<?xml version="1.0"?> 
    2 <project name="BridgeDb" default="dist" basedir="."> 
    3  
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
     2<project name="org.bridgedb.webservice.bridgerest" default="dist" basedir="."> 
    73         
    8   <property name="jar.name" value="../dist/org.bridgedb.webservice.bridgerest.jar"/> 
    9   <property name="svn.exec.svnversion" value="svnversion"/> 
    10   <property name="checkstyle.output.file" value="warnings.txt"/> 
    11   <property file="version.props"/> 
     4        <property name="jar.name" value="../dist/org.bridgedb.webservice.bridgerest.jar"/> 
    125   
    13   <target name="prepare"> 
    14         <mkdir dir="build"/> 
    15         <mkdir dir="../dist"/> 
    16   </target> 
    17  
    18         <path id="project.class.path"> 
    19                 <pathelement location="build"/> 
     6        <path id="absolute.deps"> 
    207                <pathelement location="../dist/org.bridgedb.jar"/> 
    218                <pathelement location="../dist/org.bridgedb.bio.jar"/> 
     
    2310        </path> 
    2411 
     12        <!-- transient deps are optional, they are used only in the manifest classpath --> 
     13        <path id="transient.deps"> 
     14        </path> 
    2515 
    26   <target name="build" depends="prepare"> 
    27                 <javac srcdir="src"  
    28                             debug="true"         
    29                             destdir="build"> 
    30                         <classpath refid="project.class.path"/> 
    31                 </javac> 
    32   </target> 
    33    
    34   <target name="jar" depends="build"> 
    35         <jar jarfile="${jar.name}"> 
    36           <manifest> 
    37                 <attribute name="Class-Path" value="derby.jar"/> 
    38           </manifest> 
    39           <fileset dir="build" includes="**/*.class"/> 
    40       <fileset dir="build" includes="**/*.txt"/> 
    41           <fileset dir="src" includes="**/*.properties"/> 
    42         </jar> 
    43   </target> 
     16        <!-- test deps are only used for testing --> 
     17        <path id="test.deps"> 
     18        </path> 
    4419 
    45   <target name="clean"> 
    46         <delete dir="build"/> 
    47         <delete dir="doc"/> 
    48   </target> 
    49  
    50   <target name="dist-clean" depends="clean"> 
    51         <delete file="${jar.name}"/> 
    52   </target> 
    53  
    54   <target name="dist" depends="jar"/> 
    55  
    56         <taskdef resource="checkstyletask.properties" 
    57                          classpath="../org.bridgedb/build-lib/checkstyle-all-5.0.jar"/> 
    58                           
    59         <target name="test" depends="build"> 
    60                 <!-- no tests yet... --> 
    61         </target> 
    62  
    63         <target name="checkstyle"> 
    64                 <checkstyle config="checks.xml"> 
    65                         <fileset dir="src"> 
    66                                 <include name="**/*.java"/> 
    67                         </fileset> 
    68                         <formatter toFile="${checkstyle.output.file}"/> 
    69                 </checkstyle>    
    70         </target> 
     20        <import file="../build-common.xml" /> 
    7121 
    7222</project> 
  • trunk/org.bridgedb/build.xml

    r308 r521  
    11<?xml version="1.0"?> 
    22<project name="org.bridgedb" default="dist" basedir="."> 
    3  
    4   <!-- always be java 1.5 compatible --> 
    5   <property name="ant.build.javac.target" value="1.5"/> 
    6   <property name="ant.build.javac.source" value="1.5"/> 
    73         
    84  <property name="jar.name" value="../dist/org.bridgedb.jar"/> 
    95  <property name="svn.exec.svnversion" value="svnversion"/> 
    10   <property name="checkstyle.output.file" value="warnings.txt"/> 
     6   
    117  <property file="version.props"/> 
    12    
    13   <target name="prepare"> 
    14         <tstamp /> <!-- set ${TODAY} and ${TSTAMP} --> 
    15         <mkdir dir="build"/> 
    16         <mkdir dir="doc"/> 
    17         <mkdir dir="../dist"/> 
    18         <exec executable="${svn.exec.svnversion}" outputproperty="subversion_revision" failifexecutionfails="false"> 
    19                 <arg line="-n ."/> 
    20         </exec> 
    21         <echo file="src/org/bridgedb/BridgeDb.properties"># Version and compilation information 
     8 
     9        <path id="absolute.deps"> 
     10                <!-- no dependencies --> 
     11        </path> 
     12 
     13        <path id="transient.deps"> 
     14                <!-- no dependencies --> 
     15        </path> 
     16 
     17        <path id="test.deps"> 
     18                <pathelement location="build-lib/junit.jar"/> 
     19                <pathelement location="build-lib/measure.jar"/> 
     20        </path> 
     21 
     22        <target name="prepare"> 
     23                <tstamp /> <!-- set ${TODAY} and ${TSTAMP} --> 
     24                <mkdir dir="../dist"/> 
     25                <exec executable="${svn.exec.svnversion}" outputproperty="subversion_revision" failifexecutionfails="false"> 
     26                        <arg line="-n ."/> 
     27                </exec> 
     28                <mkdir dir="build/org/bridgedb"/> 
     29                <echo file="build/org/bridgedb/BridgeDb.properties"># Version and compilation information 
    2230REVISION=${subversion_revision} 
    2331COMPILE_DATE=${DSTAMP} ${TSTAMP} 
    2432# copied from version.props 
    2533bridgedb.version=${bridgedb.version} 
    26         </echo>   
    27   </target> 
    28  
    29   <target name="build" depends="prepare"> 
    30         <javac srcdir="src" 
    31                    includes="**" 
    32                    debug="true" 
    33                    destdir="build"> 
    34         </javac> 
    35   </target> 
    36    
    37   <target name="jar" depends="build"> 
    38         <jar jarfile="${jar.name}"> 
    39           <fileset dir="build" includes="**/*.class"/> 
    40       <fileset dir="build" includes="**/*.txt"/> 
    41           <fileset dir="src" includes="**/*.properties"/> 
    42         </jar> 
    43   </target> 
    44  
    45   <target name="clean"> 
    46         <delete dir="build"/> 
    47         <delete dir="doc"/> 
    48   </target> 
    49  
    50   <target name="dist-clean" depends="clean"> 
    51         <delete file="${jar.name}"/> 
    52   </target> 
    53  
    54   <target name="dist" depends="jar"/> 
    55  
    56         <taskdef resource="checkstyletask.properties" 
    57                          classpath="build-lib/checkstyle-all-5.0.jar"/> 
    58                           
    59         <target name="test" depends="build"> 
    60                 <path id="test.classpath"> 
    61                         <pathelement location="build"/> 
    62                         <pathelement location="build-lib/junit.jar"/> 
    63                         <pathelement location="build-lib/measure.jar"/> 
    64                 </path> 
    65                 <javac srcdir="test" debug="true"  
    66                                         includes="**" 
    67                                         destdir="build" 
    68                                         source="1.5"> 
    69                         <classpath refid="test.classpath"/> 
    70                 </javac>                 
    71                 <junit printsummary="on" haltonfailure="true" fork="true"> 
    72                         <formatter type="brief" usefile="false"/> 
    73                         <classpath refid="test.classpath"/> 
    74                         <batchtest> 
    75                                 <fileset dir="test"> 
    76                                         <include name="**/*Test*.java"/> 
    77                                 </fileset> 
    78                         </batchtest> 
    79                 </junit> 
     34                </echo>   
    8035        </target> 
    81  
    82         <target name="checkstyle"> 
    83                 <checkstyle config="checks.xml"> 
    84                         <fileset dir="src"> 
    85                                 <include name="**/*.java"/> 
    86                         </fileset> 
    87                         <formatter toFile="${checkstyle.output.file}"/> 
    88                 </checkstyle>    
    89         </target> 
     36                 
     37        <import file="../build-common.xml" /> 
    9038 
    9139</project>