You need to run "unrar" with <exec> (maybe with <uptodate> condition). ZIP and RAR are different archive formats.

- Alexey.

Leon Pu wrote:
Here are the error messages when I try to extract a RAR file which
created by WinRAR.

======================================================
D:\>ant test
Buildfile: build.xml

test:
    [untar] Expanding: D:\test.rar into D:
    [untar] Unable to expand to file D:\Rar!

BUILD SUCCESSFUL
Total time: 1 second
======================================================

======================================================
D:\>ant test
Buildfile: build.xml

test:
    [untar] Expanding: D:\test.rar into D:\
    [untar] Unable to expand to file D:\Rar!

BUILD SUCCESSFUL
Total time: 0 seconds
======================================================

======================================================
D:\>ant test
Buildfile: build.xml

test:
    [unjar] Expanding: D:\test.rar into D:\

BUILD FAILED
D:\build.xml:3: Error while expanding D:\test.rar

Total time: 0 seconds
======================================================

======================================================
D:\>ant test
Buildfile: build.xml

test:
    [unzip] Expanding: D:\test.rar into D:\

BUILD FAILED
D:\build.xml:3: Error while expanding D:\test.rar

Total time: 0 seconds
======================================================

======================================================
D:\>ant test
Buildfile: build.xml

test:
    [unwar] Expanding: D:\test.rar into D:\

BUILD FAILED
D:\build.xml:3: Error while expanding D:\test.rar

Total time: 0 seconds
======================================================


Best regards,
Leon

--- Keith Hatton <[EMAIL PROTECTED]> wrote:

RAR as in J2EE Resource ARchive file?
Just use <jar> with <fileset> and <zipfileset>, and <unjar>.

Hope this helps
Keith


-----Original Message-----
From: Leon Pu [mailto:[EMAIL PROTECTED] Sent: 27 June 2006 04:42
To: Ant Users List
Subject: How to handle RAR in Ant


Hi all,

how to create and extract RAR file in Ant build script?

Thanks.


Best regards,
Leon

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to