Changeset 1619 for trunk/build.xml


Ignore:
Timestamp:
10/12/06 12:51:53 (14 years ago)
Author:
curtis
Message:

Add package for LOCI custom Checkstyle checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r1602 r1619  
    117117    License:       Public domain 
    118118 
     119LOCI Checkstyle checks 
     120    JAR file:      loci-checks.jar 
     121    Folders:       loci/checks 
     122    Main class:    loci.checks.About 
     123    Dependencies:  checkstyle-all-4.2.jar 
     124    Targets:       style-checks 
     125                   compile-checks 
     126                   jar-checks 
     127    License:       Public domain 
     128 
    119129=============================================================================== 
    120130The following external dependencies (in the jar folder) may be required: 
     
    212222 
    213223  <taskdef resource="checkstyletask.properties" 
    214     classpath="jar/checkstyle-all-4.2.jar"/> 
     224    classpath="jar/checkstyle-all-4.2.jar:build/jar/loci-checks.jar"/> 
    215225 
    216226  <!-- Global build targets --> 
     
    224234 
    225235  <target name="style" 
    226     depends="style-formats, style-visbio, style-plugins, style-notebook, style-leica, style-stitcher, style-slim" 
     236    depends="style-formats, style-visbio, style-plugins, style-notebook, style-leica, style-stitcher, style-slim, style-checks" 
    227237    description="check source code style for LOCI software packages"/> 
    228238 
     
    283293  <!-- Bio-Formats --> 
    284294 
    285   <target name="style-formats" depends="copy-source" 
     295  <target name="style-formats" depends="copy-source, jar-checks" 
    286296    description="check source code style for Bio-Formats"> 
    287     <checkstyle config="checkstyle.xml"> 
     297    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    288298      <fileset dir="${dest.dir}" includes="${formats.source}"/> 
    289299    </checkstyle> 
     
    315325  <!-- VisBio --> 
    316326 
    317   <target name="style-visbio" depends="copy-source" 
     327  <target name="style-visbio" depends="copy-source, jar-checks" 
    318328    description="check source code style for VisBio"> 
    319     <checkstyle config="checkstyle.xml"> 
     329    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    320330      <fileset dir="${dest.dir}" includes="${visbio.source}"/> 
    321331    </checkstyle> 
     
    497507  <!-- LOCI Plugins for ImageJ --> 
    498508 
    499   <target name="style-plugins" depends="copy-source" 
     509  <target name="style-plugins" depends="copy-source, jar-checks" 
    500510    description="check source code style for LOCI Plugins for ImageJ"> 
    501     <checkstyle config="checkstyle.xml"> 
     511    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    502512      <fileset dir="${dest.dir}" includes="${plugins.source}"/> 
    503513    </checkstyle> 
     
    528538  <!-- OME Metadata Notebook --> 
    529539 
    530   <target name="style-notebook" depends="copy-source" 
     540  <target name="style-notebook" depends="copy-source, jar-checks" 
    531541    description="check source code style for OME Metadata Notebook"> 
    532     <checkstyle config="checkstyle.xml"> 
     542    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    533543      <fileset dir="${dest.dir}" includes="${notebook.source}"/> 
    534544    </checkstyle> 
     
    560570  <!-- Leica Converter --> 
    561571 
    562   <target name="style-leica" depends="copy-source" 
     572  <target name="style-leica" depends="copy-source, jar-checks" 
    563573    description="check source code style for Leica Converter"> 
    564     <checkstyle config="checkstyle.xml"> 
     574    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    565575      <fileset dir="${dest.dir}" includes="${leica.source}"/> 
    566576    </checkstyle> 
     
    588598  <!-- Movie Stitcher --> 
    589599 
    590   <target name="style-stitcher" depends="copy-source" 
     600  <target name="style-stitcher" depends="copy-source, jar-checks" 
    591601    description="check source code style for Movie Stitcher"> 
    592     <checkstyle config="checkstyle.xml"> 
     602    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    593603      <fileset dir="${dest.dir}" includes="${stitcher.source}"/> 
    594604    </checkstyle> 
     
    617627  <!-- Slim Plotter --> 
    618628 
    619   <target name="style-slim" depends="copy-source" 
     629  <target name="style-slim" depends="copy-source, jar-checks" 
    620630    description="check source code style for Slim Plotter"> 
    621     <checkstyle config="checkstyle.xml"> 
     631    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
    622632      <fileset dir="${dest.dir}" includes="${slim.source}"/> 
    623633    </checkstyle> 
     
    664674  </target> 
    665675 
     676  <!-- LOCI Checkstyle checks --> 
     677 
     678  <target name="style-checks" depends="copy-source, jar-checks" 
     679    description="check source code style for Slim Plotter"> 
     680    <checkstyle config="checkstyle.xml" failOnViolation="false"> 
     681      <fileset dir="${dest.dir}" includes="${checks.source}"/> 
     682    </checkstyle> 
     683  </target> 
     684 
     685  <target name="compile-checks" depends="copy-source" 
     686    description="compile classes for Slim Plotter"> 
     687    <mkdir dir="${classes.dir}"/> 
     688    <javac srcdir="${dest.dir}" destdir="${classes.dir}" 
     689      includes="${checks.source}" classpath="${ext.jars}" 
     690      debug="true" deprecation="true" source="1.4" target="1.4"/> 
     691  </target> 
     692 
     693  <target name="jar-checks" depends="compile-checks, copy-jars" 
     694    description="generate JAR file for Slim Plotter"> 
     695    <copy todir="${classes.dir}" preservelastmodified="true"> 
     696      <fileset dir="${src.dir}" includes="${checks.resources}"/> 
     697    </copy> 
     698    <jar jarfile="${jar.dir}/${checks.jar}" basedir="${classes.dir}" 
     699      includes="${checks.files}"> 
     700      <manifest> 
     701        <attribute name="Main-Class" value="${checks.main}"/> 
     702        <attribute name="Class-Path" value="${checks.classpath}"/> 
     703      </manifest> 
     704    </jar> 
     705  </target> 
     706 
    666707</project> 
Note: See TracChangeset for help on using the changeset viewer.