File / Directory / Archive tasks
Catégories de tâches – Sommaire
File / Directory / Archive tasks
Documentation, Logging and Testing Tasks
Un aperçu complet des tâches standardes disponibles : http://ant.apache.org/manual/tasksoverview.html
16
File / Directory / Archive tasks
File / Directory tasks
File / Directory tasks
Copy
Copies a file or Fileset to a new file or directory.
Delete
Deletes either a single file, all files and sub-directories in a specified directory, or a set of files specified by one or more FileSets.
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.
Get
Gets a file from a URL.
Patch
Applies a "diff" file to originals.
...
FixCRLF, Replace, ReplaceRegExp, Sync, Tempfile,
Touch, Checksum, Chgrp, Chmod, Chown, Concat
17
Archive Tasks
File / Directory / Archive tasks
Zip / Unzip
Zips a set of files. / Expands a Zip file.
Jar/Unjar
Jars a set of files./ Unzips a jarfile.
Manifest
Creates a manifest file.
Rpm
Invokes the rpm executable to build a Linux installation file. This task currently only works on Linux or other
Unix platforms with RPM support.
Tar/Untar
Creates a tar archive / Untars a tarfile.
...
BUnzip2, BZip2, Cab, Ear, GZip, GUnzip War, Unwar
18
File / Directory / Archive tasks
Documentation, Logging and Testing Tasks
Compile Tasks
Compile Tasks
Javac
Compiles the specified source file(s) within the running
(Ant) VM, or in another VM if the fork attribute is specified.
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.
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.)
Documentation Tasks
19
File / Directory / Archive tasks
Documentation, Logging and Testing Tasks
Documentation, Logging and Testing Tasks
Documentation Tasks
Javadoc
Generates code documentation using the javadoc tool.
Logging Tasks
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.
Testing Tasks
Junit
Runs tests from the Junit testing framework. This task has been tested with JUnit 3.0 up to JUnit 3.7 ; it won’t work with versions prior to JUnit 3.0.
JunitReport
Merges the individual XML files generated by the Junit task and applies a stylesheet on the resulting merged document to provide a browsable report of the
testcases results.
20
File / Directory / Archive tasks
Execution Tasks
Execution Tasks
Ant
Runs Ant on a supplied buildfile,
AntCall
Runs another target within the same buildfile,
Apply/ExecOn ; Exec
Executes a system command.
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 <parallel> 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 <parallel> 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.
Waitfor
Blocks execution until a set of specified conditions
21
File / Directory / Archive tasks
Remote Tasks
FTP
Implements a basic FTP client that can send, receive, list, and delete files, and create directories.
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 <read> and <write> tags to indicate strings to wait for and specify text to send.
22
File / Directory / Archive tasks
Misc tasks
A task to send SMTP email
Echo
Echoes text to System.out or to a file.
Fail
Exits the current build by throwing a BuildException, optionally printing additional information.
Input
Allows user interaction during the build process by displaying a message and reading a line of input from the console.
Sound
Plays a sound file at the end of the build, according to whether the build failed or succeeded.
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.
TStamp
Sets the DSTAMP, TSTAMP, and TODAY properties in the current project, based on the current date and time.
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.
23
File / Directory / Archive tasks
Property Tasks
Property Tasks
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.
Dirname
Sets a property to the value of the specified file up to, but not including, the last path element.
Condition
Sets a property if a certain condition holds true ; this is a generalization of Available and Uptodate.
XmlProperty
Loads property values from a well-formed XML file.
...
Whichresource, Echoproperties, LoadFile,
LoadProperties, MakeURL, PathConvert, Property,
PropertyFile, Uptodate,
24

Enlace público actualizado
El enlace público a tu chat ha sido actualizado.