Ant is angry

xiaoxiao2021-03-06  36

January 01, 2004

"Ant Great"

Reading Steve Loughran

"Ant In Anger" note. ^ _ ^

STEVE recommends the name and content of the top-level goals.

Target Name Content Build Build Application System Test Run JUnit Test Clean Empty Output Directory Deploy DEPLOY Loading JAR or WAR Output Source Codes and Binary Output Source Codes and Binary File Fetch Fetch from CVS Tree to the latest source code DOCS / JAVADOCS output Document file ALL performs Clean, Fetch, Build, Test, DOS / Javadocs, deploymain default build procedure

Name of the built-in target Init initialization characteristics and other initialization tasks, read personalized feature file init - debug initialization debugging feature init-release initialization Publishing feature Compile executes actual compile LINK / JAR to establish JAR file or equivalence file staging The application transfer to the development directory structure of the pre-deployment process and test simple projects before the product site

The directory name content BIN stores the normal binary file and the script file build to store the directory tree of the build result, created by Ant and can be cleared by the "Clean" target to store the available development results, created by Ant and can be " Clean "Target Empty DOC Handwritten Document LIB Store Java Library SRC to be loaded when building an application system, stores Java original code, and the hierarchy of the directory must meet the requirements of the package naming.

Ant Task (Ant Tasks)

Archive task

Audit / Coverage Tasks

Compile class task

Deployment class task

Document class task

EJB class task

Execute class task

File class task

Java2 extension task

Log class task

Mail class task

Other miscellaneous tasks

.NET class task

Pre-translation class task

Attribute class task

Remote task

SCM (Software Control Management) Task

Test class

Visual Age for Java Task Tasks

Archive Task [Back to TOP]

Task Name Description Bunzip2 Decompressing files with Gzip or Bzip2 packages. Bzip2 packs some files with Gzip or Bzip2 algorithm. This task does not depend on dependent checking, always generate an output file. CAB generates files in Microsoft CAB format. It runs like the JAR OR ZIP task. This task calls an external tool Cabarc on the Windows platform, so this tool must be found on the search path. EAR An Extension of the Jar Task with special treatment for files That Should End Up An Enterprise Application Archive.gunzip Decomposue a gzip file .Gzip will pack some files with Gzip. Jar will use some files with jar package. Jlink disapproval Task. Use the ZipFileSet and ZipGroupFileSet attributes of JAR or ZIP tasks instead. Manifest generates a manifest file .RPM loads the RPM program to build a Linux installation file. This task is currently running only on Linux and supporting the RPM's UNIX platform. Signjar uses the command line tool JavaSign to digitally sign a zip or jar file. TAR generates a TAR file .unjar decompressed a JAR file .untar expanded the file contained in a TAR file. UNWAR decompressed a WAR file. UNZIP decompressed a zip file. War an extension of the jar task with special treatment for Files That Should End Up in the Web-INF / LIB, Web-INF / CLASSES, or Web-INF Directories of The Web Application Archive.zip Generates a zip file.

Audit / Coverage Tasks [Back to top] Task Name Description JDepend Invokes the JDepend parser. This parser "traverses a set of Java source-file directories and generates design-quality metrics for each Java package" .JProbe These tasks run the tools from the JProbe suite. This task was written using JProbe Suite Server Side 3.0.MMetrics Computes the metrics of a set of Java source files, using the Metamata metrics / WebGain Quality Analyzer source-code analyzer, and writes the results to an XML file.Maudit Performs Static Analysis on a set of java source-code and byte-code files, using the metamata metrics / webgain Quality Analyzer Source-Code Analyzer.

Compilation class task [Back to TOP]

