You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David J Iannucci <dj...@myriad.com> on 2001/03/07 18:02:56 UTC

Can't find task

I'm sorry if this is an RTFM or similar situation, but
I've looked through the source and binary distributions,
and can't find the answer to this problem:

In the HTML documentation on the Ant web site, there is
a doc page for a built-in task called <apply>.  I've
seen this referenced by searching the ML archives as well.
But I can't find it anywhere in the 1.3 distribution!
Am I crazy?  I want to use this task!  Why does it seem
not to exist for me?

Thanks,
Dave

Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by Glenn McAllister <gl...@somanetworks.com>.
Peter Donald wrote:

> The regexp classes in ant rely on external regex libraries (namely Apache
> oro, gnu.regexp and I believe Apache regexp). You need one of these for the
> regexp mappers to work ;)
> Cheers,

What he said. :-)

Glenn

Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by Peter Donald <do...@apache.org>.
At 04:52  7/3/01 -0700, David J Iannucci wrote:
>Thanks for the response, Glenn.  Um, sure... well, what do you
>mean "regexp jars"?  It isn't necessary to have just the regexp
>stuff in *separate* jars, is it?  As I mentioned in my last message,
>I tried putting the regexp classes into my classpath, and also
>tried putting ant.jar, which contains these classes, into my
>classpath, and ant was seemingly unable to find the classes in
>either location.

The regexp classes in ant rely on external regex libraries (namely Apache
oro, gnu.regexp and I believe Apache regexp). You need one of these for the
regexp mappers to work ;) 
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by David J Iannucci <dj...@myriad.com>.
Glenn McAllister wrote:
> 
> David J Iannucci wrote:
> 
>> Look, I've read the docs.  And I realize you all can't
>> see precisely what I'm doing, but I don't think I've
>> missed anything major here.  Why is this not working?
> 
> Well, do you have the regexp jars in your classpath?
> Glenn

Thanks for the response, Glenn.  Um, sure... well, what do you
mean "regexp jars"?  It isn't necessary to have just the regexp
stuff in *separate* jars, is it?  As I mentioned in my last message,
I tried putting the regexp classes into my classpath, and also
tried putting ant.jar, which contains these classes, into my
classpath, and ant was seemingly unable to find the classes in
either location.

So again, the question remains: what's missing here?

Incidentally, in my last message there was a mistake.  I meant
to say that I had tried adding the flags

-Dant.regexp.matcherimpl=org.apache.tools.ant.util.regexp.JakartaRegexpMatcher
-Dant.regexp.matcherimpl=org.apache.tools.ant.util.regexp.JakartaOroMatcher

to my ant run as well, and that these hadn't worked, either.

Thanks,
Dave

Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by Glenn McAllister <gl...@somanetworks.com>.
David J Iannucci wrote:

> Look, I've read the docs.  And I realize you all can't
> see precisely what I'm doing, but I don't think I've missed anything major
> here.  Why is this not working?

Well, do you have the regexp jars in your classpath?  The ORO dist can be found
at

http://jakarta.apache.org/builds/jakarta-oro/release/v2.0.1/

and the Regexp package at

http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/

Glenn


Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by Glenn McAllister <gl...@somanetworks.com>.
David J Iannucci wrote:

> Peter Donald wrote:
> > Are the regexp jars in your classpath?
>
> OK, so after the second person wrote exactly the same
> thing, I started thinking :-)

Happens to the best of us. :-)

> and cruising around the
> documentation again... and stumbled upon a different
> place in the documentation that said what and where
> the jars were that are needed for this purpose.

> Folks, I'd call this a "failure of documentation".
> Looking only at the documentation for <mapper> was
> not enough to tell me what I needed to know.  In fact
> it even says that "Ant comes with implementations for
> jakarta-regexp and jakarta-ORO," which leads me to
> believe that everything I need is already included
> in the ant tarball, so of course I don't think I need
> to go looking for something other than what I've
> already got.

