Monday, March 19, 2012

Making ant work with antlr3 and cpptasks

When one uses antlr3 or cpptasks with ant, it might happen, that the following error occurs during build:
$ ant jar
...
.../build.xml:89: Problem: failed to create task or type
        antlib:org/apache/tools/ant/antlr:antlr3
.../build.xml:92: Problem: failed to create task or type
        antlib:net.sf.antcontrib.cpptasks:cc
The cure is (and always was) simple on openSUSE. One just needs to define OPT_JAR_LIST environment variable with appropriate jar names of packages where those classes are defined:
OPT_JAR_LIST='ant-antlr3.jar cpptasks.jar' ant jar

No comments: