Hmm, I missed double-jar requirement for using non-JDK impls, so I can give that a try. But it does seem odd that Ant couldn't use the Jdk14RegexpRegexp impl.

L.

Antoine Levy-Lambert wrote:
Hello Laurie,

please look at this manual page :
http://ant.apache.org/manual/CoreTypes/regexp.html
maybe this paragraph can help you :
The property ant.regexp.regexpimpl governs which regular expression
implementation will be chosen. Possible values for this property are :

  a.. org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
  b.. org.apache.tools.ant.util.regexp.JakartaOroRegexp
  c.. org.apache.tools.ant.util.regexp.JakartaRegexpRegexp
Also, if you want to use the Oro implementation of regexp, you then need
ant-apache-oro.jar and jakarta-oro.jar in the classpath.
Similarily, you will need jakarta-regexp.jar and ant-apache-regexp.jar in
the last case.

Most optional tasks in ant require at least 2 jars, one containing the
bridge code between ant and the external dependency, the other one being the
external dependency itself.

I am surprised that the org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
does not work.

Regards,

Antoine

----- Original Message ----- From: "Laurie Harper" <[EMAIL PROTECTED]>
To: <user@ant.apache.org>
Sent: Saturday, March 11, 2006 3:32 AM
Subject: Re: ant/maven integration and optional tasks


Laurie Harper wrote:
I'm trying to integrate an Ant build which uses optional tasks
(specifically, the <script> task) into a Maven2 build. The trouble is, I
can't find a way to get the necessary dependencies onto the classpath.

I'm using Maven's antrun plugin to call the Ant build using the <ant>
task. But I don't see any mechanism in the <ant> task for specifying the
classpath that should be used for the invoked build.

Since I also can't see a way with Maven's antrun plugin to specify a
classpath to invoke Ant with, I'm at a dead end.

Is there a general mechanism in Ant for importing dependencies for
optional tasks that might work in this scenario? Ideally I'd like the
Ant build to work when invoked with Ant as well as when invoked through
Mavent, but I'd settle for a solution that only worked with Maven if
that's the best that can be achieved.
OK, thanks to a response on the Maven list I figured out how to
configure the plugin with the necessary dependencies. However, now I
have a different problem.

Ant is now complaining about the <replaceregex> optional task. According
to the manual, it should be able to use the JDK's regex APIs (I'm using
JDK 1.5). I tried supplying ORO or Jakarta Regex but got the missing
dependencies error with all tree configurations.

What am I missing? Does this task have additional, undocumented
dependencies?

L.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to