[Home, Previous, Next]
Using Ant allows you to programs that there are countless articles introduced Ant, I will no longer introduce the installation of Ant, configured.
Every friend using Ant has a set of organizations. Now I wrote my way out for your reference, and you will be relieved.
1 directory structure division
Summary: The project directory structure and its description assume that you have a work directory as: / home / camry / work, here is referred to as Work. In order to adapt to multiple projects, I have configured a basic configuration file in Work / Common The directory structure is like this:
Work / Common / | - Build_common.xml # This file contains basic build operations | - Common.xml # This file is build_common.xml configured, | Basically no change. | - Build_tomcat.xml # This file contains Basic operations with Tomcat cooperation. | - Tomcat.xml # This file is build_tomcat.xml configured, | Basically only need to configure it once. | - Build.xml # This file is the build configuration required for each project. , | But basically no need to change. | - Build.properties # This file is build.xml configured, | related to specific items. | - usage.txt # This file illustrates each of the buildings Operation. | | - LIB / # This directory is placed some common JAR packages free repetition. | | - checkStyle-all-3.4.jar # for code check | | - httpunit.jar # for HTTP unit testing | | - junit.jar # for unit test | | - servlet-api.jar # Used to write servlet related files | | - Template / # This directory is a set of project templates, a project starts | Data copy of the directory Under the project directory, use it directly. | - bin / # This directory places the executable file | - Build / # This directory is placed the auxiliary file required to build the build | | - checkStyle_Checks.xml # This file is the configuration of Checkstyle Document | | - Java.
Header # This file is also a checkStyle profile | It is used to explain the head constructor of your Java file | - Dist / # This directory is placed destined with the target file | | - Classes / # Class files generated after compiling | | - LIB / # JAR file generated after packaging this | | - lib / # This directory placement item related JAR file | - src / # This directory placement source code | - Build.xml # This file is used for Profiles with CVS work | - Main / # This directory is placed in the primary source code | Page, next page]