Changeset 32310 in osm


Ignore:
Timestamp:
2016-06-18T15:40:14+02:00 (9 years ago)
Author:
donvip
Message:

add checkstyle and findbugs targets for josm plugins

Location:
applications/editors/josm/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CustomizePublicTransportStop/build.xml

    r32306 r32310  
    9696
    9797    <target name="test"/>
     98    <target name="checkstyle"/>
     99    <target name="findbugs"/>
    98100</project>
  • applications/editors/josm/plugins/build-common.xml

    r32306 r32310  
    1616    <property name="josm.test.build.dir"    location="../../core/test/build"/>
    1717    <property name="groovy.jar"             location="../00_core_tools/groovy-all-2.4.6.jar"/>
     18    <property name="checkstyle.jar"         location="../00_core_tools/checkstyle/checkstyle-6.19-all.jar"/>
     19    <property name="findbugs-ant.jar"       location="../00_core_tools/findbugs/findbugs-ant.jar"/>
    1820    <property name="annotations.jar"        location="../00_core_tools/findbugs/annotations.jar"/>
    1921    <property name="plugin.build.dir"       location="build"/>
     
    454456                    <path refid="test.classpath"/>
    455457                </classpath>
    456                 <javac target="1.7" source="1.7" debug="on" encoding="UTF-8">
     458                <javac debug="on" encoding="UTF-8">
    457459                    <compilerarg value="-Xlint:all"/>
    458460                    <compilerarg value="-Xlint:-serial"/>
     
    488490    </target>
    489491
     492    <target name="checkstyle">
     493        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpath="${checkstyle.jar}"/>
     494        <checkstyle config="../00_core_tools/checkstyle/josm_checks.xml">
     495            <fileset dir="${basedir}/src" includes="**/*.java"/>
     496            <fileset dir="${basedir}/test" includes="**/*.java" erroronmissingdir="false"/>
     497            <formatter type="xml" toFile="checkstyle-josm-${ant.project.name}.xml"/>
     498        </checkstyle>
     499    </target>
     500
     501    <target name="findbugs" depends="dist">
     502        <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="${findbugs-ant.jar}"/>
     503        <path id="findbugs-classpath">
     504            <fileset dir="../00_core_tools/findbugs/">
     505                <include name="*.jar"/>
     506            </fileset>
     507        </path>
     508        <property name="findbugs-classpath" refid="findbugs-classpath"/>
     509        <findbugs output="xml"
     510                outputFile="findbugs-josm-${ant.project.name}.xml"
     511                classpath="${findbugs-classpath}"
     512                pluginList=""
     513                excludeFilter="../00_core_tools/findbugs/josm-filter.xml"
     514                effort="default"
     515                reportLevel="low"
     516                >
     517            <sourcePath path="${basedir}/src" />
     518            <class location="${plugin.jar}" />
     519        </findbugs>
     520    </target>
     521
    490522    <target name="runjosm" depends="install">
    491523        <java jar="${josm}" fork="true">
  • applications/editors/josm/plugins/build.xml

    r32306 r32310  
    77        <ant dir="../core" target="test-compile"/>
    88    </target>
    9         <property name="ordered_plugins" value="jna/build.xml
    10                                                                                         jts/build.xml
    11                                                                                         gson/build.xml
    12                                                                                         ejml/build.xml
    13                                                                                         geotools/build.xml
    14                                                                                         utilsplugin2/build.xml
    15                                                                                         log4j/build.xml
    16                                                                                         apache-commons/build.xml
    17                                                                                         apache-http/build.xml"/>
    18         <macrodef name="iterate">
    19                 <attribute name="target"/>
    20                 <sequential>
    21                         <subant target="@{target}">
    22                                 <filelist dir="." files="${ordered_plugins}"/>
    23                                 <fileset  dir="." includes="*/build.xml" excludes="00_*/build.xml ${ordered_plugins}"/>
    24                         </subant>
    25                 </sequential>
    26         </macrodef>
    27         <target name="clean">
    28                 <iterate target="clean"/>
    29         </target>
    30         <target name="dist" depends="compile_josm">
     9    <property name="ordered_plugins" value="jna/build.xml
     10                                            jts/build.xml
     11                                            gson/build.xml
     12                                            ejml/build.xml
     13                                            geotools/build.xml
     14                                            utilsplugin2/build.xml
     15                                            log4j/build.xml
     16                                            apache-commons/build.xml
     17                                            apache-http/build.xml"/>
     18    <macrodef name="iterate">
     19        <attribute name="target"/>
     20        <sequential>
     21            <subant target="@{target}">
     22                <filelist dir="." files="${ordered_plugins}"/>
     23                <fileset  dir="." includes="*/build.xml" excludes="00_*/build.xml ${ordered_plugins}"/>
     24            </subant>
     25        </sequential>
     26    </macrodef>
     27    <target name="clean">
     28        <iterate target="clean"/>
     29    </target>
     30    <target name="dist" depends="compile_josm">
    3131        <mkdir dir="../dist"/>
    32                 <iterate target="dist"/>
    33         </target>
    34         <target name="install" depends="dist">
    35                 <iterate target="install"/>
    36         </target>
    37         <target name="test" depends="compile_josm_test">
    38                 <iterate target="test"/>
    39         </target>
     32        <iterate target="dist"/>
     33    </target>
     34    <target name="install" depends="dist">
     35        <iterate target="install"/>
     36    </target>
     37    <target name="test" depends="compile_josm_test">
     38        <iterate target="test"/>
     39    </target>
     40    <target name="checkstyle">
     41        <iterate target="checkstyle"/>
     42    </target>
     43    <target name="findbugs">
     44        <iterate target="findbugs"/>
     45    </target>
    4046</project>
  • applications/editors/josm/plugins/routes/build.xml

    r32306 r32310  
    4242    </target>
    4343    <target name="test"/>
     44    <target name="checkstyle"/>
     45    <target name="findbugs"/>
    4446    <target name="revision">
    4547        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
Note: See TracChangeset for help on using the changeset viewer.