English 中文(简体)
阿帕奇·安东尼奥:用档案挑选档案?
原标题:Apache Ant: Selecting files with fileset?
  • 时间:2011-01-09 17:43:17
  •  标签:
  • ant
  • build

选择使用<代码>fileset的具体卷宗名称或档案类型,的确容易,但我尚未说明如何写出一个文档,从密码开始删除所有档案,例如<代码>.builtpath和.hgignore,但排除

我的档案:

<delete includeemptydirs="true">

    <fileset dir="${temp.dir}/fromRepo">            
        <exclude name=".htaccess"/>
        <include name="**/*" /> <!-- How to select files starting with .?!-->
    </fileset>

</delete>
最佳回答

建议:

<delete includeemptydirs="true">
    <fileset dir="${temp.dir}/fromRepo">            
        <exclude name="**/.htaccess"/>
    </fileset>
</delete>

如果你没有具体说明任何野心——如<代码>,htaccess”,则该规则只能与确切的档案名称,即:在上查阅上>文档目录。 预留名录野心** to .htaccess 说明 避免删除在档案目录下发现的所有称为“htaccess”的档案。

如果你没有具体指明任何规则,则所有档案都有一个暗含的内容,因此没有必要具体规定全球<条码>。

注意——制定<条码>includeemptydirs 在使用删除任务的文件时,真的会排除任何空洞的名录。 名录若无<>任何<><>>>> > 文档,则仅视为空档。 换言之,包含一个称为“htaccess”的档案的目录将不予删除,但那些有“htaccess”档案的目录将不予删除,希望能满足你们的需要。

问题回答

暂无回答




相关问题
Elegant way building url request with parameters

There must me a more elegant way to build a URL with parameters in .NET then for example Response.Write("<a href=HeadOfMarketView.aspx"+Session["HOM"] != null ? Session["HOM"]+">Head of Market&...

buildforge problem

when i tried to run the job i am getting the error saying that No server could be found matching all conditions please any one help me on this

您能否防止MSBuild.exe经营活动?

我用文字建造一些项目,偶尔利用习俗制造事件,给建筑系统造成了很大困难。 如果有可能,我想援引MSBuild.exe。

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Keyboard shortcut to build only startup project?

I ve tried to find a keyboard shortcut to build only the startup project In VS2008. I only found a configurable shortcut to build the project which is currently viewed, which isn t as good. Any ...

Dependency bundle (jar-files/sources/API docs) in Eclipse

I m developing various in-house extensions for JIRA, the issue tracker we use. So far I worked with Netbeans and everything worked like a charm. However, now I need to switch to Eclipse and I m ...

How to link to a static library in C?

I use code::blocks to compile my static library. The output result is a libstatic.a file. Now, how do I link to my library to use functions that were compiled? (I tried to use #include "libstatic.a"...

热门标签