第一个项目都要写 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
分享到:
相关推荐
3. **修改 web.xml 文件**:参照 `struts-2.1.8.1\apps\struts2-blank-2.1.8.1\WEB-INF\web.xml` 来更新项目的 `web.xml` 文件。 4. **配置 struts.xml**:修改 `struts.xml` 文件,确保配置正确无误。 5. **测试...
2. **配置BuildPath**:右键点击工程名,选择“Build Path” -> “Configure Build Path”,在“Libraries”选项卡中,利用“Add External JARs”功能添加以下必要的JAR包至工程路径: - commons-fileupload-1.2.1....
#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 //...
4. **更新Build Path**:右键点击项目 -> “Build Path” -> “Configure Build Path”,确保所有的JAR包都被添加到构建路径中。 #### 五、导入约束文件 1. **理解约束文件**:约束文件(DTD文件)定义了Struts2...
6. **CLI工具**:Ionic CLI 提供了丰富的命令行工具,用于创建、构建、运行、测试和打包应用,如`ionic serve`(本地开发服务器)、`ionic build`(构建应用)、`ionic emulate`(模拟器运行)和`ionic upload`...
进入项目属性设置,选择“Java Build Path”->“Libraries”->“Add External JARs”。在打开的文件选择对话框中,导航到之前解压的`struts2-blank-2.1.6.war`的`WEB-INF/lib`目录,选中所有`.jar`文件,点击“打开...
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 ...
如果需要使用Spring和Hibernate,那么仅从struts-2.0.6\apps\struts2-blank-2.0.6\WEB-INF\lib下找到的jar包可能不足以满足需求。 然后,我们需要为项目添加Spring支持。右键点击工程名,选择"MyEclipse" -> "Add ...
另导入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链接,自己...
- **blank.margin.left=0** 和 **blank.margin.right=0**:设置左右空白边距为0。 - **margin.width=16**:定义了行号区域的宽度,这里设为16像素。 - **line.margin.visible=1**:启用行号显示。 - **line.margin....
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 ...
将这些文件添加到你的项目的类路径中,或者如果你使用的是Maven或Gradle,可以在pom.xml或build.gradle文件中添加对应的依赖。 3. **数据库驱动**: 根据你选用的数据库(如MySQL、Oracle、PostgreSQL等),下载相应...