Task Name Description Depend Determines which classfiles are out-of-date with respect to their source, removing the classfiles of any other classes that depend on the out-of-date classes, forcing the re-compile of the removed classfiles. Typically used in conjunction with the Javac task.Javac compiles the specified source file (s) within the running (Ant) VM, or in another VM if the fork attribute is specified.JspC Runs the JSP compiler. It can be used to precompile JSP pages for fast initial invocation of JSP pages, deployment on a server without the full JDK installed, or simply to syntax-check the pages without deploying them. The Javac task can be used to compile the generated Java source. (For Weblogic JSP compiles, see the Wljspc task.) NetRexxC compiles a NetRexx source tree within the running (Ant) VM.Rmic Runs the rmic compiler on the specified file (s) .Wljspc compiles JSP pages using Weblogic's JSP compiler, weblogic.jspc. (For non-Weblogic JSP compiles See the JSPC Task.

Deployment Tasks [Back to TOP]

Task Name Description ServerDeploy Task to Run A "Hot" Deployment Tool for Vendor-Specific J2EE Server.Documentation Tasks [Back to Top]

Task Name Description Javadoc / Javadoc2 Generates code documentation using the javadoc tool The Javadoc2 task is deprecated;.. Use the Javadoc task instead.Stylebook Executes the Apache Stylebook documentation generator Unlike the command-line version of this tool, all three arguments are required to Run The Stylebook Task.

EJB TASKS [Back to TOP]

Task Name Description EJB Tasks (See The Documentation Describing The EJB TASKS.)

Execution Tasks [Back to TOP]

Task Name Description Ant Runs Ant on a supplied buildfile, optionally passing properties (with possibly new values). This task can be used to build sub-projects.AntCall Runs another target within the same buildfile, optionally passing properties (with possibly new values) .Apply / ExecOn Executes a system command. When the os attribute is specified, the command is only executed when Ant is run on one of the specified operating systems.Dependset This task compares a set of source files with a set of target files. If any of the source files is newer than any of the target files, all the target files are removed. Exec Executes a system command. When the os attribute is specified, the command is only executed when Ant is run on one of the specified operating systems .Java Executes a Java class within the running (Ant) VM, or in another VM if the fork attribute is specified.Parallel A container task that can contain other Ant tasks. Each nested task specified within the tag will be executed in ITS own thread.Sequential A container task that can contain other Ant tasks. The nested tasks are simply executed in sequence. Its primary use is to support the sequential execution of a subset of tasks within the tag.Sleep A task for suspending execution for a specified period of time. Useful when a build or deployment process requires an interval between tasks.Subant Calls a given target for all defined sub-builds. This is an extension of ant for bulk project execution.Waitfor Blocks execution until a set of Specified conditions become true. this task is intended to be used with the parallel task to synchronize a set of processes.file tasks [back to top]

Task Name Description Attrib Changes the permissions and / or attributes of a file or all files inside the specified directories. Currently, it has effect only under Windows.Checksum Generates a checksum for a file or set of files. This task can also be used to perform checksum verifications.Chgrp Changes the group ownership of a file or all files inside the specified directories. Currently, it has effect only under Unix.Chmod Changes the permissions of a file or all files inside the specified directories. Currently, it has effect only under Unix. The permissions are also UNIX style, like the arguments for the chmod command.Chown Changes the owner of a file or all files inside the specified directories. Currently, it has effect only under Unix.Concat concatenates multiple files into a single one or to Ant's logging system.Copy Copies a file or Fileset to a new file or directory.Copydir Deprecated. Use the Copy task instead.Copyfile Deprecated. Use the Copy task instead.Delete Deletes either a single fil e, all files and sub-directories in a specified directory, or a set of files specified by one or more FileSets.Deltree Deprecated. Use the Delete task instead.Filter Sets a token filter for this project, or reads multiple token filters from a specified file and sets these as filters. Token filters are used by all tasks that perform file-copying operations.FixCRLF Modifies a file to add or remove tabs, carriage returns, linefeeds, and EOF characters.Get Gets a file from a URL.Mkdir Creates A Directory. Non-Existent Parent Directories Are Created, When Necessary.move Moves A File to a New File or Directory, or a set (s) of file (s) to a new directory.patch applies a "diff"

file to originals.Rename Deprecated. Use the Move task instead.RenameExtensions Deprecated. Use the Move task with a glob mapper instead.Replace Replace is a directory-based task for replacing the occurrence of a given string with another string in selected file.ReplaceRegExp Directory-based task for replacing the occurrence of a given regular expression with a substitution pattern in a file or set of files.Sync Synchronize two directory trees.Tempfile Generates a name for a new temporary file and sets the specified property to that name.Touch Changes The Modification Time of A File and Possibly create it at the size time.java2 extensions tasks [back to top]

Task Name Description Jarlib-available Check whether an extension is present in a FileSet or an ExtensionSet. If the extension is present, the specified property is set.Jarlib-display Display the "Optional Package" and "Package Specification" information contained within the specified jars.Jarlib-manifest Task to generate a manifest that declares all the dependencies in manifest. The dependencies are determined by looking in the specified path and searching for Extension / "Optional Package" specifications in the manifests of the jars.Jarlib-resolve Try to Locate a Jar to Satisfy An Extension, and Place The Location of The Jar Into The Specified Property.

Logging tasks [Back to TOP]

Task Name Description Record Runs a listener That Records The logging Output of the build-process events to a file. Several Recorders Can Exist at the Same Time. Each Recorder is Associated with a file.

Mail Tasks [Back to TOP]

Task Name Description Mail A Task To Send SMTP Email.mimemail DepRecated. Use the mail task instead.

Miscellaneous Tasks [Back to TOP]

Task Name Description Defaultexcludes Modify the list of default exclude patterns from within your build file.Echo Echoes text to System.out or to a file.Fail Exits the current build by throwing a BuildException, optionally printing additional information.GenKey Generates a key in keystore .Input Allows user interaction during the build process by displaying a message and reading a line of input from the console.Script Executes a script in a Apache BSF-supported language.Sound Plays a sound file at the end of the build, according to whether the build failed or succeeded.Splash Displays a splash screen.Sql Executes a series of SQL statements via JDBC to a database. statements can either be read in from a text file using the src attribute, or from between the enclosing SQL tags.Taskdef Adds a task definition to the current project, such that this new task can be used in the current project.TStamp Sets the DSTAMP, TSTAMP, and TODAY properties in the current project, based on the current date and time.Type def Adds a data-type definition to the current project, such that this new type can be used in the current project.XmlValidate Checks that XML files are valid (or only well-formed). This task uses the XML parser that is currently used By Ant by Default, But Any Sax1 / 2 Parser Can Be Specified, if Needed..NET Tasks [Back to Top]

Task Name Description .Net Tasks (See The Documentation Describing The .NET TASKS.)

Pre-Process Tasks [Back to TOP]

Task Name Description ANTLR Invokes the ANTLR Translator generator on a grammar file.AntStructure Generates a DTD for Ant buildfiles that contains information about all tasks currently known to Ant.IContract Instruments Java classes using the iContract DBC preprocessor. This task can generate a properties file for iControl, a graphical user interface that lets you turn on / off assertions.Import Import another build file and potentially override targets in it with targets of your own.JavaCC Invokes the JavaCC compiler-compiler on a grammar file.Javah Generates JNI headers from a Java class.JJDoc Invokes the JJDoc documentation generator for the JavaCC compiler-compiler. JJDoc takes a JavaCC parser specification and produces documentation for the BNF grammar. It can operate in three modes, determined by command line options. This task only invokes JJDoc if the Grammar File Is Newer Than The Generated Bnf Grammar Documentation.jjtree Invokes The Jjtree Preprocessor for the Javacc Compiler-Compiler. It IT INS erts parse-tree building actions at various places in the JavaCC source that it generates. The output of JJTree is run through JavaCC to create the parser. This task only invokes JJTree if the grammar file is newer than the generated JavaCC file.Macrodef Define a new task as a macro built-up upon other tasks.MParse Invokes the Metamata MParse compiler-compiler on a grammar file.Native2Ascii Converts files from native encodings to ASCII with escaped Unicode. A common usage is to convert source files maintained in a native operating System encoding to ascii, prior to compiration.presetdef define a new task by instructioning an existing task with default value for attributes or child elements.

