- 浏览: 142581 次
- 性别:
- 来自: 厦门
-
最新评论
-
占星:
<table class="bbcode&qu ...
hibernate结合spring怎么处理对象的延迟加载? -
accphc:
...
处理properties文件中key包含空格和等号的情况 -
赵武艺:
有没有办法不让jfreechart热点刷新页面?
有热点的JfreeChart柱型图(原创)[转] -
yuchensuifeng:
谢谢分享!刚学这个,现在去试试!
在struts2中使用JFreeChart -
wrrwhn:
Caused by: There is no result t ...
在struts2中使用JFreeChart
最近电脑系统有些问题,硬盘全部被格式化,原来的所有文件都没有了,最近想研究一下struts2,但是要用ant来继承部署webapp,却忘了如何来配置,只好重新查资料编写,现在把它记载下来,方便以后使用。
build.xml
同时上传一个blank的war包,供大家下载使用。。
build.xml
<?xml version="1.0" encoding="UTF-8"?> <project name="HelloStruts2" basedir="." default=""> <property name="webapp.name" value="myweb" /> <property name="webapp.src.dir" value="src" /> <property name="webapp.lib.dir" value="lib" /> <property name="webapp.web.dir" value="WebRoot" /> <property name="webapp.test.dir" value="test" /> <property name="webapp.config.dir" value="config" /> <property name="build.dir" value="build" /> <property name="build.dist.dir" value="${build.dir}/dist" /> <property name="build.dist.web.dir" value="${build.dist.dir}/web" /> <property name="build.dist.lib.dir" value="${build.dist.dir}/lib" /> <property name="build.dist.config.dir" value="${build.dist.dir}/config" /> <property name="build.dist.classes.dir" value="${build.dist.dir}/classes" /> <property name="app.host" value="localhost" /> <property name="app.port" value="8080" /> <property name="tomcat.home" value="../apache-tomcat-6.0.10" /> <property name="tomcat.manager.url" value="http://${app.host}:${app.port}/manager" /> <property name="tomcat.manager.username" value="admin" /> <property name="tomcat.manager.password" value="" /> <path id="master-classpath"> <fileset dir="${webapp.lib.dir}"> <include name="**/*.jar" /> </fileset> <pathelement path="${build.dist.classes.dir}" /> </path> <path id="tomcat-classpath"> <fileset file="${tomcat.home}/lib/*.jar" /> </path> <target name="-clean.build.dist.dir"> <delete dir="${build.dist.dir}" /> </target> <target name="-clean.tomcat.work.and.logs"> <delete dir="${tomcat.home}/logs" /> <delete dir="${tomcat.home}/work" /> </target> <target name="-clean.webapp.in.tomcat.webapps"> <delete dir="${tomcat.home}/webapps/${webapp.name}" /> <delete file="${tomcat.home}/webapps/${webapp.name}.war" /> </target> <target name="-make.build.dist.dir"> <mkdir dir="${build.dist.web.dir}" /> <mkdir dir="${build.dist.lib.dir}" /> <mkdir dir="${build.dist.config.dir}" /> <mkdir dir="${build.dist.classes.dir}" /> </target> <target name="-clean.build.and.init" depends="-clean.build.dist.dir, -make.build.dist.dir" /> <target name="-clean.tomcat.webapps" depends="-clean.tomcat.work.and.logs, -clean.webapp.in.tomcat.webapps" /> <target name="-compile.classes"> <javac srcdir="${webapp.src.dir}" destdir="${build.dist.classes.dir}" encoding="UTF-8" source="1.6" fork="true"> <classpath refid="master-classpath" /> <compilerarg value="-Xlint:unchecked" /> </javac> </target> <target name="-compile.config"> <native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/common" includes="*.native" ext=".properties" /> <native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/spring" includes="*.native" ext=".properties" /> <native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/struts2" includes="*.native" ext=".properties" /> <copy todir="${build.dist.config.dir}" overwrite="true"> <fileset dir="${webapp.config.dir}/common"> <exclude name="*.native" /> <include name="*.properties" /> <include name="*.xml" /> </fileset> <fileset dir="${webapp.config.dir}/spring"> <exclude name="*.native" /> <include name="*.properties" /> <include name="*.xml" /> </fileset> <fileset dir="${webapp.config.dir}/struts2"> <exclude name="*.native" /> <include name="*.properties" /> <include name="*.xml" /> </fileset> <fileset dir="${webapp.src.dir}"> <include name="**/*.xml" /> </fileset> </copy> </target> <target name="-compile" depends="-compile.classes, -compile.config" /> <target name="-build.webapp.war"> <copy todir="${build.dist.lib.dir}" overwrite="true"> <fileset dir="${webapp.lib.dir}/struts2" /> </copy> <copy todir="${build.dist.web.dir}" overwrite="true"> <fileset dir="${webapp.web.dir}" /> </copy> <copy todir="${build.dist.classes.dir}" overwrite="true"> <fileset dir="${build.dist.config.dir}" /> </copy> <war destfile="${build.dist.dir}/${webapp.name}.war" webxml="${build.dist.web.dir}/WEB-INF/web.xml"> <fileset dir="${build.dist.web.dir}" /> <lib dir="${build.dist.lib.dir}" /> <classes dir="${build.dist.classes.dir}" /> </war> </target> <target name="copy.war.to.tomcat" depends="-clean.build.and.init, -compile, -clean.webapp.in.tomcat.webapps, -build.webapp.war" description="copy to tomcat"> <copy todir="${tomcat.home}/webapps" overwrite="true"> <fileset file="${build.dist.dir}/${webapp.name}.war" /> </copy> </target> <taskdef name="webapp.deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="tomcat-classpath" /> <taskdef name="webapp.undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="tomcat-classpath" /> <target name="-webapp.install"> <webapp.deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${webapp.name}" war="${build.dist.dir}/${webapp.name}.war" /> </target> <target name="webapp.reinstall" depends="stop.tomcat, -clean.build.and.init, -compile, -clean.tomcat.webapps, start.tomcat, -build.webapp.war, -webapp.install" description="webapp reinstall" /> <!-- ============================================================== --> <!-- Tomcat tasks - remove these if you don't have Tomcat installed --> <!-- ============================================================== --> <!-- start tomcat with bootstrap.jar--> <property name="catalina.java.home" value="${java.home}" /> <property name="catalina.home" value="${tomcat.home}" /> <property name="catalina.base" value="${catalina.home}" /> <property name="catalina.tmpdir" value="${catalina.base}/temp" /> <property name="jpda.address" value="8000" /> <path id="java.classpath"> <pathelement location="${catalina.java.home}/../lib/tools.jar" /> </path> <path id="catalina.classpath"> <pathelement location="${catalina.home}/bin/bootstrap.jar" /> <pathelement location="${catalina.home}/bin/commons-logging-api.jar" /> </path> <target name="start.tomcat" description="start tomcat by bootstrap.jar"> <echo message="Starting Tomcat server" /> <echo message="Using CATALINA_BASE: ${catalina.base}" /> <echo message="Using CATALINA_HOME: ${catalina.home}" /> <java classname="org.apache.catalina.startup.Bootstrap" spawn="yes" fork="true"> <jvmarg value="-Dcatalina.home=${catalina.home}" /> <classpath> <path refid="java.classpath" /> <path refid="catalina.classpath" /> </classpath> <arg value="start" /> </java> </target> <target name="start.tomcat.debug" description="start tomcat by bootstrap.jar"> <echo message="Starting Tomcat server" /> <echo message="Using CATALINA_BASE: ${catalina.base}" /> <echo message="Using CATALINA_HOME: ${catalina.home}" /> <java classname="org.apache.catalina.startup.Bootstrap" spawn="no" fork="true"> <jvmarg value="-Dcatalina.home=${catalina.home}" /> <jvmarg value="-Xdebug" /> <jvmarg value="-Xnoagent" /> <jvmarg value="-Djava.compiler=none" /> <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${jpda.address}" /> <classpath> <path refid="java.classpath" /> <path refid="catalina.classpath" /> </classpath> </java> </target> <target name="stop.tomcat" description="stop tomcat by bootstrap.jar"> <echo message="Stopping Tomcat server" /> <echo message="Using CATALINA_BASE: ${catalina.base}" /> <echo message="Using CATALINA_HOME: ${catalina.home}" /> <java classname="org.apache.catalina.startup.Bootstrap" spawn="yes" fork="true" failonerror="false"> <classpath> <path refid="java.classpath" /> <path refid="catalina.classpath" /> </classpath> <jvmarg value="-Dcatalina.home=${catalina.home}" /> <arg value="stop" /> </java> </target> </project>
同时上传一个blank的war包,供大家下载使用。。
- HelloStruts2.rar (4.4 KB)
- 描述: 关于Struts2的helloworld
- 下载次数: 76
评论
3 楼
liyanboss
2007-04-25
,怎么使用呀,偶不会呀,请指教!!!!
2 楼
liyanboss
2007-04-25
怎么发的bulid.xml格式不对,重发一个。
<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloStruts2" basedir="." default="">
<property name="webapp.name" value="myweb" />
<property name="webapp.src.dir" value="src" />
<property name="webapp.lib.dir" value="lib" />
<property name="webapp.web.dir" value="WebRoot" />
<property name="webapp.test.dir" value="test" />
<property name="webapp.config.dir" value="config" />
<property name="build.dir" value="build" />
<property name="build.dist.dir" value="${build.dir}/dist" />
<property name="build.dist.web.dir" value="${build.dist.dir}/web" />
<property name="build.dist.lib.dir" value="${build.dist.dir}/lib" />
<property name="build.dist.config.dir" value="${build.dist.dir}/config" />
<property name="build.dist.classes.dir" value="${build.dist.dir}/classes" />
<property name="app.host" value="localhost" />
<property name="app.port" value="8080" />
<property name="tomcat.home" value="../apache-tomcat-6.0.10" />
<property name="tomcat.manager.url" value="http://${app.host}:${app.port}/manager" />
<property name="tomcat.manager.username" value="admin" />
<property name="tomcat.manager.password" value="" />
<path id="master-classpath">
<fileset dir="${webapp.lib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${build.dist.classes.dir}" />
</path>
<path id="tomcat-classpath">
<fileset file="${tomcat.home}/lib/*.jar" />
</path>
<target name="-clean.build.dist.dir">
<delete dir="${build.dist.dir}" />
</target>
<target name="-clean.tomcat.work.and.logs">
<delete dir="${tomcat.home}/logs" />
<delete dir="${tomcat.home}/work" />
</target>
<target name="-clean.webapp.in.tomcat.webapps">
<delete dir="${tomcat.home}/webapps/${webapp.name}" />
<delete file="${tomcat.home}/webapps/${webapp.name}.war" />
</target>
<target name="-make.build.dist.dir">
<mkdir dir="${build.dist.web.dir}" />
<mkdir dir="${build.dist.lib.dir}" />
<mkdir dir="${build.dist.config.dir}" />
<mkdir dir="${build.dist.classes.dir}" />
</target>
<target name="-clean.build.and.init" depends="-clean.build.dist.dir, -make.build.dist.dir" />
<target name="-clean.tomcat.webapps" depends="-clean.tomcat.work.and.logs, -clean.webapp.in.tomcat.webapps" />
<target name="-compile.classes">
<javac srcdir="${webapp.src.dir}" destdir="${build.dist.classes.dir}" encoding="UTF-8" source="1.6" fork="true">
<classpath refid="master-classpath" />
<compilerarg value="-Xlint:unchecked" />
</javac>
</target>
<target name="-compile.config">
<native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/common" includes="*.native" ext=".properties" />
<native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/spring" includes="*.native" ext=".properties" />
<native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/struts2" includes="*.native" ext=".properties" />
<copy todir="${build.dist.config.dir}" overwrite="true">
<fileset dir="${webapp.config.dir}/common">
<exclude name="*.native" />
<include name="*.properties" />
<include name="*.xml" />
</fileset>
<fileset dir="${webapp.config.dir}/spring">
<exclude name="*.native" />
<include name="*.properties" />
<include name="*.xml" />
</fileset>
<fileset dir="${webapp.config.dir}/struts2">
<exclude name="*.native" />
<include name="*.properties" />
<include name="*.xml" />
</fileset>
<fileset dir="${webapp.src.dir}">
<include name="**/*.xml" />
</fileset>
</copy>
</target>
<target name="-compile" depends="-compile.classes, -compile.config" />
<target name="-build.webapp.war">
<copy todir="${build.dist.lib.dir}" overwrite="true">
<fileset dir="${webapp.lib.dir}/struts2" />
</copy>
<copy todir="${build.dist.web.dir}" overwrite="true">
<fileset dir="${webapp.web.dir}" />
</copy>
<copy todir="${build.dist.classes.dir}" overwrite="true">
<fileset dir="${build.dist.config.dir}" />
</copy>
<war destfile="${build.dist.dir}/${webapp.name}.war" webxml="${build.dist.web.dir}/WEB-INF/web.xml">
<fileset dir="${build.dist.web.dir}" />
<lib dir="${build.dist.lib.dir}" />
<classes dir="${build.dist.classes.dir}" />
</war>
</target>
<target name="copy.war.to.tomcat" depends="-clean.build.and.init, -compile, -clean.webapp.in.tomcat.webapps, -build.webapp.war" description="copy to tomcat">
<copy todir="${tomcat.home}/webapps" overwrite="true">
<fileset file="${build.dist.dir}/${webapp.name}.war" />
</copy>
</target>
<taskdef name="webapp.deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="tomcat-classpath" />
<taskdef name="webapp.undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="tomcat-classpath" />
<target name="-webapp.install">
<webapp.deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${webapp.name}" war="${build.dist.dir}/${webapp.name}.war" />
</target>
<target name="webapp.reinstall" depends="stop.tomcat, -clean.build.and.init, -compile, -clean.tomcat.webapps, start.tomcat, -build.webapp.war, -webapp.install" description="webapp reinstall" />
<!-- ============================================================== -->
<!-- Tomcat tasks - remove these if you don't have Tomcat installed -->
<!-- ============================================================== -->
<!-- start tomcat with bootstrap.jar-->
<property name="catalina.java.home" value="${java.home}" />
<property name="catalina.home" value="${tomcat.home}" />
<property name="catalina.base" value="${catalina.home}" />
<property name="catalina.tmpdir" value="${catalina.base}/temp" />
<property name="jpda.address" value="8000" />
<path id="java.classpath">
<pathelement location="${catalina.java.home}/../lib/tools.jar" />
</path>
<path id="catalina.classpath">
<pathelement location="${catalina.home}/bin/bootstrap.jar" />
<pathelement location="${catalina.home}/bin/commons-logging-api.jar" />
</path>
<target name="start.tomcat" description="start tomcat by bootstrap.jar">
<echo message="Starting Tomcat server" />
<echo message="Using CATALINA_BASE: ${catalina.base}" />
<echo message="Using CATALINA_HOME: ${catalina.home}" />
<java classname="org.apache.catalina.startup.Bootstrap" spawn="yes" fork="true">
<jvmarg value="-Dcatalina.home=${catalina.home}" />
<classpath>
<path refid="java.classpath" />
<path refid="catalina.classpath" />
</classpath>
<arg value="start" />
</java>
</target>
<target name="start.tomcat.debug" description="start tomcat by bootstrap.jar">
<echo message="Starting Tomcat server" />
<echo message="Using CATALINA_BASE: ${catalina.base}" />
<echo message="Using CATALINA_HOME: ${catalina.home}" />
<java classname="org.apache.catalina.startup.Bootstrap" spawn="no" fork="true">
<jvmarg value="-Dcatalina.home=${catalina.home}" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xnoagent" />
<jvmarg value="-Djava.compiler=none" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${jpda.address}" />
<classpath>
<path refid="java.classpath" />
<path refid="catalina.classpath" />
</classpath>
</java>
</target>
<target name="stop.tomcat" description="stop tomcat by bootstrap.jar">
<echo message="Stopping Tomcat server" />
<echo message="Using CATALINA_BASE: ${catalina.base}" />
<echo message="Using CATALINA_HOME: ${catalina.home}" />
<java classname="org.apache.catalina.startup.Bootstrap" spawn="yes" fork="true" failonerror="false">
<classpath>
<path refid="java.classpath" />
<path refid="catalina.classpath" />
</classpath>
<jvmarg value="-Dcatalina.home=${catalina.home}" />
<arg value="stop" />
</java>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloStruts2" basedir="." default="">
<property name="webapp.name" value="myweb" />
<property name="webapp.src.dir" value="src" />
<property name="webapp.lib.dir" value="lib" />
<property name="webapp.web.dir" value="WebRoot" />
<property name="webapp.test.dir" value="test" />
<property name="webapp.config.dir" value="config" />
<property name="build.dir" value="build" />
<property name="build.dist.dir" value="${build.dir}/dist" />
<property name="build.dist.web.dir" value="${build.dist.dir}/web" />
<property name="build.dist.lib.dir" value="${build.dist.dir}/lib" />
<property name="build.dist.config.dir" value="${build.dist.dir}/config" />
<property name="build.dist.classes.dir" value="${build.dist.dir}/classes" />
<property name="app.host" value="localhost" />
<property name="app.port" value="8080" />
<property name="tomcat.home" value="../apache-tomcat-6.0.10" />
<property name="tomcat.manager.url" value="http://${app.host}:${app.port}/manager" />
<property name="tomcat.manager.username" value="admin" />
<property name="tomcat.manager.password" value="" />
<path id="master-classpath">
<fileset dir="${webapp.lib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${build.dist.classes.dir}" />
</path>
<path id="tomcat-classpath">
<fileset file="${tomcat.home}/lib/*.jar" />
</path>
<target name="-clean.build.dist.dir">
<delete dir="${build.dist.dir}" />
</target>
<target name="-clean.tomcat.work.and.logs">
<delete dir="${tomcat.home}/logs" />
<delete dir="${tomcat.home}/work" />
</target>
<target name="-clean.webapp.in.tomcat.webapps">
<delete dir="${tomcat.home}/webapps/${webapp.name}" />
<delete file="${tomcat.home}/webapps/${webapp.name}.war" />
</target>
<target name="-make.build.dist.dir">
<mkdir dir="${build.dist.web.dir}" />
<mkdir dir="${build.dist.lib.dir}" />
<mkdir dir="${build.dist.config.dir}" />
<mkdir dir="${build.dist.classes.dir}" />
</target>
<target name="-clean.build.and.init" depends="-clean.build.dist.dir, -make.build.dist.dir" />
<target name="-clean.tomcat.webapps" depends="-clean.tomcat.work.and.logs, -clean.webapp.in.tomcat.webapps" />
<target name="-compile.classes">
<javac srcdir="${webapp.src.dir}" destdir="${build.dist.classes.dir}" encoding="UTF-8" source="1.6" fork="true">
<classpath refid="master-classpath" />
<compilerarg value="-Xlint:unchecked" />
</javac>
</target>
<target name="-compile.config">
<native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/common" includes="*.native" ext=".properties" />
<native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/spring" includes="*.native" ext=".properties" />
<native2ascii encoding="UTF-8" dest="${build.dist.config.dir}" src="${webapp.config.dir}/struts2" includes="*.native" ext=".properties" />
<copy todir="${build.dist.config.dir}" overwrite="true">
<fileset dir="${webapp.config.dir}/common">
<exclude name="*.native" />
<include name="*.properties" />
<include name="*.xml" />
</fileset>
<fileset dir="${webapp.config.dir}/spring">
<exclude name="*.native" />
<include name="*.properties" />
<include name="*.xml" />
</fileset>
<fileset dir="${webapp.config.dir}/struts2">
<exclude name="*.native" />
<include name="*.properties" />
<include name="*.xml" />
</fileset>
<fileset dir="${webapp.src.dir}">
<include name="**/*.xml" />
</fileset>
</copy>
</target>
<target name="-compile" depends="-compile.classes, -compile.config" />
<target name="-build.webapp.war">
<copy todir="${build.dist.lib.dir}" overwrite="true">
<fileset dir="${webapp.lib.dir}/struts2" />
</copy>
<copy todir="${build.dist.web.dir}" overwrite="true">
<fileset dir="${webapp.web.dir}" />
</copy>
<copy todir="${build.dist.classes.dir}" overwrite="true">
<fileset dir="${build.dist.config.dir}" />
</copy>
<war destfile="${build.dist.dir}/${webapp.name}.war" webxml="${build.dist.web.dir}/WEB-INF/web.xml">
<fileset dir="${build.dist.web.dir}" />
<lib dir="${build.dist.lib.dir}" />
<classes dir="${build.dist.classes.dir}" />
</war>
</target>
<target name="copy.war.to.tomcat" depends="-clean.build.and.init, -compile, -clean.webapp.in.tomcat.webapps, -build.webapp.war" description="copy to tomcat">
<copy todir="${tomcat.home}/webapps" overwrite="true">
<fileset file="${build.dist.dir}/${webapp.name}.war" />
</copy>
</target>
<taskdef name="webapp.deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="tomcat-classpath" />
<taskdef name="webapp.undeploy" classname="org.apache.catalina.ant.UndeployTask" classpathref="tomcat-classpath" />
<target name="-webapp.install">
<webapp.deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${webapp.name}" war="${build.dist.dir}/${webapp.name}.war" />
</target>
<target name="webapp.reinstall" depends="stop.tomcat, -clean.build.and.init, -compile, -clean.tomcat.webapps, start.tomcat, -build.webapp.war, -webapp.install" description="webapp reinstall" />
<!-- ============================================================== -->
<!-- Tomcat tasks - remove these if you don't have Tomcat installed -->
<!-- ============================================================== -->
<!-- start tomcat with bootstrap.jar-->
<property name="catalina.java.home" value="${java.home}" />
<property name="catalina.home" value="${tomcat.home}" />
<property name="catalina.base" value="${catalina.home}" />
<property name="catalina.tmpdir" value="${catalina.base}/temp" />
<property name="jpda.address" value="8000" />
<path id="java.classpath">
<pathelement location="${catalina.java.home}/../lib/tools.jar" />
</path>
<path id="catalina.classpath">
<pathelement location="${catalina.home}/bin/bootstrap.jar" />
<pathelement location="${catalina.home}/bin/commons-logging-api.jar" />
</path>
<target name="start.tomcat" description="start tomcat by bootstrap.jar">
<echo message="Starting Tomcat server" />
<echo message="Using CATALINA_BASE: ${catalina.base}" />
<echo message="Using CATALINA_HOME: ${catalina.home}" />
<java classname="org.apache.catalina.startup.Bootstrap" spawn="yes" fork="true">
<jvmarg value="-Dcatalina.home=${catalina.home}" />
<classpath>
<path refid="java.classpath" />
<path refid="catalina.classpath" />
</classpath>
<arg value="start" />
</java>
</target>
<target name="start.tomcat.debug" description="start tomcat by bootstrap.jar">
<echo message="Starting Tomcat server" />
<echo message="Using CATALINA_BASE: ${catalina.base}" />
<echo message="Using CATALINA_HOME: ${catalina.home}" />
<java classname="org.apache.catalina.startup.Bootstrap" spawn="no" fork="true">
<jvmarg value="-Dcatalina.home=${catalina.home}" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xnoagent" />
<jvmarg value="-Djava.compiler=none" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${jpda.address}" />
<classpath>
<path refid="java.classpath" />
<path refid="catalina.classpath" />
</classpath>
</java>
</target>
<target name="stop.tomcat" description="stop tomcat by bootstrap.jar">
<echo message="Stopping Tomcat server" />
<echo message="Using CATALINA_BASE: ${catalina.base}" />
<echo message="Using CATALINA_HOME: ${catalina.home}" />
<java classname="org.apache.catalina.startup.Bootstrap" spawn="yes" fork="true" failonerror="false">
<classpath>
<path refid="java.classpath" />
<path refid="catalina.classpath" />
</classpath>
<jvmarg value="-Dcatalina.home=${catalina.home}" />
<arg value="stop" />
</java>
</target>
</project>
1 楼
rainlife
2007-04-25
大哥,用来格式化一下代码吧,密密麻麻的,看得头晕。
发表评论
-
Subversion的安装配置
2008-08-06 10:15 2522Subversion是很好用的版本控制工具,以前自己也动手安装 ... -
处理properties文件中key包含空格和等号的情况
2008-06-12 16:11 14245在properties文件中都是以key=value的方式存储 ... -
mysql修改root密码
2008-05-07 10:20 2896mysql 更改密码如下(本人刚刚测试过的RH9.0): 在 ... -
tomcat的OutOfMemoryError解决方法
2008-05-04 14:54 6048最近在熟悉一个开发了有几年的项目,需要把数据库从mysql移植 ... -
使用ant执行sql脚本重建oracle数据库
2008-04-21 17:26 5937最近工作中,需要把之前的产品(基于mysql数据库的)转换到o ... -
struts2+spring2+hibernate3 Annotation的整合
2008-04-16 15:22 6793继续前两篇文章[在struts2中使用JFreeChart ] ... -
在struts2中使用JFreeChart
2008-04-10 14:33 14344继续上一篇的 在struts2中使用JasperReports ... -
在struts2中使用JasperReports
2008-04-09 10:49 6036最近工作中要求可以把网页信息以报表的形式输出,虽然以前有接触过 ... -
有热点的JfreeChart柱型图(原创)[转]
2008-04-07 11:04 3666实现方式:jsp+javabean 版本 :jfreecha ... -
hibernate结合spring怎么处理对象的延迟加载?
2008-01-23 13:01 2323在hibernate3中所有从数据库查询出来的数据,都是默认l ... -
自定义类型安全的枚举
2008-01-18 13:09 1469package com.goodhope.tradingapp ... -
基于spring,acegi,jcaptcha的验证码
2008-01-17 10:37 2040首先,在你的web.xml里加入过滤器"Acegi ... -
已有字数:4,剩余字数:196
2008-01-15 19:57 1494function CountNodeNum(Obj) { ... -
spring mail sender
2008-01-13 18:23 1307import java.util.Properties; i ... -
eclipse反编译插件Jadclipse的使用
2007-06-13 17:56 4016jadclips插件网站: http://jadcli ... -
使用keytool生成SSL双向认证
2007-01-25 08:32 4265Microsoft Windows XP [版本 5.1.26 ...
相关推荐
Ant支持定义和使用属性,它们允许在`build.xml`中存储和复用值。例如,`<property name="src.dir" value="src"/>`定义了一个名为`src.dir`的属性,其值为`src`。 7. **文件集(Filesets)** 文件集允许你指定一组...
Apache Ant 是一个广泛使用的Java构建工具,它以XML格式定义构建脚本,即`build.xml`文件。这个文件包含了构建项目的整个流程,从编译源代码到生成最终的可执行或部署包。下面我们将深入探讨`build.xml`的使用以及...
Ant是基于XML的,它的核心在于`build.xml`文件,这个文件是项目的构建脚本,详细定义了构建过程中的各种任务和依赖关系。 标题“一个常用的ant的build.xml”暗示了我们讨论的是一个标准且常见的Ant构建配置文件。...
《Ant的build.xml模板详解与应用》 在软件开发领域,构建工具是不可或缺的一部分,它帮助开发者自动化地完成编译、测试、打包等任务。Apache Ant作为Java领域的一款经典构建工具,以其灵活性和强大的功能深受广大...
Ant 的构建文件是 XML 格式的文件,定义了构建过程,并被团队开发中每个人使用。构建文件默认命名为 build.xml,也可以取其他的名字。 Ant 构建文件的基本结构包括: 1. `<project>`标签:每个构建文件对应一个...
《Ant build.xml构建详解》 在软件开发过程中,构建工具起着至关重要的作用,它能够自动化执行编译、测试、打包等任务。Apache Ant是Java领域广泛应用的一个构建工具,其核心在于一个名为`build.xml`的配置文件。...
jmeter+ant 持续集成build.xml文件,直接使用ant命令执行jmeter脚本文件,得到图形测试报告
我的开发环境是Eclipse,ant.xml是放在项目下的ant(新建),也可以修改project的basedir.
3. **build.xml文件详解**:`build.xml`是Ant的构建文件,其中包含了一系列的任务和目标。例如,你可以定义一个目标来启动JMeter,另一个目标来生成测试报告,甚至还有一个目标用来发送测试结果的邮件通知。在描述中...
本文将深入探讨在Ant发布项目中的`build.xml`文件配置,帮助开发者理解并掌握如何通过这个核心配置文件来自动化项目的编译、测试、打包和部署流程。 ### 一、`build.xml`文件结构解析 `build.xml`是Ant的核心配置...
"生成ANT所需要的Build.xml文件"这一主题,核心在于如何通过Python程序自动生成ANT的配置文件——build.xml。 首先,我们要理解ANT的build.xml文件。它是ANT的核心,包含了一系列的构建目标和任务。这些目标定义了...
这篇博客文章“ant build.xml例子”可能详细介绍了如何使用Ant来管理Java项目的构建过程。 `build.xml`文件是Ant的核心,它使用XML语法定义了一系列的任务(tasks),这些任务包含了构建过程中的各种操作,如编译源...
下面是一个简单的`build.xml`示例,展示了如何使用Ant构建一个简单的Java项目。 ```xml <project name="MyApp" default="build" basedir="."> <property name="src.dir" value="src"/> <property name="build....
ant +build.xml 文件Jenkins部署javaEE项目,助力成功自动化部署。ant +build.xml 文件Jenkins部署javaEE项目,助力成功自动化部署。ant +build.xml 文件Jenkins部署javaEE项目,助力成功自动化部署。ant +build.xml...
xdoclet 配置文件,可以自动建立hibernate配置文件和mapping文件
Ant 打包 ant 的 build.xml 详解 Ant 是一个流行的自动化构建工具,广泛应用于软件开发和项目自动化构建中。本文将详细介绍 Ant 的环境变量配置和 build.xml 文件的配置详解。 第一步:安装 Apache Ant 在开始...
**ANT-build.xml命令详解** Apache Ant 是一个Java平台上的开源构建工具,它通过XML格式的配置文件(如`build.xml`)来定义构建任务。Ant的设计理念是“简单就是美”,它使得Java项目的构建过程变得可配置且易于...
ant build.xml demo 供自己及好友学习,能很快上手
Ant_build.xml配置实例,Ant的详细配置,很实用
ant打包配置文件,参考了博主的文章,作者:失语失芯不失梦 链接:https://www.jianshu.com/p/04cfce59890a 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。