ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: JavaCC task on Ant 1.6beta2 within IntelliJ not working
Date Tue, 11 Nov 2003 19:39:01 GMT
If that's really so, then maybe the <javacc> task should be changed to not
rely at compile/runtime to depend on JavaCC...

I used a similar approach with my <jaxb> task, where all the info is
gathered, and then used to invoke using an internal <java>. If that's what
you have to hack anyway, it's a strong smell for this pattern. That's way
you can control the classpath directly from the <javac> 'pure-Task' side of
things, by allowing to specify a JavaCC jar for example.

You can still had some smarts on the side of the task, before forwarding the
actual work to a proxy or the JavaCC compiler itself.

--DD

> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Tuesday, November 11, 2003 1:15 PM
> To: Ant Users List
> Subject: Re: JavaCC task on Ant 1.6beta2 within IntelliJ not working
> 
> Or you could cheat like I did with the Lucene build and use <java> to
> invoke it :))
> 
> There were too many headaches with trying to use <javacc> and dealing
> with all the variables involved in making it work on different versions
> of Ant and different versions of JavaCC.  Have a look at the
> jakarta-lucene/build.xml file and see how I did it.
> 
> 	Erik
> 
> 
> On Tuesday, November 11, 2003, at 10:36  AM, Stefan Bodewig wrote:
> 
> > On Tue, 11 Nov 2003, Fabian Gonzalez <fabgo@yahoo.com> wrote:
> >
> >> Could not find a path to JavaCC.zip from
> >> 'd:\java\javacc3-2'.
> >
> > Not the nicest of error messages - but then again that's not what
> > 1.6beta2 is supposed to say.  I'd bet you are not using the version of
> > Ant you think you do within IDEA.
> >
> > 1.6beta2 would say
> >
> > "Could not find a path to JavaCC.zip or javacc.jar from '" + home +
> > "'."
> >
> >> If I put the JavaCC.zip distribution there,
> >
> > No, unpack your distribution there (and make sure you really use
> > 1.6beta as 1.5.x won't know about JavaCC 3.2).
> >
> >> the following error message appears:
> >>
> >> java.lang.NoClassDefFoundError:
> >> COM/sun/labs/javacc/Main
> >>
> >> Which leads me to believe that Ant somehow doesn't
> >> detect that the JavaCC version I have installed is the
> >> most recent version.
> >
> > 1.6beta uses the (clumsy) algoritm:
> >
> > if javcchome/JavaCC.zip exists then
> >   this is JavaCC 1.x, use COM.sun.labs.javacc.Main
> > else if javcchome/bin/lib/JavaCC.zip exists then
> >   this is JavaCC 2.x, use COM.sun.labs.javacc.Main
> > else if javcchome/bin/lib/javacc.jar [*] exists then
> >   read archive
> >   if it contains org.netbeans.javacc package then
> >     this is JavaCC 3.0, use org.netbeans.javacc.parser.Main
> >   else
> >     this is JavaCC 3.x with x > 0, use org.javacc.parser.Main
> >   endif
> > else
> >   throw exception
> > endif
> >
> > Stefan
> >
> > [*] Actually I've cheated, it will also accept javacchome/javacc.jar.
> >
> > ---------------------------------------------------------------------
> > 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

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


Mime
View raw message