ant finds no supported regular expression matcher

Bug #172789 reported by Thomas Ravkilde
12
Affects Status Importance Assigned to Milestone
ant (Ubuntu)
Fix Released
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

Revision history for this message
pludov (pludov) wrote :

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

Revision history for this message
Matthias Klose (doko) wrote :

closing. solved by installation of ant-optional

Changed in ant:
status: New → Fix Released
Revision history for this message
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

Revision history for this message
cforce (cforce) wrote :

sles and openuse

sudo zypper install ant-apache-regexp

Revision history for this message
Juan (juapew) wrote :

Thanks a lot

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.