转载自:http://blog.youkuaiyun.com/dusj/article/details/4956765
<target name="compile" depends="prepare"> <echo message="5.compile" /> <javac fork="true" target="1.6" srcdir="${src}" destdir="${build}" debug="true"> <!--给编译器指定编码,防止出现:"警告: 编码 GBK 的不可映射字符"--> <compilerarg line="-encoding UTF-8 " /> <classpath refid="external.jars.path" /> </javac> <echo message="compile finished!" /> </target>
Ant构建配置
本文介绍了一个使用Ant构建工具的示例配置文件。该配置文件详细展示了如何设置Java编译任务,包括指定源代码目录、目标输出目录、编译参数等。此外,还介绍了如何通过Ant的任务依赖来组织构建流程。
4万+

被折叠的 条评论
为什么被折叠?



