You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jan K <ja...@symbiountech.com> on 2008/09/18 13:53:42 UTC

How to Configure batch file in Ant?

I am a new bee to Ant.I need to know how to configure batch file in Ant.I am
using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
<target name="test">
<exec dir="." executable="cmd" spawn="true">
<arg line="/c start activemq.bat"/>
</exec>
</target>
<target name="default">
<antcall target="test" />
</target>
I really dont know what i am doing is correct.I browsed through google and
got this exec command.I am geting an error as Execute failed:
java.io.IOException: java.io.IOException: cmd: not found
Please help me to solve this. 
-- 
View this message in context: http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: How to Configure batch file in Ant?

Posted by John5342 <jo...@googlemail.com>.
>Probably best to <exec> the unix untar command so that permissions get
preserved, otherwise shell scripts don't have their >execute bit set

True normally but actually probably doesnt make any difference. The getting
started guide mentions explitely setting the permissions anyway (can be done
using chmod ant task in this case) so the permissions probably arent set in
the archive in the first place. Its also more portable to do as much as
possible using ant tasks.

2008/9/18 Steve Loughran <st...@apache.org>

> John5342 wrote:
>
>> Best place to start is probably the getting started guide at
>> http://activemq.apache.org/version-5-getting-started.html and follow the
>> unix instructions. Most of the actions should be doable using standard ant
>> tasks such as untar and then at the end of the getting started guide it
>> mentions the unix script to run which is
>>
>>
> Probably best to <exec> the unix untar command so that permissions get
> preserved, otherwise shell scripts don't have their execute bit set
>
>
> --
> Steve Loughran                  http://www.1060.org/blogxter/publish/5
> Author: Ant in Action           http://antbook.org/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: How to Configure batch file in Ant?

Posted by Steve Loughran <st...@apache.org>.
John5342 wrote:
> Best place to start is probably the getting started guide at
> http://activemq.apache.org/version-5-getting-started.html and follow the
> unix instructions. Most of the actions should be doable using standard ant
> tasks such as untar and then at the end of the getting started guide it
> mentions the unix script to run which is
> 

Probably best to <exec> the unix untar command so that permissions get 
preserved, otherwise shell scripts don't have their execute bit set


-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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


Re: How to Configure batch file in Ant?

Posted by John5342 <jo...@googlemail.com>.
I fact if you do the chmod step (Unix Binary Installation) then you dont
even need bash or another cmd equivelant. You can then just run
[activemq_install_dir]/bin/activemq

something along the lines of:

<exec dir="${activemq.install.dir}" executable="activemq" spawn="true">
<arg line="${any.arguments.needed}"/>
</exec>


2008/9/18 John5342 <jo...@googlemail.com>

> Best place to start is probably the getting started guide at
> http://activemq.apache.org/version-5-getting-started.html and follow the
> unix instructions. Most of the actions should be doable using standard ant
> tasks such as untar and then at the end of the getting started guide it
> mentions the unix script to run which is
>
> [activemq_install_dir]/bin/activemq
>
> Hope thats helpful
>
>
> 2008/9/18 Jan K <ja...@symbiountech.com>
>
>>
>> You are correct.Is there ayy command available in ant to configure
>> activemq.bat file in Ant build.xml?
>> My requirement is :
>>  1. Setup ANT build
>> 2. ANT deploy to install ActiveMQ
>> 3. ANT deploy to install the Hub and the web based testing app including
>> the
>> database
>> 4. README and installation document
>> i need to know how accomplish these?please help me.
>>
>> John5342 wrote:
>> >
>> > I think your getting linux and windows confused. You say you are using
>> > linux
>> > but cmd is the windows shell and .bat files are again windows batch
>> files.
>> > That is why you get a "cmd: not found" error (because cmd doesnt exist
>> on
>> > linux). If you want a linux equivalent to cmd and batch files read up on
>> > bash scripts.
>> >
>> > 2008/9/18 Jan K <ja...@symbiountech.com>
>> >
>> >>
>> >> I am a new bee to Ant.I need to know how to configure batch file in
>> Ant.I
>> >> am
>> >> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
>> >> <target name="test">
>> >> <exec dir="." executable="cmd" spawn="true">
>> >> <arg line="/c start activemq.bat"/>
>> >> </exec>
>> >> </target>
>> >> <target name="default">
>> >> <antcall target="test" />
>> >> </target>
>> >> I really dont know what i am doing is correct.I browsed through google
>> >> and
>> >> got this exec command.I am geting an error as Execute failed:
>> >> java.io.IOException: java.io.IOException: cmd: not found
>> >> Please help me to solve this.
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
>> >> Sent from the Ant - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> >> For additional commands, e-mail: user-help@ant.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19552002.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>

