ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujan Digumarti <Sujan.Diguma...@india.techspan.com>
Subject RE: antRun
Date Tue, 05 Feb 2002 07:52:34 GMT

Just wanted to know whether antRun is used by ant1.4.1 to run the exec task.
I've removed antRun from my bin but exec task is still working fine on my
machine.
I'm working on Solaris 6.0

But i just got to know that exec task failed saying java.io.IOException
antRun not found 
this happened to my client who is using the build files.
ANT_HOME has been set correctly.


I'm going crazy here.


Thnx,
Sujan
-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Tuesday, February 05, 2002 1:15 PM
To: Ant Users List
Subject: Re: <classpath >as a source for <copy> ?


--- Bill Winspur <bwinspur@wynnon.com> wrote:
> Actually, having all the libs in one directory was my first workaround,

I meant, if all the files you need to copy come from subdirs relative to
one directory -- they didn't need to all be in the same directory, just
relative to one. 

> For now my technique of a limited number of library-location properites
> is working, but I may have time to make a version of Fileset that takes
> a files="path1,path2.." attribute,

You can already do that -- except the attribute is 'includes' -- but only
if the files listed are relative to the directory specified in the
<fileset>'s 'dir' attribute, not full paths. I'm not sure how you could
modify <fileset> to take a list of full-path filenames, or whether it'd
even be appropriate -- but you could probably modify <copy> to take a list
of files rather than either just a single file or a fileset.

In the meantime, as a workaround for if/when that modification gets done,
you could use the <script> task to take apart a comma-separated value of a
property and do the copies that way. Eg:
  <target name="copyfiles">
    <script language="javascript"> <![CDATA[
      importClass(java.io.File);
      importClass(java.util.StringTokenizer);
      todir = new File(projname.getProperty("copydir"));
      files = new StringTokenizer(projname.getProperty("files"), ",");
      while (files.hasMoreTokens()) {
        file = new File(files.nextToken());
        copyFile = projname.createTask("copy");
        copyFile.setFile(file);
        copyFile.setTodir(todir);
        copyFile.setFlatten(true);
        copyFile.execute();
      }
    ]]> </script>
  </target>

(Where "copydir" is the property holding the value of the directory you're
copying to, and "files" is a property holding a comma-separated list of
relative or full-path filenames [assumes "files" lists at least two
filenames]. "projname" is the name specified in the 'name' attr of your
<project> tag).

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message