Ubuntu

ant finds no supported regular expression matcher

Reported by Thomas Ravkilde on 2007-11-29
12
Affects Status Importance Assigned to Milestone
ant (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: ant

I have a <filterchain> that looks like

            <filterchain>
                <tailfilter lines="-1" skip="1" />
                <tokenfilter>
                    <filetokenizer/>
                    <replaceregex pattern="(characterSet name=.Extended Latin .ANSEL..+?>)"
                                  flags="s"
                                  replace="\1&lt;code>&lt;marc>95&lt;/marc>&lt;ucs>95&lt;/ucs>&lt;/code>&lt;code>&lt;marc>96&lt;/marc>&lt;ucs>96&lt;/ucs>&lt$
                </tokenfilter>
            </filterchain>

which fails build with the output
"No supported regular expression matcher found: java.lang.ClassNotFoundException: org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp"
using the ant 1.7.0-3 ubuntu package

However, downloading ant 1.7.0 from http://ant.apache.org/ and doing a manual install in ~/lib works like a charm. Perhaps an issue with the default classpath?

I am using java-1.5.0-sun installed with Synaptic.

Best Regards,
Thomas

pludov (pludov) wrote :

Same problem. Solution:
sudo apt-get install ant-optional

Matthias Klose (doko) wrote :

closing. solved by installation of ant-optional

Changed in ant:
status: New → Fix Released
matthew day (matthew-scott-day) wrote :

Though this is closed, what solved it for me in centos / fedora was:

yum install ant-apache-regexp

hope that helps someone, for me it was just beneficial doing yum search ant | grep -i optional

and since none of the repos i have (rpmfusion for instance) have a ant-optional package: you can pick and choose what you actually need for your project.

for me, the current list I get (11/04/2012)

[root@work cave]# yum search ant | grep Optional
ant-antlr.i686 : Optional antlr tasks for ant
ant-apache-bcel.i686 : Optional apache bcel tasks for ant
ant-apache-bsf.i686 : Optional apache bsf tasks for ant
ant-apache-log4j.i686 : Optional apache log4j tasks for ant
ant-apache-oro.i686 : Optional apache oro tasks for ant
ant-apache-regexp.i686 : Optional apache regexp tasks for ant
ant-apache-resolver.i686 : Optional apache resolver tasks for ant
ant-commons-logging.i686 : Optional commons logging tasks for ant
ant-commons-net.i686 : Optional commons net tasks for ant
ant-javamail.i686 : Optional javamail tasks for ant
ant-jdepend.i686 : Optional jdepend tasks for ant
ant-jmf.i686 : Optional jmf tasks for ant
ant-jsch.i686 : Optional jsch tasks for ant
ant-junit.i686 : Optional junit tasks for ant
ant-nodeps.i686 : Optional tasks for ant
ant-swing.i686 : Optional swing tasks for ant
ant-trax.i686 : Optional trax tasks for ant

cforce (cforce) wrote :

sles and openuse

sudo zypper install ant-apache-regexp

Juan (juapew) wrote :

Thanks a lot

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers