Use Ant to make you programs (2)

xiaoxiao2021-03-06  91

Summary: Build_Common.xml, Common.xml and USAGE.txt

2. Introduce Build_Common.xml, Common.xml and USAGE.txt

The following is the contents of the build_common.xml file.

Copyright 2004 CAMRY.WU@gmail.com

This Program Is Free Software; You Can Redistribute IT and / or Modify

It Under The Terms of The GNU General Public License As Published by

The Free Software Foundation; Either Version 2 of the license, OR

ANY LATER VERSION.

This Program is Distributed in the Hope That IT Will Be Useful,

But without Any Warranty; WITHOUT EVEN THE IMPLIED WARRANTY OF

Merchantability or fitness for a particular purpose. See the

GNU General Public License for more details.

You Should Have Received A Copy of The GNU General Public License

Along with this program; if not, Write to the Free Software

Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

->

Semanticattributes = "true"

Keeproot = "false" />

Depends = "Project_init"

Description = "Initialize ENVIRONMENT">

Srcfile = "$ {path.common} /"} />

Depends = "init" description = "prepare build directory">

Classpath = "$ {path.common} /lib/checkstyle-all-3.4.jar" />

File = "$ {path.common} /lib/checkstyle.cache" />

DepRecation = "$ {compile.DepRecation}"

Destdir = "$ {Dist} / classes"

Target = "$ {compile.jdk-version.target}"

Source = "$ {compile.jdk-version.source}"

Optimize = "$ {compile.optimize}"

SRCDIR = "$ {src}">

Depends = "Project_clean"

Description = "Wipeout All generated files">

Depends = "Checkstyle, Compile"

Description = "CREATE BINARY Distribution">

JARFILE = "$ {dist.lib} / $ {component.name} - $ {component.version} .jar">

Fork = "false"

Haltonfailure = "false"

FailureProperty = "tests.failed"

Showoutput = "True">

*********************************************************** *******

*********************************************************** *******

**** One or more tests failed! Check the output ... ****

*********************************************************** *******

*********************************************************** *******

Depends = "Project_Deploy" Description = "deploy application" />

Depends = "compile"

Description = "CREATE Component Javadoc Documentation">

Bottom = "$ {component.title}"

Destdir = "$ {DOCS.API}"

Source = "$ {compile.jdk-version.source}"

DOCTITLE = "$ {component.title}"

PackageNames = "*"

Access = "protected" SourcePath = "$ {src.main}"

Version = "True"

WindowTitle = "$ {component.title} (Version $ {Component.Version}">

Depends = "Project_Fetch" Description = "Fetch Current Source from CVS">

Depends = "Checkstyle, Compile"

Description = "CREATES SOURCE DISTRIBUTION">

Destfile = "$ {dist.lib} / $ {component.name} - $ {component.version} -src.zip"

WHENEMPTY = "fail">

Upload the source file to the server backup, upload the target file to the server release.

The contents of this task are set by yourself, usually running the FTP task.

->

Depends = "Clean, Jar, Javadoc, Src-Zip" Description = "Publish Project">

Build ->

Depends = "Clean, Fetch, Test, Jar, Javadoc, Deploy"

Description = "build project" />

The following is the content of the common.xml file.

Copyright 2004 CAMRY.WU@gmail.com

Common Ant Build Environment

->

Path configuration, basically no change.

But if you use this build tool in a strange environment,

Maybe a slightly modify the configuration of these paths.

->

The following is the usage.txt file content.

$ {Component.name} build file

---------------------------------------------

Available Targets Are:

Prepare -> Initialization Project Environment

CheckStyle -> Check source file coding specification

Compile -> Compilation

Jar -> package

Build -> Build

Test -> Test

Clean -> Clear

Deploy -> Publish to the web server

Publish -> Publish products (source and target files)

Fetch -> Get the latest resource DOCS from CVS -> Create an API document

All -> Execute Clean, Fetch, Build, Test, DOC, Deploy

Main -> Default build process (self-modify)

转载请注明原文地址:https://www.9cbs.com/read-101436.html

New Post(0)