ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernst Reissner <rei3...@arcor.de>
Subject Re: AW: Problems with ANTLR
Date Sun, 18 Aug 2013 22:44:11 GMT
Hmmmm,
what I read is
http://www.antlr.org/wiki/display/ANTLR3/How+to+use+ant+with+ANTLR3

They suggest a test
|$ ant -diagnostics

which should show

|
|\------------------------------------------\-|
|ANT_HOME/lib jar listing|
|\------------------------------------------\-|
|ant.home: /usr/share/ant|
|ant-antlr.jar (||5758| |bytes)|
|ant-antlr3.jar (||20.889| |bytes) <--------\-

I must admit, the number of bytes ant shows is not as given
but essentially, the answer is as expected:


-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/share/ant
ant-jmf.jar (6709 bytes)
ant-bootstrap.jar (19876 bytes)
ant-junit.jar (102344 bytes)
ant.jar (1963225 bytes)
ant-jsch.jar (40235 bytes)
ant-launcher.jar (12433 bytes)
ant-javamail.jar (7959 bytes)
ant-testutil.jar (15194 bytes)
ant-antlr3.jar (20889 bytes)
ant-jdepend.jar (8221 bytes)
ant-antlr.jar (5750 bytes)
ant-swing.jar (7547 bytes)


|
|Does this mean that the setup is ok?

Ernst

|
> That is not the namespace of the ANTLR task; its jar may not even be
> set up
> as an antlib as such. You'll need to consult the documentation for the
> task
> to find out the proper way to set it up.
>
> Matt
> On Aug 18, 2013 10:48 AM, "Ernst Reissner" <[hidden email]
> </user/SendEmail.jtp?type=node&node=5714351&i=0>> wrote:
>
> > Hello Jan,
> > you mean that ant-antlr3.jar is not in place?
> > I have it in /usr/share/ant/lib
> > and even if I provide ant -lib /home/ernst/Software/jars, where it
> is as
> > well, it does not work.
> >
> > Ernst
> >
> > > Maybe the antlib is not on the classpath?
> > > For loading antlibs via namespaces from custom classpath see
> > > http://ant.apache.org/manual/Types/antlib.html#loadFromInside
> > >
> > > Jan
> > >
> > > > -----Urspr√ľngliche Nachricht-----
> > > > Von: Ernst Reissner [mailto:[hidden email]
> > > </user/SendEmail.jtp?type=node&node=5714329&i=0>]
> > > > Gesendet: Mittwoch, 7. August 2013 15:16
> > > > An: [hidden email] </user/SendEmail.jtp?type=node&node=5714329&i=1>
> > > > Betreff: RE: Problems with ANTLR
> > > >
> > > > 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: [hidden email]
> > > </user/SendEmail.jtp?type=node&node=5714329&i=2> For additional
> > > > commands, e-mail: [hidden email]
> > > </user/SendEmail.jtp?type=node&node=5714329&i=3>
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > </user/SendEmail.jtp?type=node&node=5714329&i=4>
> > > For additional commands, e-mail: [hidden email]
> > > </user/SendEmail.jtp?type=node&node=5714329&i=5>
> > >
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > > If you reply to this email, your message will be added to the
> > > discussion below:
> > >
> >
> http://ant.1045680.n5.nabble.com/Problems-with-ANTLR-tp1349074p5714329.html
> > >
> > > To unsubscribe from Problems with ANTLR, click here
> > > <
> > >.
> > > NAML
> > > <
> >
> http://ant.1045680.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > >
> > >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://ant.1045680.n5.nabble.com/Problems-with-ANTLR-tp1349074p5714350.html
> > Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://ant.1045680.n5.nabble.com/Problems-with-ANTLR-tp1349074p5714351.html
>
> To unsubscribe from Problems with ANTLR, click here
> <http://ant.1045680.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1349074&code=cmVpM25lckBhcmNvci5kZXwxMzQ5MDc0fDExODQzMjAw>.
> NAML
> <http://ant.1045680.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>





--
View this message in context: http://ant.1045680.n5.nabble.com/Problems-with-ANTLR-tp1349074p5714353.html
Sent from the Ant - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message