Re: How to Configure batch file in Ant?

Posted by John5342 <jo...@googlemail.com>.
Best place to start is probably the getting started guide at
http://activemq.apache.org/version-5-getting-started.html and follow the
unix instructions. Most of the actions should be doable using standard ant
tasks such as untar and then at the end of the getting started guide it
mentions the unix script to run which is

[activemq_install_dir]/bin/activemq

Hope thats helpful


2008/9/18 Jan K <ja...@symbiountech.com>

>
> You are correct.Is there ayy command available in ant to configure
> activemq.bat file in Ant build.xml?
> My requirement is :
>  1. Setup ANT build
> 2. ANT deploy to install ActiveMQ
> 3. ANT deploy to install the Hub and the web based testing app including
> the
> database
> 4. README and installation document
> i need to know how accomplish these?please help me.
>
> John5342 wrote:
> >
> > I think your getting linux and windows confused. You say you are using
> > linux
> > but cmd is the windows shell and .bat files are again windows batch
> files.
> > That is why you get a "cmd: not found" error (because cmd doesnt exist on
> > linux). If you want a linux equivalent to cmd and batch files read up on
> > bash scripts.
> >
> > 2008/9/18 Jan K <ja...@symbiountech.com>
> >
> >>
> >> I am a new bee to Ant.I need to know how to configure batch file in
> Ant.I
> >> am
> >> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
> >> <target name="test">
> >> <exec dir="." executable="cmd" spawn="true">
> >> <arg line="/c start activemq.bat"/>
> >> </exec>
> >> </target>
> >> <target name="default">
> >> <antcall target="test" />
> >> </target>
> >> I really dont know what i am doing is correct.I browsed through google
> >> and
> >> got this exec command.I am geting an error as Execute failed:
> >> java.io.IOException: java.io.IOException: cmd: not found
> >> Please help me to solve this.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19552002.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: How to Configure batch file in Ant?

Posted by Jan K <ja...@symbiountech.com>.
John was correct.I need to write shell command to run bat file in ant.l
already have the package unzipped.I need to configure and run using ant.Any
ideas.

glenn opdycke-hansen wrote:
> 
> I think that John was asking was why are you trying to run a .bat file on
> linux..bat files are usually run on windows.  You state that you are on
> linux.
> 
> Other questions include: Do you want to install ActiveMQ with Ant?
> I would try out the commands needed for your stated requirements.
> Then you can decide what you want to do with Ant.
> 
> --glenn
> 
> On Thu, Sep 18, 2008 at 7:42 AM, Jan K <ja...@symbiountech.com> wrote:
> 
>>
>> You are correct.Is there ayy command available in ant to configure
>> activemq.bat file in Ant build.xml?
>> My requirement is :
>>  1. Setup ANT build
>> 2. ANT deploy to install ActiveMQ
>> 3. ANT deploy to install the Hub and the web based testing app including
>> the
>> database
>> 4. README and installation document
>> i need to know how accomplish these?please help me.
>>
>> John5342 wrote:
>> >
>> > I think your getting linux and windows confused. You say you are using
>> > linux
>> > but cmd is the windows shell and .bat files are again windows batch
>> files.
>> > That is why you get a "cmd: not found" error (because cmd doesnt exist
>> on
>> > linux). If you want a linux equivalent to cmd and batch files read up
>> on
>> > bash scripts.
>> >
>> > 2008/9/18 Jan K <ja...@symbiountech.com>
>> >
>> >>
>> >> I am a new bee to Ant.I need to know how to configure batch file in
>> Ant.I
>> >> am
>> >> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
>> >> <target name="test">
>> >> <exec dir="." executable="cmd" spawn="true">
>> >> <arg line="/c start activemq.bat"/>
>> >> </exec>
>> >> </target>
>> >> <target name="default">
>> >> <antcall target="test" />
>> >> </target>
>> >> I really dont know what i am doing is correct.I browsed through google
>> >> and
>> >> got this exec command.I am geting an error as Execute failed:
>> >> java.io.IOException: java.io.IOException: cmd: not found
>> >> Please help me to solve this.
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
>> >> Sent from the Ant - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> >> For additional commands, e-mail: user-help@ant.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19552002.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19552743.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: How to Configure batch file in Ant?

