Eclipse中使用Ant远程发布War包
环境:
MyEclipse10.0
jsch-0.1.46.jar-http://www.jcraft.com/jsch/
1.将jsch-0.1.46.jar复制到D:\ProgramFiles\MyEclipse\Common\plugins\org.apache.ant_1.8.2.v20110505-1300\lib目录下;
2.在MyEclipse的window->preferences->ant->runtime->classpath中加入jsch-0.1.46.jar;
3.web工程下建立文件deploy.properties
war=hello #上传ftp服务器的相关参数 server=192.168.0.1 username=root password=root remotedir=/usr/local/tomcat/webapps
和deploy.xml
<?xml version="1.0" encoding="UTF-8"?> <project name="hello" default="ftp" basedir="."> <property file="deploy.properties" /> <target name="ftp"> <scp file="${war}.war" todir="${username}:${password}@${server}:${remotedir}" trust="true"/> </target> </project>
4.导出工程到war包;
deploy.xml-RunAs-AntBuild
相关推荐
dingqinghu 2020-06-16
markzl 2020-04-30
lunareclipse 2020-04-23
zhangxiaocc 2020-04-23
荷塘月色 2020-03-07
xnuzfm 2020-03-07
markzl 2020-03-07
xnuzfm 2020-02-21
熊猫大哥大 2011-06-04
lizhenmxcz 2013-05-12
lunareclipse 2020-01-08
tdeclipse 2011-02-28
程序员超哥 2014-06-26
BruceWayne 2014-06-07
lunareclipse 2019-12-23
A.在myeclise中恢复例子开发环境:1>在myeclipse中新建一个web工程,项目名称自己任意取名,"J2EE Specification Level"一栏选择"J2EE1.4",然后点击"
简单就是美 2013-07-07
eclipsec 2014-01-26
heshizui 2013-09-04