Changeset 31428 in osm for applications/viewer/jmapviewer


Ignore:
Timestamp:
2015-08-01T20:23:53+02:00 (9 years ago)
Author:
donvip
Message:

[jmapviewer] enable findbugs/checkstyle

Location:
applications/viewer/jmapviewer
Files:
22 added
3 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer

    • Property svn:ignore
      •  

        old new  
        55tiles
        66JMapViewer.zip
         7checkstyle-jmapviewer.xml
         8findbugs-jmapviewer.xml
  • applications/viewer/jmapviewer/.project

    r30881 r31428  
    1111                        </arguments>
    1212                </buildCommand>
     13                <buildCommand>
     14                        <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
     15                        <arguments>
     16                        </arguments>
     17                </buildCommand>
    1318        </buildSpec>
    1419        <natures>
    1520                <nature>org.eclipse.jdt.core.javanature</nature>
     21                <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
    1622        </natures>
    1723</projectDescription>
  • applications/viewer/jmapviewer/build.xml

    r30425 r31428  
    22<project default="all" name="Compile and build java classes plus jar archives">
    33
    4         <target name="all" depends="clean,build,svn_info,pack,create_run_jar,create_release_zip,create_source_release_zip" />
     4        <target name="all" depends="clean,build,svn_info,pack,create_run_jar,create_release_zip,create_source_release_zip,findbugs,checkstyle" />
    55
    66        <target name="clean">
     
    3434    </target>
    3535       
    36         <target name="pack">
     36        <target name="pack" depends="build">
    3737                <!-- Create the JAR file containing the compiled class files -->
    3838                <jar destfile="JMapViewer.jar" filesetmanifest="mergewithoutmain">
     
    7676        </target>
    7777
     78    <target name="checkstyle">
     79        <taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
     80                classpath="tools/checkstyle/checkstyle-6.8.1-all.jar"/>
     81        <checkstyle config="tools/checkstyle/jmapviewer_checks.xml">
     82            <fileset dir="${basedir}/src" includes="**/*.java" />
     83            <formatter type="xml" toFile="checkstyle-jmapviewer.xml"/>
     84        </checkstyle>
     85    </target>
     86
     87    <target name="findbugs" depends="pack">
     88        <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
     89                classpath="tools/findbugs/findbugs-ant.jar"/>
     90        <path id="findbugs-classpath">
     91            <fileset dir="tools/findbugs/">
     92                <include name="*.jar"/>
     93            </fileset>
     94        </path>
     95        <property name="findbugs-classpath" refid="findbugs-classpath"/>
     96        <findbugs output="xml"
     97                outputFile="findbugs-jmapviewer.xml"
     98                classpath="${findbugs-classpath}"
     99                effort="max"
     100                >
     101            <sourcePath path="${basedir}/src" />
     102            <class location="JMapViewer.jar" />
     103        </findbugs>
     104    </target>
     105
    78106</project>
Note: See TracChangeset for help on using the changeset viewer.