[groovy-user] RE: ant version

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[groovy-user] RE: ant version

miten
Hello,

I am wondering that while using AntBuilder if I can choose what version
of ant to use.  Also while I was looking at AntTest example I saw
fileScanner call on ant builder instance.  I was under impression that
on builder we invoke ant tasks as methods syntax but looking at ant
manual I did not find any task by that name of FileScanner.

Does groovy ship with ant ?

Thanks.

Miten.
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited.
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] RE: ant version

Guillaume Laforge
Administrator
Hello,

We're embedding Ant 1.6.2.
You can find it in GROOVY_HOME/lib, in the form of three jars ant,
ant-junit, and ant-launcher. You might try to upgrade to a newer
version, I think that should work.

The FileScanner is a groovy-specific class I believe:
http://groovy.codehaus.org/apidocs/org/codehaus/groovy/ant/FileScanner.html

But most of the rest is not all is done through introspection of Ant
tasks, by interpreting method calls against those tasks.

I hope that answers your questions?

On 23/11/05, Mehta, Miten (IT) <[hidden email]> wrote:

> Hello,
>
> I am wondering that while using AntBuilder if I can choose what version
> of ant to use.  Also while I was looking at AntTest example I saw
> fileScanner call on ant builder instance.  I was under impression that
> on builder we invoke ant tasks as methods syntax but looking at ant
> manual I did not find any task by that name of FileScanner.
>
> Does groovy ship with ant ?
>
> Thanks.
>
> Miten.

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy
Reply | Threaded
Open this post in threaded view
|

RE: [groovy-user] RE: ant version

miten
In reply to this post by miten
Hello,

I replaced with 1.6.5 (latest) jars but still it complains on using
import call on builder as

MyAntBuild.groovy: 19: unexpected token: import @ line 19, column 10.
         ab.import(file: "${antbuild.location}")
            ^

-----Original Message-----
From: Guillaume Laforge [mailto:[hidden email]]
Sent: Wednesday, November 23, 2005 5:17 PM
To: [hidden email]
Subject: Re: [groovy-user] RE: ant version

Hello,

We're embedding Ant 1.6.2.
You can find it in GROOVY_HOME/lib, in the form of three jars ant,
ant-junit, and ant-launcher. You might try to upgrade to a newer
version, I think that should work.

The FileScanner is a groovy-specific class I believe:
http://groovy.codehaus.org/apidocs/org/codehaus/groovy/ant/FileScanner.h
tml

But most of the rest is not all is done through introspection of Ant
tasks, by interpreting method calls against those tasks.

I hope that answers your questions?

On 23/11/05, Mehta, Miten (IT) <[hidden email]> wrote:

> Hello,
>
> I am wondering that while using AntBuilder if I can choose what
> version of ant to use.  Also while I was looking at AntTest example I
> saw fileScanner call on ant builder instance.  I was under impression
> that on builder we invoke ant tasks as methods syntax but looking at
> ant manual I did not find any task by that name of FileScanner.
>
> Does groovy ship with ant ?
>
> Thanks.
>
> Miten.

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited.
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] RE: ant version

Guillaume Laforge
Administrator
On 23/11/05, Mehta, Miten (IT) <[hidden email]> wrote:
> I replaced with 1.6.5 (latest) jars but still it complains on using
> import call on builder as
>
> MyAntBuild.groovy: 19: unexpected token: import @ line 19, column 10.
>          ab.import(file: "${antbuild.location}")
>             ^

Ah, I see your problem!
It's not related to the version of Ant, but it's related to the fact
you're using a reserved Groovy keyword: import.

There's a workaround: you can use quoted identifiers, so you should be
able to use the following syntax:

    ab."import"(file: "${antbuild.location}")

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy