symbolic links cannot be preserved by ant tar

Discussion in 'Java' started by zyng, Jan 21, 2014.

  1. zyng

    zyng Guest

    Hi:

    I just found that when using the ant task "tar" to create a tar file, the links can not be preserved -- this is different from GNU tar feature.

    In another words, if the directory to be tarred containing:

    libfoo.so --> libfoo.so.0
    libfoo.so.0 --> libfoo.so.0.4
    libfoo.so.0.4
    (very common scenario in shared object library files in *nix OS)

    By default(followsymlinks is true), when I tarred and untarred the created tar file, there will be 3 identical files with different names:

    libfoo.so
    libfoo.so.0
    libfoo.so.0.4

    This is considered a bug by Ant developers:

    https://issues.apache.org/bugzilla/show_bug.cgi?id=15244

    https://issues.apache.org/bugzilla/show_bug.cgi?id=14320

    I am wondering if there is a solution now, or I have to live with it.

    Thank you very much.
    zyng, Jan 21, 2014
    #1
    1. Advertising

  2. zyng <> wrote:
    > I just found that when using the ant task "tar" to create a tar file, the links can not be preserved -- this is different from GNU tar feature.


    Maybe you can get ant to call (gnu-)tar directly, instead of using the
    tar task?

    Not an ant expert, myself, and only answering because I don't see any
    other reply, yet.
    Andreas Leitgeb, Feb 3, 2014
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Claudio Grondi
    Replies:
    4
    Views:
    544
    Claudio Grondi
    Aug 20, 2005
  2. Replies:
    2
    Views:
    417
    Michael Hoffman
    Apr 24, 2007
  3. Ray Van Dolson
    Replies:
    0
    Views:
    312
    Ray Van Dolson
    Sep 23, 2009
  4. Ray Van Dolson
    Replies:
    0
    Views:
    793
    Ray Van Dolson
    Sep 25, 2009
  5. Ed Howland
    Replies:
    3
    Views:
    127
    Ed Howland
    Apr 4, 2006
Loading...

Share This Page