0

I have a github repo, running Java and JUnit, and I want to run lint4j as well. My project is built on travis-ci .

But, lint is failing:

BUILD FAILED
/home/travis/build/jvoller/SPDDB/build.xml:39: Problem: failed to create task or type lint4j
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place. 

What is wrong with my ANT script?

  <target name="lint" description="runs lint4j on source files" >
    <mkdir dir = "tmp" />
      <lint4j sourcepath="src"
        classpath="lib/junit-4.11.jar"
        packages="${main.src.dir}.*"
        level="5"
        exact="false" >
      <formatters>
        <formatter type="text" />
        <formatter type="text" toFile="tmp/lint.out"/>
      </formatters> 
    </lint4j>
  </target>
SDK4
  • 59
  • 1
  • 9

1 Answers1

1

The lint4j task must be defined.

<taskdef name="lint4j" classname="com.jutils.lint4j.ant.Lint4jAntTask">
  <classpath><pathelement location="lib/lint4j.jar"/></classpath>
</taskdef>

and the lint4j.jar must be available.

Stefan Birkner
  • 24,059
  • 12
  • 57
  • 72