ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: Please help getting ANT to work with ANTLR 2.7.2
Date Thu, 17 Jul 2003 14:36:19 GMT
Hi Mark,
it is possible that you are using a build of ant where antlr is not
included.
Do
$  jar tvf optional.jar 2>&1 | grep -i antlr
to see if you have the antlr task in your distro
(optional.jar lives in $ANT_HOME/lib )

If you are using a home-built distro of ant, then you might need to rebuild
it.
To build antlr support in ant, you need to build first antlrall.jar (see the
manual/install.html file)
Otherwise, you can use an official distribution of ant.
In this case, you will also need antlrall.jar. (under $ANT_HOME/lib/optional
in ant 1.5.3
or $ANT_HOME/lib in ant 1.6alpha )

Cheers


Antoine

----- Original Message -----
From: "Mark Williams" <mark.williams@techop.co.uk>
To: <user@ant.apache.org>
Sent: Thursday, July 17, 2003 4:26 PM
Subject: Please help getting ANT to work with ANTLR 2.7.2


Hi,

(Ant 1.5.3-1). Windows XP.

I have been tearing my hair out for two days now trying to get ANT
to accept the <antlr> optional task.  I have the following in my
build.xml file:

  <antlr
    target="RoutingRules.g"
    outputdirectory="."
  />

When I try to build with "ant -v" - I get the following error
messages:

--------------------------------------------------------------------------
C:\Program Files\eclipse\workspace\RoutingRuleParser>ant -v -f build.xml

Warning: JAVA_HOME environment variable is not set.
  If build fails because sun.* classes could not be found
  you will need to set the JAVA_HOME environment variable
  to the installation directory of java.

Apache Ant version 1.5.3 compiled on April 16 2003
Buildfile: build.xml
Detected Java version: 1.4 in: c:\j2sdk1.4.2\jre
Detected OS: Windows XP
parsing buildfile build.xml with URI = file:C:/Program
Files/eclipse/workspace/R
outingRuleParser/build.xml
Project base dir set to: C:\Program
Files\eclipse\workspace\RoutingRuleParser

BUILD FAILED
file:C:/Program%20Files/eclipse/workspace/RoutingRuleParser/build.xml:15:
Unexpe
cted element "antlr"
        at
org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl
.java:170)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:117)
        at org.apache.tools.ant.Main.runBuild(Main.java:596)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 0 seconds
--------------------------------------------------------------------------

I have copied the antlr.jar (and antlrall.jar) files to ant's /lib
directory.  I don't know what else to try.  I have tried this both
from within eclipse and straight from the command line.

Mark.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message