fileset

In Ant, how do I specify files with comma in filename?

╄→гoц情女王★ 提交于 2020-01-24 20:44:27
问题 Here is an example-target that I tried. Turns out, it wants to delete everything because the comma separates " * */*" and "cover" -- understandable. <target name="clean"> <delete verbose="true"> <fileset dir="." includes="**/*.pyo"></fileset> <fileset dir="." includes="**/*,cover"></fileset> </delete> </target> How do I specify an embedded comma? I'm trying to learn Ant so I won't have to maintain different build-systems for different operating-systems. In this case, it's in a Python

store ANT regex in an excel file

被刻印的时光 ゝ 提交于 2020-01-06 19:29:25
问题 I am creating an ANT script for which I am using a fileset and a regex to get my file and to get an expression in that file. I also need to store the expression in a spreadsheet, which I am not sure how to do it. I have learned somewhere that I could use replaceregexp, but I am not sure how do I do that. I have used target tasks to do the search for the file and expression. 回答1: ANT is not a programming language so this is not a trivial problem to solve. The following example uses: groovy

Converting an Ant fileset to multiple apply args

我的梦境 提交于 2019-12-30 03:03:06
问题 I have some files: dir/foo.txt dir/bar.txt dir/foobar.txt In an Ant apply task, I want to pass the list of files as arguments: <target name="atask"> <apply executable="${cmd}" parallel="false" verbose="true"> <arg value="-in"/> <srcfile/> <arg value="dir/foo.txt"/> <arg value="dir/bar.txt"/> <arg value="dir/foobar.txt"/> <fileset dir="${list.dir}" includes="*.list"/> </apply> </target> This works fine, but what if I want to pick the list of files dynamically, using a fileset: <fileset dir=

Ant, download fileset from remote machine

删除回忆录丶 提交于 2019-12-17 06:18:23
问题 As I've readen ant doesn't provide 'fileset' attribute when downloading files from remote machine via scp task. It works when sending files from local machine, but It doesn't work when starting in remote machine. That's from documentation. So in remote machine I have some folders and load of files in every directory. I want to download all folders and one specified file from every of them. Downloading all files and then deleting unneeded files won't be solution beacuse there are thousands of

ANT task - multiple files - loop through

三世轮回 提交于 2019-12-13 19:28:02
问题 I have quite complicated ant task to write. I had to make separate builds files and 1 left. There are 4 files: buildpackage.bat, buildpackage.xml, buildpackage.txt, structure.xml buildpackage.bat is just an ant file that calls buildpackage.xml "ant -f buildpackage.xml" . That is fine. buildpackage.txt is simple and has got comma-separated lines: server1,client1 server2,client2 genericserver,client[x] server[x],client[x] There is always server name and client name: Server name can be letters

Ant, download fileset from remote machine

﹥>﹥吖頭↗ 提交于 2019-12-12 03:57:00
问题 As I've readen ant doesn't provide 'fileset' attribute when downloading files from remote machine via scp task. It works when sending files from local machine, but It doesn't work when starting in remote machine. That's from documentation. So in remote machine I have some folders and load of files in every directory. I want to download all folders and one specified file from every of them. Downloading all files and then deleting unneeded files won't be solution beacuse there are thousands of

How to delete files that are not present in another directory?

好久不见. 提交于 2019-12-11 10:23:46
问题 I have two directories, let's call them src and build . My build system works so that for all files with mtime more recent in src than in build it copies the file from src to buid and does some transformations (minification, versioning, etc.). Otherwise skips as the file is considered up to date. This however poses a problem when source file is deleted, as its built version is still present in build and gets into map file generated afterwards. $ ls src example1.js example2.js $ ant do-the

Iterating through a directory with Ant

天涯浪子 提交于 2019-12-07 02:34:09
问题 Let's say I have a collection of PDF files with the following paths: /some/path/pdfs/birds/duck.pdf /some/path/pdfs/birds/goose.pdf /some/path/pdfs/insects/fly.pdf /some/path/pdfs/insects/mosquito.pdf What I'd like to do is generate thumbnails for each PDF that respect the relative path structure, and output to another location, i.e.: /another/path/thumbnails/birds/duck.png /another/path/thumbnails/birds/goose.png /another/path/thumbnails/insects/fly.png /another/path/thumbnails/insects

nAnt Deleting files older than 7 days old

拈花ヽ惹草 提交于 2019-12-04 12:14:24
问题 I would like to create a target that cleans log files older than 7 days old in a specific folder. I get an error when I try to put in a "date" element inside a fileset. How can I go about this? <delete> fileset basedir="${StageIISRoot}/MySite/App_Data/ErrorLog"> <date datetime="${datetime::now() - timespan::from-days(7)}" when="before"/> <include name="*.xml" /> </fileset> </delete> 回答1: I don't see any documentation for using the "date" element. You might consider something like this:

What's the difference between a nested path and fileset?

混江龙づ霸主 提交于 2019-12-03 17:20:17
问题 I have been googling for the "Differences between fileset and path" article for some time, but have found nothing useful. For example, what is the difference between the following (say, there is a someDir directory, which contains .jar files and has no subdirectories): <path id="somePathId"> <pathelement path="someDir"/> </path> <path id="someId"> <path refid="somePathId" /> </path> and <path id="someId"> <fileset dir="someDir"> <include name="*.*"> </fileset> </path> ? 回答1: They are used in