FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Java

 
 
LinkBack Thread Tools
 
Old 02-20-2010, 06:16 PM
Niklaus Giger
 
Default 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.ReplaceRegE xp 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


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 201002202016.44069.niklaus.giger@member.fsf.org">h ttp://lists.debian.org/201002202016.44069.niklaus.giger@member.fsf.org
 
Old 02-20-2010, 08:19 PM
Torsten Werner
 
Default Howto use ReplaceRegExp in an ant script?

Hi

On Sat, Feb 20, 2010 at 8:16 PM, Niklaus Giger <niklaus.giger@gmail.com> wrote:
> 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.

do you have ant-nodeps.jar in your classpath?

Cheers,
Torsten


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: a90bfcf1002201319u2ab63080m35ef67257efe35a2@mail.g mail.com">http://lists.debian.org/a90bfcf1002201319u2ab63080m35ef67257efe35a2@mail.g mail.com
 
Old 02-20-2010, 08:32 PM
Ludovic Claude
 
Default Howto use ReplaceRegExp in an ant script?

Hello Niklaus,

You simply need to install the ant-optional package to get this task
working. However, I'm not sure if your code will work as <replaceregexp>
does not support the <apply> element.
Check the doc here (install ant-optional-doc also):
/usr/share/doc/ant-doc/manual/OptionalTasks/replaceregexp.html

Ludovic

Niklaus Giger a écrit :
> 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.ReplaceRegE xp 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
>
>


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4B8054D7.2010707@laposte.net">http://lists.debian.org/4B8054D7.2010707@laposte.net
 
Old 02-20-2010, 09:10 PM
Ludovic Claude
 
Default Howto use ReplaceRegExp in an ant script?

Torsten,

It's here:
git://git.debian.org/pkg-java/enforcer.git


Torsten Werner a écrit :
> Hi
>
> On Sat, Feb 20, 2010 at 8:16 PM, Niklaus Giger <niklaus.giger@gmail.com> wrote:
>> 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.
>
> do you have ant-nodeps.jar in your classpath?
>
> Cheers,
> Torsten
>
>


--
To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4B805DC5.7000207@laposte.net">http://lists.debian.org/4B805DC5.7000207@laposte.net
 

Thread Tools




All times are GMT. The time now is 08:14 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org