【问题标题】:Merge two Java source files using Ant使用 Ant 合并两个 Java 源文件
【发布时间】:2017-01-13 11:20:45
【问题描述】:

我想使用 Ant 合并两个不同的文件。我该怎么做?

Ex a.java and B.java

<target name="merge">
        <property prefix="app.properties" file="input1.txt" />
        <property prefix="app.properties" file="input2.txt" />
        <echoproperties destfile="output.txt">
           <propertyset>
              <propertyref prefix="app.properties"/>
              <mapper type="glob" from="app.properties.*" to=""/>
           </propertyset>
        </echoproperties>

</target>

这不能正常工作

【问题讨论】:

标签: ant


【解决方案1】:

使用concat task

<concat destfile="output.txt">
  <fileset file="input1.txt" />
  <fileset file="input2.txt" />
</concat>

【讨论】:

    猜你喜欢
    • 2011-06-03
    • 1970-01-01
    • 2013-10-03
    • 1970-01-01
    • 1970-01-01
    • 2012-04-24
    • 2010-10-07
    • 1970-01-01
    • 2016-08-23
    相关资源
    最近更新 更多