Translate Identifies Keys in Files, Delimited by Special Tokens, and Translates Them with Values ​​Read from Resource Bundles.xslt / Style Processes A Set of Documents Via Xslt.Property Tasks [Back to Top]

Task Name Description Available Sets a property if a specified file, directory, class in the classpath, or JVM system resource is available at runtime.Basename Sets a property to the last element of a specified path. BuildNumber Task that can be used to track build numbers Condition Sets a property if a certain condition holds true -.. this is a generalization of Available and Uptodate.Dirname Sets a property to the value of the specified file up to, but not including, the last path element Echoproperties Lists the current properties .LoadFile Loads a file into a property.LoadProperties Load a file's contents as Ant properties. This task is equivalent to using except that it supports nested elements, and it can not be specified outside a target.PathConvert Converts a nested path, path reference, filelist reference, or fileset reference to the form usable on a specified platform and / or to a list of items separated by the specified separator and stores the result in th e specified property.Property Sets a property (by name and value), or set of properties (from a file or resource) in the project.PropertyFile Creates or modifies property files. Useful when wanting to make unattended modifications to configuration files for application servers and applications. Typically used for things such as automatically generating a build number and saving it to a build properties file, or doing date manipulation. Uptodate Sets a property if a given target file is newer than a set of source files.Whichresource Find a class Or resource.xmlproperty loads property value from a welcome tasks [back to top]

Task Name Description FTP Implements a basic FTP client that can send, receive, list, and delete files, and create directories.Rexec Task to automate a remote rexec session.Scp Copy files to or from a remote server using SSH.setproxy Sets Java's web proxy properties, so that tasks and code run in the same JVM can have through-the-firewall access to remote web sites.Sshexec Execute a command on a remote server using SSH.Telnet Task to automate a remote telnet session. This task uses nested and tags to indeicate strings to wait for and specify text to send.scm (software control management) task [Back to TOP]

Task Name Description CVS Processing Pack / Module from a CVS Warehouse. CvSchangelog generates a report of the change in a CVS warehouse. CVSPass Adds Entries to a .cvspass file. Adding entries to this file has the same affect as a cvs login command.CvsTagDiff Generates an XML-formatted report file of the changes between two tags or dates recorded in a CVS repository.ClearCase Tasks to perform the ClearCase cleartool checkin, checkout, uncheckout, update, lock, unlock , mklbtype, rmtype, mklabel, and mkbl commands.Continuus / Synergy Tasks to perform the Continuus ccmcheckin, ccmcheckout, ccmcheckintask, ccmreconfigure, and ccmcreateTask commands.Microsoft Visual SourceSafe Tasks to perform the Visual SourceSafe vssget, vsslabel, vsshistory, vsscheckin, vsscheckout, vssadd, vsscp, and vsscreate commands.Perforce Tasks to perform the Perforce p4sync, p4change, p4edit, p4submit, p4have, p4label, p4counter, p4reopen, p4revert, and p4add commands.Pvcs Allows the user extract the latest edition of the source code from a PVCS repository.sourceoffsite taste . Ks to perform the SourceOffSite sosget, soslabel, soscheckin, and soscheckout commands.StarTeam Tasks to perform the StarTeam stcheckout, stcheckin, stlabel, and stlist commands The Starteam task is deprecated; use STCheckout instead test class tasks.

Task Name Description JUnit Run Follow the JUnit test framework test. This task has been tested on JUnit 3.0 to JUnit 3.7; it cannot work on a version lower than Junit 3.0.junitReport generates an XML file generated by the JUnit task. Then use a style list (Stylesheet) to provide a single style list. Test runs the unit test of the org.apache.testlet framework.

Visual Age for Java Task

Task Name Description Visual Age for Java Tasks (see the documentation of the Visual Age for Java task.)

Posted by Hilton At January 1, 2004 05:33 PM | TRACKBACK

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

New Post(0)