You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Peter Donald <do...@apache.org> on 2000/11/18 02:15:45 UTC
Re: Exec & Winrar (using RAR command line)
At 05:28 17/11/00 -0800, you wrote:
>Hi,
>
>I'm building a simple ANT file which uses Winrar to create an archive file.
>Using Windows 2000, the command line command is as follows (for example):
>
>c:\>rar a c:\t c:\test.doc
>
>This command creates an archive file named t.rar in the c: directory.
>
>Wouldn't the corresponding ANT script be like this?
>
><target name="compress" depends="prepare">
> <exec executable="rar" os="windows"/>
> <arg value="a c:\t c:\test.doc"/>
> </target>
>
>I get the following message when I run this script:
>
>Could not create task of type: arg because I can't find it in the list of
>task class definitions. Common solutions are: 1 execute bin/bootstrap. 2
>use taskdef to declare your task. 3 add the task to defaults.properties.
>
>I'd appreciate anyone who can help (I'm relatively new at this).
sure. What you want is below. Notice how it is a subelement of exec rather
than sitting at same level ;)
<exec executable="rar" os="windows">
<arg value="a c:\t c:\test.doc"/>
</exec>
Cheers,
Pete
*------------------------------------------------------*
| Despite your efforts to be a romantic hero, you will |
| gradually evolve into a postmodern plot device. |
*------------------------------------------------------*