使用ant自动远程部署war包到websphere的build.xml怎么写 使用ant自动远程部署war包到websphere的build.xml怎么写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用ant自动远程部署war包到tomcat的build.xml怎么写(⊙o⊙) 直接部署应该不行,你可以用ant打成war包,上传上去!tomcat到可以,不过也不是远程 首先将你的源码通过ant脚本编译成class,然后按照websphere部署的目录结构要求将那些文件用ant脚本拷贝过去就行了。 你这结贴率不过貌似是同行<?xml version="1.0"?><project name="portal-ext-ext" basedir="." default="deploy"> <import file="../build-common-ext.xml" /> <target name="build-service-portlet-portletshortcut"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/portletshortcut/service.xml" /> </antcall> </target> <target name="build-service-portlet-calendar"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/calendar/service.xml" /> </antcall> </target> <target name="build-service-portlet-task"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/task/service.xml" /> </antcall> </target> <target name="build-service-portlet-polls"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/polls/service.xml" /> </antcall> </target> <target name="build-service-portlet-consulting"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/consulting/service.xml" /> </antcall> </target> <target name="build-service-portlet-menus"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portal/menus/service.xml" /> </antcall> </target> <target name="build-service-portlet-flow"> <antcall target="build-service"> <param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/flow/service.xml" /> </antcall> </target> <target name="build-service-portlets"> <antcall target="build-service-portlet-menus" /> <antcall target="build-service-portlet-flow" /> </target></project>现在的一个项目的build.xml参考参考 LZ参考下:http://blackstreet.iteye.com/blog/423066 <project name="updcusema" default="deploy" basedir="."> <property name="project.dir" value="${basedir}" /> <property name="src.dir" value="${basedir}/src" /> <property name="class.dir" value="${basedir}/build/classes" /> <property name="dist.dir" value="${basedir}/dist" /> <property name="res.dir" value="C:\ibm\WebSphere\profiles\GBGCB\installedApps\APACCNSHZJW0332Node01Cell\GBGCB.ear\GBGCB.war\WEB-INF" /> <property name="web.updcusema.dir" value="C:\ibm\WebSphere\profiles\GBGCB\installedApps\APACCNSHZJW0332Node01Cell\GBGCB.ear\GBGCB.war\WEB-INF\COA\cus\updcusema" /> <property name="jar.dir" value="C:\ibm\WebSphere\profiles\GBGCB\installedApps\APACCNSHZJW0332Node01Cell\GBGCB.ear\GBGCB.war\WEB-INF\lib" /> <path id="project.class.path"> <fileset dir="${jar.dir}"> <include name="**/*.jar"/> </fileset> <fileset dir="C:\IBM\WebSphere\AppServer\java\lib"> <include name="**/*.jar"/> </fileset> </path> <target name="compile"> <javac srcdir="${src.dir}" destdir="${class.dir}" debug="on"> <include name="**/*.java" /> <classpath refid="project.class.path"/> </javac> </target> <target name="copyweb"> <copy todir="${web.updcusema.dir}"> <fileset dir="${project.dir}/WebContent/WEB-INF/COA/cus/updcusema"> </fileset> </copy> </target> <target name="compress" depends="compile"> <jar destfile="${dist.dir}/updcusema.jar" basedir="${class.dir}" /> </target> <target name="copyjar" depends="compress"> <copy todir="${jar.dir}"> <fileset dir="${dist.dir}"> </fileset> </copy> </target> <target name="deploy" depends="copyweb,copyjar" /></project>参考 birt服务器的问题 Struts2问题,急!!! 如何生成html文件? 请教一个Hibernate中一对多关系的删除问题 jboss配置问题 如何将spring中的log设置为debug级别 请问如何在Applet中使用XMLEncoder?! Tomcat的启动问题 j2ee开发 请问如何对已存储过程进行调用(高分相送) PreparedStatement使用数据库索引问题 时间相减 问题?不知道怎么回事?请大侠们帮助!
不过貌似是同行
<?xml version="1.0"?><project name="portal-ext-ext" basedir="." default="deploy">
<import file="../build-common-ext.xml" />
<target name="build-service-portlet-portletshortcut">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/portletshortcut/service.xml" />
</antcall>
</target> <target name="build-service-portlet-calendar">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/calendar/service.xml" />
</antcall>
</target> <target name="build-service-portlet-task">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/task/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-polls">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/polls/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-consulting">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/consulting/service.xml" />
</antcall>
</target> <target name="build-service-portlet-menus">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portal/menus/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-flow">
<antcall target="build-service">
<param name="service.file" value="docroot/WEB-INF/ext-impl/src/com/gsoft/portlet/flow/service.xml" />
</antcall>
</target>
<target name="build-service-portlets">
<antcall target="build-service-portlet-menus" />
<antcall target="build-service-portlet-flow" />
</target>
</project>现在的一个项目的build.xml参考参考
http://blackstreet.iteye.com/blog/423066
<project name="updcusema" default="deploy" basedir=".">
<property name="project.dir" value="${basedir}" />
<property name="src.dir" value="${basedir}/src" />
<property name="class.dir" value="${basedir}/build/classes" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="res.dir" value="C:\ibm\WebSphere\profiles\GBGCB\installedApps\APACCNSHZJW0332Node01Cell\GBGCB.ear\GBGCB.war\WEB-INF" />
<property name="web.updcusema.dir" value="C:\ibm\WebSphere\profiles\GBGCB\installedApps\APACCNSHZJW0332Node01Cell\GBGCB.ear\GBGCB.war\WEB-INF\COA\cus\updcusema" />
<property name="jar.dir" value="C:\ibm\WebSphere\profiles\GBGCB\installedApps\APACCNSHZJW0332Node01Cell\GBGCB.ear\GBGCB.war\WEB-INF\lib" /> <path id="project.class.path">
<fileset dir="${jar.dir}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="C:\IBM\WebSphere\AppServer\java\lib">
<include name="**/*.jar"/>
</fileset>
</path> <target name="compile">
<javac srcdir="${src.dir}" destdir="${class.dir}" debug="on">
<include name="**/*.java" />
<classpath refid="project.class.path"/>
</javac>
</target> <target name="copyweb">
<copy todir="${web.updcusema.dir}">
<fileset dir="${project.dir}/WebContent/WEB-INF/COA/cus/updcusema">
</fileset>
</copy>
</target>
<target name="compress" depends="compile">
<jar destfile="${dist.dir}/updcusema.jar" basedir="${class.dir}" />
</target>
<target name="copyjar" depends="compress">
<copy todir="${jar.dir}">
<fileset dir="${dist.dir}">
</fileset>
</copy>
</target> <target name="deploy" depends="copyweb,copyjar" /></project>参考