Hi all,
I have a similar problem receiving
/home/ernst/Software/build.xml:352: Problem: failed to create task or type
antlib:org/apache/tools/ant/antlr:ant-antlr3
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.
No types or tasks have been defined in this namespace yet
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-/usr/share/ant/lib
-/home/ernst/.ant/lib
-a directory added on the command line with the -lib argument
I think i did all right:
The relevant snippet of my built file is
<path id="antlr.classpath">
<pathelement location="${antlrJar}"/>
<pathelement location="${ant-antlrJar}"/>
</path>
<target name="genParser" depends="init"
description="Generate parsers. ">
<antlr:ant-antlr3 xmlns:antlr="antlib:org/apache/tools/ant/antlr"
target="${parserDirRelana}/CClass.g"
outputdirectory="${parserTargetDirRelana}">
<classpath refid="antlr.classpath"/>
</antlr:ant-antlr3>
Here,
<property name="antlrJar"
value="${jarDir}/antlr-3.5-complete.jar"/>
<property name="ant-antlrJar" value="${jarDir}/ant-antlr3.jar"/>
point to antlr-3.5-complete.jar and to ant-antlr3.jar which really exist.
I use ant -version
Apache Ant(TM) version 1.8.2 compiled on October 23 2011
The ant-libs look like this:
linux-p4vf:/usr/share/java/ant # ll
total 164
-rw-r--r-- 1 root root 20889 Aug 7 03:15 ant-antlr3.jar
-rw-r--r-- 1 root root 3912 Oct 23 2011 ant-commons-logging.jar
-rw-r--r-- 1 root root 8225 Oct 23 2011 ant-jdepend.jar
-rw-r--r-- 1 root root 102343 Oct 23 2011 ant-junit.jar
-rw-r--r-- 1 root root 7547 Oct 23 2011 ant-swing.jar
-rw-r--r-- 1 root root 15198 Oct 23 2011 ant-testutil.jar
linux-p4vf:/usr/share/ant/lib # ll
total 0
lrwxrwxrwx 1 root root 29 Aug 7 14:49 ant-antlr3.jar ->
../../java/ant/ant-antlr3.jar
lrwxrwxrwx 1 root root 28 Sep 8 2012 ant-bootstrap.jar ->
../../java/ant-bootstrap.jar
lrwxrwxrwx 1 root root 38 Apr 21 02:05 ant-commons-logging.jar ->
../../java/ant/ant-commons-logging.jar
lrwxrwxrwx 1 root root 18 Sep 8 2012 ant.jar -> ../../java/ant.jar
lrwxrwxrwx 1 root root 30 Apr 21 02:05 ant-jdepend.jar ->
../../java/ant/ant-jdepend.jar
lrwxrwxrwx 1 root root 28 Sep 8 2012 ant-junit.jar ->
../../java/ant/ant-junit.jar
lrwxrwxrwx 1 root root 27 Sep 8 2012 ant-launcher.jar ->
../../java/ant-launcher.jar
lrwxrwxrwx 1 root root 28 Apr 21 02:05 ant-swing.jar ->
../../java/ant/ant-swing.jar
lrwxrwxrwx 1 root root 31 Apr 21 02:05 ant-testutil.jar ->
../../java/ant/ant-testutil.jar
I cannot figure out what my problem is.
can you help???
Greetings, Ernst
--
View this message in context:
http://ant.1045680.n5.nabble.com/Problems-with-ANTLR-tp1349074p5714327.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]