Posted by glenn opdycke-hansen <gl...@gmail.com>.
I think that John was asking was why are you trying to run a .bat file on
linux..bat files are usually run on windows.  You state that you are on
linux.

Other questions include: Do you want to install ActiveMQ with Ant?
I would try out the commands needed for your stated requirements.
Then you can decide what you want to do with Ant.

--glenn

On Thu, Sep 18, 2008 at 7:42 AM, Jan K <ja...@symbiountech.com> wrote:

>
> You are correct.Is there ayy command available in ant to configure
> activemq.bat file in Ant build.xml?
> My requirement is :
>  1. Setup ANT build
> 2. ANT deploy to install ActiveMQ
> 3. ANT deploy to install the Hub and the web based testing app including
> the
> database
> 4. README and installation document
> i need to know how accomplish these?please help me.
>
> John5342 wrote:
> >
> > I think your getting linux and windows confused. You say you are using
> > linux
> > but cmd is the windows shell and .bat files are again windows batch
> files.
> > That is why you get a "cmd: not found" error (because cmd doesnt exist on
> > linux). If you want a linux equivalent to cmd and batch files read up on
> > bash scripts.
> >
> > 2008/9/18 Jan K <ja...@symbiountech.com>
> >
> >>
> >> I am a new bee to Ant.I need to know how to configure batch file in
> Ant.I
> >> am
> >> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
> >> <target name="test">
> >> <exec dir="." executable="cmd" spawn="true">
> >> <arg line="/c start activemq.bat"/>
> >> </exec>
> >> </target>
> >> <target name="default">
> >> <antcall target="test" />
> >> </target>
> >> I really dont know what i am doing is correct.I browsed through google
> >> and
> >> got this exec command.I am geting an error as Execute failed:
> >> java.io.IOException: java.io.IOException: cmd: not found
> >> Please help me to solve this.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19552002.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: How to Configure batch file in Ant?

Posted by Jan K <ja...@symbiountech.com>.
You are correct.Is there ayy command available in ant to configure
activemq.bat file in Ant build.xml?
My requirement is :
 1. Setup ANT build
2. ANT deploy to install ActiveMQ
3. ANT deploy to install the Hub and the web based testing app including the
database
4. README and installation document 
i need to know how accomplish these?please help me.

John5342 wrote:
> 
> I think your getting linux and windows confused. You say you are using
> linux
> but cmd is the windows shell and .bat files are again windows batch files.
> That is why you get a "cmd: not found" error (because cmd doesnt exist on
> linux). If you want a linux equivalent to cmd and batch files read up on
> bash scripts.
> 
> 2008/9/18 Jan K <ja...@symbiountech.com>
> 
>>
>> I am a new bee to Ant.I need to know how to configure batch file in Ant.I
>> am
>> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
>> <target name="test">
>> <exec dir="." executable="cmd" spawn="true">
>> <arg line="/c start activemq.bat"/>
>> </exec>
>> </target>
>> <target name="default">
>> <antcall target="test" />
>> </target>
>> I really dont know what i am doing is correct.I browsed through google
>> and
>> got this exec command.I am geting an error as Execute failed:
>> java.io.IOException: java.io.IOException: cmd: not found
>> Please help me to solve this.
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19552002.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: How to Configure batch file in Ant?

