Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / July 2007

Tip: Looking for answers? Try searching our database.

Ant : from path to fileset

Thread view: 
Kaiser S. - 30 Jul 2007 10:37 GMT
I'd like to convert a path to a fileset. I need it to use in "copy" task.

I define my path like that:

    <path id="classpath">
        <pathelement location="${lib.dir}\activation.jar" />
        <pathelement location="${lib.dir}\mail.jar" />
        ...
    </path>

I need to copy all this to the jar directory:

    <copy todir="${dist.lib.dir}" >
       <fileset refid="classpath" />
    </copy>

But i have the error:

BUILD FAILED
build.xml:83: classpath doesn't denote a fileset

How can i do that ?
Roedy Green - 30 Jul 2007 11:35 GMT
>I'd like to convert a path to a fileset. I need it to use in "copy" task.
One way is to use a "stomp" program to compose the XML file. Then you
can specify the path once and generate duplicate info in the ANT
script.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Kaiser S. - 30 Jul 2007 12:00 GMT
Roedy Green a écrit :
>> I'd like to convert a path to a fileset. I need it to use in "copy" task.
> One way is to use a "stomp" program to compose the XML file. Then you
> can specify the path once and generate duplicate info in the ANT
> script.

It seems heavy. I would prefer a simple trick. In last resort, i will
duplicate the paths in the ant file "by hands".
Kaiser S. - 30 Jul 2007 13:00 GMT
Kaiser S. a écrit :
> Roedy Green a écrit :
>>> I'd like to convert a path to a fileset. I need it to use in "copy"
[quoted text clipped - 5 lines]
> It seems heavy. I would prefer a simple trick. In last resort, i will
> duplicate the paths in the ant file "by hands".

I found in http://ant.apache.org/manual/CoreTasks/copy.html :

<copy todir="dest" flatten="true">
    <path refid="classpath" />
</copy>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.