使用 Ant 合并两个 Java 个源文件

Merge two Java source files using Ant

我想使用 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>

这不能正常工作

使用concat task

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