Posted by John5342 <jo...@googlemail.com>.
I think your getting linux and windows confused. You say you are using linux
but cmd is the windows shell and .bat files are again windows batch files.
That is why you get a "cmd: not found" error (because cmd doesnt exist on
linux). If you want a linux equivalent to cmd and batch files read up on
bash scripts.

2008/9/18 Jan K <ja...@symbiountech.com>

>
> I am a new bee to Ant.I need to know how to configure batch file in Ant.I
> am
> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
> <target name="test">
> <exec dir="." executable="cmd" spawn="true">
> <arg line="/c start activemq.bat"/>
> </exec>
> </target>
> <target name="default">
> <antcall target="test" />
> </target>
> I really dont know what i am doing is correct.I browsed through google and
> got this exec command.I am geting an error as Execute failed:
> java.io.IOException: java.io.IOException: cmd: not found
> Please help me to solve this.
> --
> View this message in context:
> http://www.nabble.com/How-to-Configure-batch-file-in-Ant--tp19551111p19551111.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: how to convert linefeeds using fixcrlf.

Posted by David Weintraub <qa...@gmail.com>.
Have you looked at the Ant documentation?

It's pretty simple:

<fixcrlf
   srcdir="${source.dir}"
   eol="${eol.type}"/>

${eol.type} can be "asis", "cr", "lf", and "crlf" or you can (and
probably prefer) the OS names as values "mac", "unix", "dos".

According to the documentation, if you don't specify "eol", it will
default to the eol-type of the machine that this is running on. Very
bad for releases, but great for fixing source code before you use it.

You can also specify <fileset> and in <fileset>, use <include> and
<exclude> too.  You can also use the "includes" and "excludes"
parameters inside the prime <fixcrlf> task itself.


A patternset is a way of specifying the <include> and <exclude> of
filesets for later reference. Think of it as a means of substitution.

Here's the reference to the <fixcrlf> task:
<http://ant.apache.org/manual/CoreTasks/fixcrlf.html>

Here's the reference to patternsets:
<http://ant.apache.org/manual/CoreTypes/patternset.html>


--
David Weintraub
qazwart@gmail.com



On Thu, Sep 18, 2008 at 12:56 PM, Lucas Albers <sm...@hotmail.com> wrote:
> How do I convert line feeds to from unix to windows or windows to unix?
>
>
> <target name="convert_linefeeds">
> <fixcrlf srcdir="${logdir}" includes="**/*.log"/>
> </target>
>
> 1.)
>
>
> This shows some example crlf
> http://jira.codehaus.org/browse/MPDIST-9
>
>
> 2.)
> Are these constants?
> What would they be?
>
> <patternset refid="fixcrlf.unix.patternset"/>
> <patternset refid="fixcrlf.win.patternset"/>
>
>
> 3.)
> The first one converts from linux to windows or converts to linux?
>
>
>
> <!-- fix CR/LF for unix dist -->
> <ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="lf" eof="remove">
> <patternset refid="fixcrlf.patternset"/>
> <patternset refid="fixcrlf.unix.patternset"/>
> </ant:fixcrlf>
> <ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="crlf"
> eof="remove">
> <patternset refid="fixcrlf.win.patternset"/>
> </ant:fixcrlf>
>
> <!-- fix CR/LF for win dist -->
> <ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="lf" eof="remove">
> <patternset refid="fixcrlf.unix.patternset"/>
> </ant:fixcrlf>
> <ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="crlf"
> eof="remove">
> <patternset refid="fixcrlf.patternset"/>
> <patternset refid="fixcrlf.win.patternset"/>
> </ant:fixcrlf>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


how to convert linefeeds using fixcrlf.

Posted by Lucas Albers <sm...@hotmail.com>.
How do I convert line feeds to from unix to windows or windows to unix?


<target name="convert_linefeeds">
<fixcrlf srcdir="${logdir}" includes="**/*.log"/>
</target>

