ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tracy Jones" <>
Subject RE: using symlink on filesets
Date Fri, 09 Feb 2007 19:34:35 GMT
Never mind - it's my version of j9 that is the problem - not ant....

-----Original Message-----
From: Tracy Jones 
Sent: Friday, February 09, 2007 11:18 AM
To: Ant Users List
Subject: Re: using symlink on filesets

I am trying to create sym links in 1 directory for each file in another
directory.  I got this example from a previous posting, but so far am
unable to make it work for me.

The code is below - the problem I am having is that the sym link is
being created in whatever directory I am in when I run the ant command
rather than the directory that I have specified in the destdir argument

<project name="test" default="testfoo">

        <target name="testfoo">

                <fileset dir="bar" id="commonRefId">
                        <include name="*" />
                <symlinkFileset fsRefid="commonRefId" destdir="foo" />

        <macrodef name="symlinkFileset">
                <attribute name="fsRefid" />
                <attribute name="destdir" />
                        <echo message="@{destdir}"/>
                        <apply executable="ln" dir="@{destdir}"
verbose="true" parallel="false">
                                <arg value="-s" />
                                <arg value="-f" />
                                <arg value="-v" />
                                <fileset refid="@{fsRefid}" />


Here's the output of the run

root@StrataLight:/home/sluser# ant -f test.xml -d
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: test.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.3 in: /opt/vame1.4
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file ->
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /var/stratalight/home/sluser/test.xml with URI =
Setting ro project property: -> test
Adding reference: test
Setting ro project property: ant.file.test ->
Project base dir set to: /var/stratalight/home/sluser
 +Target: depends
[] Could not load definitions from resource
org/apache/tools/ant/antlib.xml. It could not be found.
 +Datatype symlinkFileset
 [macrodef] creating macro  symlinkFileset
Attempting to create object of type
Adding reference: ant.executor
Build sequence for target(s) `depends' is [depends]
Complete build sequence is [depends, ]

Adding reference: commonRefId
     [echo] foo
    [apply] Current OS is Linux
fileset: Setup scanner in dir /var/stratalight/home/sluser/bar with
patternSet{ includes: [*] excludes: [] }
    [apply] Executing 'ln' with arguments:
    [apply] '-s'
    [apply] '-f'
    [apply] '-v'
    [apply] '/var/stratalight/home/sluser/bar/a'
    [apply] The ' characters around the executable and arguments are
    [apply] not part of the command.
Execute:Java13CommandLauncher: Executing 'ln' with arguments:

The ' characters around the executable and arguments are
not part of the command.
    [apply] create symbolic link `./a' to
    [apply] Applied ln to 1 file and 0 directories.


Can anyone help??


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message