Howto use ReplaceRegExp in an ant script?
Hi
I was trying to use the following ant snippet and got an error:
> <property name="textile2html"
> value="${basedir}/debian/textile2html.rb"/><!-- path to textile2html
> converter -->
> <target name="doc" depends="init"
> description="Generate HTML from textilesource">
> <replaceregexp
> match="textile"
> replace="HTML">
> <apply executable="${textile2html}">
> <srcfile/>
> <arg value="--outdir=#{$target}" />
> <targetfile/>
> <fileset dir="${basedir}" includes="*/*.textile */*/*.textile"/>
> <mapper type="regexp" from="${basedir}" to="${target}/doc" />
> </apply>
> </replaceregexp>
> </target>
The error message was:
> BUILD FAILED
> /home/src/debian/elexis-2.0/debian/build.xml:32: Problem: failed to create
> task or type replaceregexp Cause: the class
> org.apache.tools.ant.taskdefs.optional.ReplaceRegExp was not found. This
> looks like one of Ant's optional components.
> Action: Check that the appropriate optional JAR exists in
> -/usr/share/ant/lib
> -/home/niklaus/.ant/lib
> -a directory added on the command line with the -lib argument
>
> Do not panic, this is a common problem.
> The commonest cause is a missing JAR.
>
> This is not a bug; it is a configuration problem
I tried to find a solution via Google. Is this a problem with my local setup or
do I have to specify (where? / how?) additional jars to be imported. I have
the following ant packages installed
ii ant 1.7.1-4
ii ant-gcj 1.7.1-4
ii ant-optional 1.7.1-4
ii ant-optional-gcj 1.7.1-4
And I cannot figure out what should be wrong with my configuration.
Best regards
Niklaus
Reply to: