Настройте ANT для запуска Lint4J
У меня есть репозиторий github, работающий на Java и JUnit, и я также хочу запустить lint4j. Мой проект построен на travis-ci .
Но ворс не работает:
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.
Что не так с моим сценарием ANT?
<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>
1 ответ
Решение
lint4j
Задача должна быть определена.
<taskdef name="lint4j" classname="com.jutils.lint4j.ant.Lint4jAntTask">
<classpath><pathelement location="lib/lint4j.jar"/></classpath>
</taskdef>
и lint4j.jar
должен быть доступен.