Thats a fair point.  Care to contribute a patch to the docs to fix it?
:-)

Glenn

RE: mapper type="regexp" doesn't work (was: Can't find task)

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Dave,

> -----Original Message-----
> 
> Folks, I'd call this a "failure of documentation".
> Looking only at the documentation for <mapper> was
> not enough to tell me what I needed to know.  

You should raise a documentation bug.

Conor




Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by David J Iannucci <dj...@myriad.com>.
Peter Donald wrote:
> Are the regexp jars in your classpath?

OK, so after the second person wrote exactly the same
thing, I started thinking :-) and cruising around the
documentation again... and stumbled upon a different
place in the documentation that said what and where
the jars were that are needed for this purpose.

So I downloaded the right one, put it in my classpath,
and bingo, it works.

Folks, I'd call this a "failure of documentation".
Looking only at the documentation for <mapper> was
not enough to tell me what I needed to know.  In fact
it even says that "Ant comes with implementations for
jakarta-regexp and jakarta-ORO," which leads me to
believe that everything I need is already included
in the ant tarball, so of course I don't think I need
to go looking for something other than what I've
already got.

Oh well... that's life I guess :-)
Thanks again to those who responded.

Dave

Re: mapper type="regexp" doesn't work (was: Can't find task)

Posted by Peter Donald <do...@apache.org>.
At 03:14  7/3/01 -0700, David J Iannucci wrote:
>with no luck.  Look, I've read the docs.  And I realize you all can't
>see
>precisely what I'm doing, but I don't think I've missed anything major
>here.
>Why is this not working?

Are the regexp jars in your classpath?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


mapper type="regexp" doesn't work (was: Can't find task)

Posted by David J Iannucci <dj...@myriad.com>.
> In what way does it not exist for you? Do you get an error if you try to use
> it, or have you tried to find it inside the jar?

Thanks for the help.  I'm beyond that problem now :-)  The reason
ant was telling me it couldn't find the task, apparently, was because
I only tried to _run_ under Ant 1.2, but downloaded version 1.3 and
tar tv'ed, jar tv'ed, and grepped my way through it looking for
Apply.class and couldn't find it.  Anyway, now that I'm actually
running 1.3, I've got <apply>.

> It physical name is org.apache.tools.ant.taskdefs.Transform if that may
> be your problem?

Well, gee, that's intuitive :-)

----

Now I have a different problem.  I can't get <mapper> to work right.
Inside my <apply> task, I've got:

   <mapper type="regexp" from="(.*)\.p[lmhp]$$" to="\1.html" />

but when I try to run ant, now it tells me:

   No supported regular expression matcher found

I've got both classes

   org/apache/tools/ant/util/regexp/JakartaOroMatcher.class
   org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.class

in my $CLASSPATH (I'm running Solaris 8).  I've even tried it
both with these classes out in the open filesystem and jarred up
inside ant.jar, and ant doesn't seem able to find them.  I also
tried

   ant
-Dant.regexp.matcherimpl=org.apache.tools.ant.util.regexp.RegexpMatcher

with no luck.  Look, I've read the docs.  And I realize you all can't
see
precisely what I'm doing, but I don't think I've missed anything major
here.
Why is this not working?

Thanks in advance,
Dave

Re: Can't find task

Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "David J Iannucci" <dj...@myriad.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, March 07, 2001 6:02 PM
Subject: Can't find <apply> task


> In the HTML documentation on the Ant web site, there is
> a doc page for a built-in task called <apply>.  I've
> seen this referenced by searching the ML archives as well.
> But I can't find it anywhere in the 1.3 distribution!
> Am I crazy?  I want to use this task!  Why does it seem
> not to exist for me?

In what way does it not exist for you? Do you get an error if you try to use
it, or have you tried to find it inside the jar? It physical name is
org.apache.tools.ant.taskdefs.Transform if that may be your problem? It
should be in the Ant 1.3 distribution, at least it's in the distribution I
downloaded (tar.gz).

Nico