You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by John Martin <jm...@transitionaldata.com> on 2009/03/05 00:05:58 UTC

Problem installing regexp option

I have an Openbravo build process that uses regexp.  We have installed
Ant 1.7.1 and it is running on CentOS 5.  We had to install from
JPackage in order to get the latest Ant release.  The problem that we
are running into is that the script gets the following exception when
run:

 

/tmp/build.xml:4: No supported regular expression matcher found:
java.lang.ClassNotFoundException:
org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher

 

I found that I needed the ant-contrib package but jpackage doesn't have
a current version that supports 1.7.x so I tried to chase down the
specific jar.  What I found was that it requires the
ant-nodeps-1.7.1.jar which I was able to find and download.  I confirmed
that the class in question is in the jar:

 

unzip -l /usr/share/ant/lib/ant-nodeps-1.7.1.jar  | grep
Jdk14RegexpMatcher

     2673  06-27-08 05:03
org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.class 

 

I tried placing the jar into the $ANT_HOME/lib directory and have done
the 'ant -diagnostics' which now shows the jar in the class path:

 

ant -diagnostics | grep class.path

 

java.class.path :
/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java
/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/java/jdk
1.6.0_11/lib/tools.jar:/usr/share/ant:/usr/share/ant/lib/ant-nodeps-1.7.
1.jar

sun.boot.class.path :
/usr/java/jdk1.6.0_11/jre/lib/resources.jar:/usr/java/jdk1.6.0_11/jre/li
b/rt.jar:/usr/java/jdk1.6.0_11/jre/lib/sunrsasign.jar:/usr/java/jdk1.6.0
_11/jre/lib/jsse.jar:/usr/java/jdk1.6.0_11/jre/lib/jce.jar:/usr/java/jdk
1.6.0_11/jre/lib/charsets.jar:/usr/java/jdk1.6.0_11/jre/classes

 

ant.library.dir : /usr/share/ant/lib

 

I read where ant "lies" about jars in http://blog.eflow.org/archives/22
and tried moving the jar to the /usr/share/java and /usr/share/java/ant
directories but got the same results.  I also tried the -lib switch when
running ant.  None of these steps worked.

 

Any suggestions?

 

TIA

 

John


RE: Problem installing regexp option

Posted by John Martin <jm...@transitionaldata.com>.
Solved my own problem.  I installed the RPM package ant-nodeps

	yum install ant-nodeps

As it turns out it does in fact install into the /usr/share/java/ant
directory instead of /usr/share/ant/lib directory as one would expect.

-----Original Message-----
 
I have an Openbravo build process that uses regexp.  We have installed
Ant 1.7.1 and it is running on CentOS 5.  We had to install from
JPackage in order to get the latest Ant release.  The problem that we
are running into is that the script gets the following exception when
run:

 

/tmp/build.xml:4: No supported regular expression matcher found:
java.lang.ClassNotFoundException:
org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher

 

I found that I needed the ant-contrib package but jpackage doesn't have
a current version that supports 1.7.x so I tried to chase down the
specific jar.  What I found was that it requires the
ant-nodeps-1.7.1.jar which I was able to find and download.  I confirmed
that the class in question is in the jar:

 

unzip -l /usr/share/ant/lib/ant-nodeps-1.7.1.jar  | grep
Jdk14RegexpMatcher

     2673  06-27-08 05:03
org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.class 

 

I tried placing the jar into the $ANT_HOME/lib directory and have done
the 'ant -diagnostics' which now shows the jar in the class path:

 

ant -diagnostics | grep class.path

 

java.class.path :
/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java
/jaxp_parser_impl.jar:/usr/share/java/xml-commons-apis.jar:/usr/java/jdk
1.6.0_11/lib/tools.jar:/usr/share/ant:/usr/share/ant/lib/ant-nodeps-1.7.
1.jar

sun.boot.class.path :
/usr/java/jdk1.6.0_11/jre/lib/resources.jar:/usr/java/jdk1.6.0_11/jre/li
b/rt.jar:/usr/java/jdk1.6.0_11/jre/lib/sunrsasign.jar:/usr/java/jdk1.6.0
_11/jre/lib/jsse.jar:/usr/java/jdk1.6.0_11/jre/lib/jce.jar:/usr/java/jdk
1.6.0_11/jre/lib/charsets.jar:/usr/java/jdk1.6.0_11/jre/classes

 

ant.library.dir : /usr/share/ant/lib

 

I read where ant "lies" about jars in http://blog.eflow.org/archives/22
and tried moving the jar to the /usr/share/java and /usr/share/java/ant
directories but got the same results.  I also tried the -lib switch when
running ant.  None of these steps worked.


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