Hi Andre,
Here is a snippet of how I run my perl scripts:
<target name="Increment">
<exec dir="${build-rel.dir}" executable="perl.exe" os="Windows 2000">
<arg line="${build-rel.dir}\buildnum.pl"/>
</exec>
</target>
-anu.
-----Original Message-----
From: Andre Susantin [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 8:48 AM
To: 'Ant Users List'
Subject: RE: How can we run perl script from ant?
Thanks Stephan,
But we're trying to cut and paste code from myperl.pl into build.xml script.
I'm able to run this following javascript:
<project name="squares" default="main" basedir="./">
<target name="setup">
<script language="javascript"> <![CDATA[
for (i=1; i<=10; i++) {
echo = squares.createTask("echo");
main.addTask(echo);
echo.setMessage(i*i);
}
]]> </script>
</target>
<target name="main" depends="setup"/>
</project>
But what I'm trying to run perl instead:
<project name="squares" default="main" basedir="./">
<target name="setup">
<script language="perl"> <![CDATA[
print 'Hi from Perl';
]]> </script>
</target>
<target name="main" depends="setup"/>
</project>
Is this possible?
When I open bsf.jar it doesn't has hook to perl engine though.
Any thought?
Thanks
-----Original Message-----
From: stephan beal [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 1:33 AM
To: Ant Users List
Subject: Re: How can we run perl script from ant?
On Friday 15 March 2002 02:49 am, you wrote:
> Dear ant users,
> We have some perl script that we would like to incorporate into build.xml,
> but can't run it since the additional library is missing.
> Is running perl script from within ant is supported?
> If so, can anybody can point to me what dependency library needed?
> And little perl sript in build.xml will help too.
here's how i do it (may not be the best way - i'm new at ant):
<target name="dbclasses" if="toplink.generate" depends="init">
<echo message="Building toplink classes..."/>
<exec dir="${toplink.srcdir}" executable="perl" failonerror="true">
<arg line="generator.pl ${toplink.modeltxt} ${toplink.modelxml}
${toplink.modelsql}"/>
</exec>
</target>
----- stephan
Generic Universal Computer Guy
[EMAIL PROTECTED] - http://www.einsurance.de
Office: +49 (89) �552 92 862 Handy: �+49 (179) 211 97 67
"I ain't gen'rally given to physicality of that nature but it saves
a lot of arguing." -- Nanny Ogg
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>