自己编了一个build.xml对于不喜欢IDE的人来说挺好的

来源:百度文库 编辑:神马文学网 时间:2024/04/29 18:39:27
2005-8-2
build.xml

























 Compile all Java files"/>
 Runs JUnit tests"/>
 Runs jWebUnit tests in a running container"/>
 Starts Tomcat to run jWebUnit tests"/>
 Runs all JUnit and jWebUnit tests"/>

 Package as WAR file"/>
 Deploy application as directory"/>
 Deploy application as a WAR file"/>

 Install application in Tomcat"/>
 Remove application from Tomcat"/>
 Reload application in Tomcat"/>
 Start Tomcat application"/>
 Stop Tomcat application"/>
 List Tomcat applications"/>

 Deletes compiled classes and WAR"/>
 Creates a new project"/>



deprecation="false" failonerror="true">





deprecation="false" failonerror="true">














message="Please copy web/WEB-INF/lib/junit.jar into ${env.ANT_HOME}/lib"/>

errorProperty="test.failed" failureProperty="test.failed">
























Unit tests failed. For error messages, check the log files in
${test.dir}/data or run "ant test-reports"
to generate reports at ${test.dir}/reports.

description="Runs jWebUnit tests in a running server">



description="Starts Tomcat, runs jWebUnit tests, stops Tomcat">

output="${test.dir}/cargo.log" action="start" >








description="Runs JUnit tests and starts Tomcat to run jWebUnit tests"/>






















webxml="${web.dir}/WEB-INF/web.xml" compress="true">













preservelastmodified="true">




file="${dist.dir}/${webapp.name}.war"/>











depends="war">
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${webapp.name}"
war="file:${dist.dir}/${webapp.name}.war"/>


username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${webapp.name}"/>


username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${webapp.name}"/>


username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${webapp.name}"/>


username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${webapp.name}"/>


username="${tomcat.manager.username}"
password="${tomcat.manager.password}"/>


description="create zip and tar.gz of ${webapp.name} for distribution">
value="${webapp.name}-${webapp.version}"/>






















prefix="${webapp.name}"
username="ant" group="ant">







description="Graphical Database Editing Tool (hsqldb-gui)">
Opening HSQL GUI...
failonerror="true">








userid="${jdbc.username}" password="${jdbc.password}">

INSERT INTO app_user (id, first_name, last_name)
values (5, ‘Julie‘, ‘Raible‘);
INSERT INTO app_user (id, first_name, last_name)
values (6, ‘Abbie‘, ‘Raible‘);



description="creates a new project with the specified name">
Please specify an app.name using -Dapp.name=NAME
Creating new application named ‘${app.name}‘...

































Running fixcrlf....
includes="**/*.sh,
**/*.properties,
**/*.sql,
**/*.java,
**/*.jsp,
**/*.ftl,
**/*.vm,
**/*.xml,
**/*.page,
**/*.html"/>