1.)


This shows some example crlf
http://jira.codehaus.org/browse/MPDIST-9


2.)
Are these constants?
What would they be?

<patternset refid="fixcrlf.unix.patternset"/>
<patternset refid="fixcrlf.win.patternset"/>


3.)
The first one converts from linux to windows or converts to linux?



<!-- fix CR/LF for unix dist -->
<ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="lf" eof="remove">
<patternset refid="fixcrlf.patternset"/>
<patternset refid="fixcrlf.unix.patternset"/>
</ant:fixcrlf>
<ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="crlf"
eof="remove">
<patternset refid="fixcrlf.win.patternset"/>
</ant:fixcrlf>

<!-- fix CR/LF for win dist -->
<ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="lf" eof="remove">
<patternset refid="fixcrlf.unix.patternset"/>
</ant:fixcrlf>
<ant:fixcrlf srcdir="${maven.dist.bin.assembly.dir}" eol="crlf"
eof="remove">
<patternset refid="fixcrlf.patternset"/>
<patternset refid="fixcrlf.win.patternset"/>
</ant:fixcrlf>




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


AW: How to Configure batch file in Ant?

Posted by Oliver Ashoff <ol...@living-e.de>.
Quick shot.
Try the following:

  <exec executable="cmd.exe" spawn="true" >
          <arg line="/C start &quot;AnyWindowTitle&quot; /I cmd.exe /T:70 /K
                    &quot;${PropertyThatHoldsTheExecutbaleNameToStart}&quot;
          />
        </exec>

> -----Ursprüngliche Nachricht-----
> Von: Jan K [mailto:janokb@symbiountech.com]
> Gesendet: Donnerstag, 18. September 2008 13:54
> An: user@ant.apache.org
> Betreff: How to Configure batch file in Ant?
>
>
> I am a new bee to Ant.I need to know how to configure batch file in
> Ant.I am
> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
> <target name="test">
> <exec dir="." executable="cmd" spawn="true">
> <arg line="/c start activemq.bat"/>
> </exec>
> </target>
> <target name="default">
> <antcall target="test" />
> </target>
> I really dont know what i am doing is correct.I browsed through google
> and
> got this exec command.I am geting an error as Execute failed:
> java.io.IOException: java.io.IOException: cmd: not found
> Please help me to solve this.
> --
> View this message in context: http://www.nabble.com/How-to-Configure-
> batch-file-in-Ant--tp19551111p19551111.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


AW: How to Configure batch file in Ant?

Posted by Oliver Ashoff <ol...@living-e.de>.
....Unix, Linux...
Second quick shot:
Try:

        <exec executable="/bin/sh" spawn="true" dir="." >
          <env key="CUPS_SERVER" value="localhost"/>
          <env key="LC_ALL" value="en_US"/>
          <arg line="-c &quot;              ${propertyThatHoldsTheNameOfTheExecutableToStart} &quot;"/>
        </exec>

Just now, I don't remember what is 'env key...' for. My be you don't need that.
Good Luck.

> -----Ursprüngliche Nachricht-----
> Von: Jan K [mailto:janokb@symbiountech.com]
> Gesendet: Donnerstag, 18. September 2008 13:54
> An: user@ant.apache.org
> Betreff: How to Configure batch file in Ant?
>
>
> I am a new bee to Ant.I need to know how to configure batch file in
> Ant.I am
> using Ant 1.6.5 and Linux(ubuntu)platform.I tried using
> <target name="test">
> <exec dir="." executable="cmd" spawn="true">
> <arg line="/c start activemq.bat"/>
> </exec>
> </target>
> <target name="default">
> <antcall target="test" />
> </target>
> I really dont know what i am doing is correct.I browsed through google
> and
> got this exec command.I am geting an error as Execute failed:
> java.io.IOException: java.io.IOException: cmd: not found
> Please help me to solve this.
> --
> View this message in context: http://www.nabble.com/How-to-Configure-
> batch-file-in-Ant--tp19551111p19551111.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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