`
zzzzzz5530041
  • 浏览: 34847 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

在Ecliper中使用Ant实现打包部署

阅读更多
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Test" basedir="." default="deploy">
	<property name="warfile" value="Test" />
	<target name="unpack">
		<unwar src="${warfile}.war" dest="${warfile}" />
	</target>
	<target name="create">
		<war destfile="${warfile}.war" webxml="../WebContent/WEB-INF/web.xml" update="true">
			<classes dir="classes" />
			<fileset dir="../WebContent">
				<exclude name="WEB-INF/web.xml" />
			</fileset>
		</war>
	</target>
	<target name="copy">
		<copy todir="D:\bea\user_projects\domains\Test\applications" overwrite="true">
			<fileset dir=".">
				<include name="*.war" />
			</fileset>
		</copy>
	</target>
	<target name="deploy">
		<antcall target="create" />
		<antcall target="copy" />
	</target>



</project>



写好后直接运行该Ant文件。就会在D:\bea\user_projects\domains\Test\applications生成一个名叫Test.war的文件
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics