第一个项目都要写 build.xml 一些基本的东西先写好
<?xml version="1.0" encoding="UTF-8"?>
<project name="jsp-svn" default="init">
<property file="build.properties" />
<property name="src.java.dir" value="src" />
<property name="src.test.dir" value="test" />
<property name="build.java.dir" value="build/classes/java" />
<property name="build.test.dir" value="build/classes/test" />
<property name="build.classes.dir" value="build/classes" />
<property name="test.docxml.dir" value="doc/test/xml" />
<property name="test.reports.dir" value="doc/test/reports" />
<property name="web.root" value="WebContent" />
<!-- 定义类路径 -->
<path id="project.classpath">
<fileset dir="${web.root}/WEB-INF/lib">
<include name="*.jar" />
</fileset>
<pathelement location="${build.java.dir}" />
<pathelement location="${build.test.dir}" />
<pathelement location="${junit.jar}" />
</path>
<target name="init">
<mkdir dir="${build.java.dir}" />
<mkdir dir="${build.test.dir}" />
</target>
<target name="compile.java" depends="init">
<mkdir dir="${build.java.dir}" />
<javac destdir="${build.java.dir}">
<src path="${src.java.dir}" />
<classpath refid="project.classpath">
</classpath>
</javac>
</target>
<target name="compile.test" depends="compile.java">
<mkdir dir="${build.test.dir}" />
<javac destdir="${build.test.dir}">
<src path="${src.test.dir}" />
<classpath refid="project.classpath" />
</javac>
</target>
<target name="compile" depends="compile.java,compile.test">
</target>
<target name="build.java" depends="compile.java">
<copy todir="${build.java.dir}" preservelastmodified="true">
<fileset dir="${src.java.dir}">
<include name="**/*.*" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="build.test" depends="compile.test">
</target>
<target name="build" depends="build.java,build.test" />
<target name="deploy" depends="build.java">
</target>
<target name="test" depends="build">
<mkdir dir="${test.docxml.dir}" />
<mkdir dir="${test.reports.dir}" />
<junit haltonfailure="yes" fork="yes">
<formatter type="plain" usefile="false" />
<formatter type="xml" />
<test name="example.ExampleTest" todir="${test.docxml.dir}">
</test>
<classpath refid="project.classpath" />
</junit>
<junitreport todir="${test.docxml.dir}">
<fileset dir="${test.docxml.dir}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${test.reports.dir}" />
</junitreport>
</target>
<target name="schema" depends="build.java">
<taskdef name="schemaexport" classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
<classpath refid="project.classpath" />
</taskdef>
<schemaexport config="${build.java.dir}/hibernate.cfg.xml"
quiet="no" text="true" drop="no" delimiter=";"
output="${build.classes.dir}/${project.name}_db.sql" />
</target>
<target name="clean">
<delete includeEmptyDirs="true">
<fileset dir="${build.classes.dir}">
<include name="**/*.class" />
</fileset>
</delete>
</target>
</project>
build.properties
junit.jar=${eclipse.home}/plugins/org.junit_3.8.1/junit.jar
分享到:
相关推荐
#Maven 文件夹结构 Java-Blank-Setup|- src|- main // all code|- java|- resources|- test // all test code |- java|- resources|- target //contains compiled stuff " mvn clean" deletes this|- pom.xml //...
If you've ever found yourself pulling your hair out trying to build the perfect regular expression to match the least amoun... Remove blank lines A question we often see is "I have a lot of blank ...
另导入common-lib下的jar包,删除jeecms-cms- identity-3.0.2-final.jar,jeecms-common-3.0.2-final.jar ,jeecms-core- identity-3.0.2-final.jar这三个jar包,切记:务必进行build path 3.修改jdbc链接,自己...
EurekaLog 7.5 (18-August-2016) 1)..Important: Installation layout was changed. All packages now have version suffix (e.g. EurekaLogCore240.bpl). No files are copied to \bin folder of IDE....
4 打开build.xml 找到 修改成你自己的tomcat安装目录 找到 修改成如下内容 <taskdef classname="org.apache.catalina.ant.DeployTask"> <classpath refid="compile.classpath"> ...
The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................
go程序设计语言 Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING ...
Removal of make touch build target Notable changes in Python 3.6.5 What’s New In Python 3.5 Summary – Release highlights New Features PEP 492 - Coroutines with async and await syntax PEP 465 - A...
- 增加Auto Append Blank - TGridReport(TwwGridReport)改进,支持颜色,对齐方式.下一版本将支持分组,合计功能. - 下一版本将增加一个组件TFormReport,直接打印Form,类似于Screen Report. v1.0 Preview 2...
+ [enterprise] added property "Scheduler" - "StudioPath" in server configuration - set the path to FastReport Studio, leave blank for default - [enterprise] fixed bug with MIME types in http header ...
- 增加Auto Append Blank - TGridReport(TwwGridReport)改进,支持颜色,对齐方式.下一版本将支持分组,合计功能. - 下一版本将增加一个组件TFormReport,直接打印Form,类似于Screen Report. <br> v...
Users must have msxml.dll version 2.0 for binary compatibility.<END><br>46 , CustEditXML.zip Complete VB application that retrieves customer information from an XML script, allows you to make ...
Fundamentals of the JavaMail API Presented by developerWorks, your source for great tutorials ... Table of Contents If you're viewing this document online, you can click any of the topics below ...