ant的build.xml备份
<?xml version="1.0" encoding="UTF-8" ?>
<project default="rerun" name="codex-game">
<!-- project property -->
<property name="lib.dir" value="../third-libs" />
<property name="src.dir" value="src" />
<!--
<property name="core.moniter.dir" value="../dawn-core/moniter" />
<property name="core.src.dir" value="../dawn-core/src" />
<property name="dbs.src.dir" value="../dawn-dbs/src" />
<property name="dbs.test.dir" value="../dawn-dbs/test" />
<property name="logserver.src.dir" value="../logserver/src" />
-->
<property name="deploy.dir" value="deploy" />
<property name="classes.dir" value="deploy/classes" />
<property name="jarname" value="codex-game.jar" />
<property name="mainclass" value="com.mop.game.gameserver.GameServer" />
<property name="core.jar" value="codex-core/deploy/codex-core.jar" />
<property name="dbs.jar" value="codex-db/deploy/codex-db.jar" />
<property name="battle.jar" value="codex-battle/deploy/codex-battle.jar" />
<property name="log.jar" value="logserver/deploy/logserver.jar" />
<!-- third jar path -->
<path id="lib-classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="../">
<include name="${core.jar}" />
</fileset>
<fileset dir="../">
<include name="${dbs.jar}" />
</fileset>
<fileset dir="../">
<include name="${battle.jar}" />
</fileset>
<fileset dir="../">
<include name="${log.jar}" />
</fileset>
</path>
<!-- 1. init, eg.create path -->
<target name="init">
<mkdir dir="${deploy.dir}" />
<mkdir dir="${classes.dir}" />
</target>
<!-- 2. compile -->
<target name="compile" depends="init">
<javac destdir="${classes.dir}" includeantruntime="on">
<src path="${src.dir}" />
<compilerarg line="-encoding UTF-8" />
<classpath refid="lib-classpath" />
</javac>
</target>
<!-- 3. build jar -->
<target name="build" depends="compile">
<copy todir="${deploy.dir}/lib">
<fileset dir="${lib.dir}" />
<file name="../${core.jar}" />
<file name="../${dbs.jar}" />
<file name="../${battle.jar}" />
<file name="../${log.jar}" />
</copy>
<copy todir="${deploy.dir}">
<fileset dir="../codex-db/resource" />
</copy>
<copy todir="${deploy.dir}">
<fileset dir="resource" />
</copy>
<!--Create a property containing all .jar files, prefix lib/, and seperated with a space-->
<pathconvert property="mf.classpath" pathsep=" ">
<mapper>
<chainedmapper>
<!-- jar包文件只留文件名,去掉目录信息 -->
<flattenmapper />
<!-- add lib/ prefix -->
<globmapper from="*" to="lib/*" />
</chainedmapper>
</mapper>
<path refid="lib-classpath" />
</pathconvert>
<!-- jar文件的输出路径 -->
<jar destfile="${deploy.dir}/${jarname}" basedir="${classes.dir}">
<manifest>
<attribute name="Main-class" value="${mainclass}" />
<attribute name="Class-Path" value="${mf.classpath}" />
</manifest>
</jar>
<delete dir="${classes.dir}" />
</target>
<!-- run -->
<target name="run" depends="build">
<java classname="${mainclass}" classpath="${deploy.dir}/${jarname}" fork="true" failonerror="true">
<classpath>
<pathelement path="${deploy.dir}" />
</classpath>
</java>
</target>
<target name="clean">
<delete file="${deploy.dir}/${jarname}" />
<delete dir="${deploy.dir}/lib" />
<delete dir="${classes.dir}" />
</target>
<target name="rebuild">
<ant target="clean" />
<ant target="build" />
</target>
<target name="rerun">
<!--ant target="clean" /-->
<ant target="run" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project default="rebuild" name="codex-core">
<!-- project property -->
<property name="lib.dir" value="../third-libs" />
<property name="src.dir" value="src" />
<property name="moniter.dir" value="moniter" />
<property name="deploy.dir" value="deploy" />
<property name="classes.dir" value="deploy/classes" />
<property name="jarname" value="codex-core.jar" />
<!-- third jar path -->
<path id="lib-classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- 1. init, eg.create path -->
<target name="init">
<mkdir dir="${deploy.dir}" />
<mkdir dir="${classes.dir}" />
</target>
<!-- 2. compile -->
<target name="compile" depends="init">
<javac destdir="${classes.dir}" includeantruntime="on" debug="on" optimize="true">
<src path="${src.dir}" />
<src path="${moniter.dir}" />
<compilerarg line="-encoding UTF-8" />
<classpath refid="lib-classpath" />
</javac>
</target>
<!-- 3. build jar -->
<target name="build" depends="compile">
<copy todir="${deploy.dir}/lib">
<fileset dir="${lib.dir}" />
</copy>
<!--Create a property containing all .jar files, prefix lib/, and seperated with a space-->
<pathconvert property="mf.classpath" pathsep=" ">
<mapper>
<chainedmapper>
<!-- jar包文件只留文件名,去掉目录信息 -->
<flattenmapper />
<!-- add lib/ prefix -->
<globmapper from="*" to="lib/*" />
</chainedmapper>
</mapper>
<path refid="lib-classpath" />
</pathconvert>
<!-- jar file output -->
<jar destfile="${deploy.dir}/${jarname}" basedir="${classes.dir}">
<manifest>
<attribute name="Class-Path" value="${mf.classpath}" />
</manifest>
</jar>
<delete dir="${deploy.dir}/lib" />
<delete dir="${classes.dir}" />
</target>
<target name="clean">
<delete file="${deploy.dir}/${jarname}" />
<delete dir="${deploy.dir}/lib" />
<delete dir="${classes.dir}" />
</target>
<target name="rebuild">
<ant target="clean" />
<ant target="build" />
</target>
</project>
ant的build.xml备份的更多相关文章
- Ant之build.xml详解---可用
Ant的概念 :在Eclipse中使用Ant Ant是Java平台下非常棒的批处理命令执行程序,能非常方便地自动完成编译,测试,打包,部署等等一系列任务,大大提高开发效率. Ant和make命令很像. ...
- Eclipse 自动生成 Ant的Build.xml 配置文件
Eclipse 自动生成 Ant的Build.xml 配置文件,生成的方法很隐蔽 选择你要生成Build.xml文件的项目,右键. Export-> General -> Ant Buil ...
- Ant之build.xml详解
Ant之build.xml详解 关键字: ant build.xml Ant的概念 可能有些读者并不连接什么是Ant以及入可使用它,但只要使用通过Linux系统得读者,应该知道make这个命令.当编译 ...
- Ant运行build.xml执行服务器scp,异常解决jsch.jar
公司ant打包上线 一直出现这个问题. Ant运行build.xml执行服务器scp,异常解决jsch.jar BUILD FAILEDD:\eclipse\eclipse-jee-luna-SR2- ...
- Ant:build.xml 结构
Ant build.xml 结构 project target task data property datatype v\:* {behavior:url(#default#VML);} o\:* ...
- ANT编译build.xml
一,体验ant就像每个语言都有HelloWorld一样,一个最简单的应用能让人感受一下Ant1,首先你要知道你要干什么,我现在想做的事情是:编写一些程序编译它们把它打包成jar包把他们放在应该放置的地 ...
- java应用测试报告生成(二):利用ant的build.xml生成测试报告
1.将写好的项目导出 在工程下会生成一个build.xml的蚂蚁图标的文件. 2.右击该文件,选择run as Ant build 其中的测试目录是可以选择的,如果涉及到顺序也可以调整顺序 3.执行后 ...
- 【转】Ant之build.xml详解
关键字: ant build.xml Ant的概念 可能有些读者并不连接什么是Ant以及入可使用它,但只要使用通过Linux系统得读者,应该知道make这个命令.当编译Linux内核及一些软件的源程序 ...
- 使用.bat文件运行ant的build.xml
1.新建一个txt文件 2.复制下面命令到txt文件 echo "Start build..." call ant.bat -f "E:\build.xml" ...
随机推荐
- flutter 按钮单选封装
数字是自己先写死的 List list =[ { "title": "影视特效", , }, { "title": "室内设计&q ...
- NtOpenProcess被HOOK,跳回原函数地址后仍然无法看到进程
点击打开链接http://www.ghoffice.com/bbs/read-htm-tid-103923.html
- 用注册表创建无法删除的IE快捷方式
代码如下: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE/SOFTWARE/Classes/CLSID/{98745625-1234 ...
- 微信-小程序-开发文档-服务端-模板消息:templateMessage.send
ylbtech-微信-小程序-开发文档-服务端-模板消息:templateMessage.send 1.返回顶部 1. templateMessage.send 本接口应在服务器端调用,详细说明参见服 ...
- nginx按日分割日志
#!/bin/bash #按日切割nginx日志并压缩,加入crontab每天0:00切割 #作者:fafu_li #时间: source /etc/profile #加载系统环境变量 source ...
- MPU-6000 与 MPU-6050
VLOGIC 是什么呢?
- 最接近神的人_NOI导刊2010提高(02)
题目描述 破解了符文之语,小FF开启了通往地下的道路.当他走到最底层时,发现正前方有一扇巨石门,门上雕刻着一幅古代人进行某种活动的图案.而石门上方用古代文写着“神的殿堂”.小FF猜想里面应该就有王室的 ...
- 2018北京网络赛 G The Mole /// 分块暴力 点线距离
题目大意: 给定n段线段 编号为1~n 接下来m个询问 给定一点 输出离该点最近的线段的最小编号(距离相等时取编号小的) 题解 大致就是 1.坐标范围为(0,2^16-1) 将坐标系划分为2^8*2^ ...
- c++ socket 出现绑定失败的一个特殊原因。Bind failed Error:10049
这个问题,客户那边出现这种情况已经将近一年时间, 一直都得不到很好的解决,我提供出去的动态库可以确保没有问题,因为除了这家公司,其他有好几家公司都在用的,都是很正常的,但是这家公司很奇怪,不,应该说这 ...
- Lunascape:将FireFox、Safari和IE合为一体的浏览器
转自:http://blog.bingo929.com/lunascape-firefox-safari-ie-all-in-one.html 作为前端开发/网页设计师,电脑中总是安装着各种不同内核渲 ...