Ant The Definitive Guide phần 10 ppt

28 241 0
Ant The Definitive Guide phần 10 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Ant: The Definitive Guide 285 Attributes excludes (all, String, N) A space-delimited list of files to exclude from the checkout. Takes precedence over includes. foldername (all, String, N) The subfolder in the project from which to check out files. force (all, boolean, N) If true, overwrite existing folders. Defaults to false. includes (all, String, N) Space-delimited list of files to include in the checkout. password (all, String, Y) The password to log in with. projectname (all, String, Y) The StarTeam project name. recursion (all, boolean, N) If true, include subfolders when checking out. Defaults to true. servername (all, String, Y) The StarTeam server name. serverport (all, String, Y) The server port number. targetfolder (all, String, Y) The directory to check files out to. username (all, String, Y) The username to log in with. Ant: The Definitive Guide 286 verbose (all, boolean, N) If true, operate in verbose mode. Defaults to false. viewname (all, String, Y) The StarTeam view name. Content None. stylebook 1.3, 1.4 org.apache.tools.ant.taskdefs.optional.StyleBook Executes the Apache Stylebook documentation generator. It depends on stylebook.jar, available from http://xml.apache.org/. An appropriate JAR file is also included with the Apache Xalan distribution. Attributes book (1.3, 1.4, File, Y) The book XML file to generate documentation from. classpath (1.3, 1.4, Path, N) The classpath to use. classpathref (1.3, 1.4, Reference, N) A reference to a classpath defined elsewhere in the buildfile. skindirectory (1.3, 1.4, File, Y) A directory containing the Stylebook skin. targetdirectory (1.3, 1.4, File, Y) The destination directory for the documentation. Content 0,1 nested <classpath> elements (1.3, 1.4) May be used in place of the classpath or classpathref attributes. Ant: The Definitive Guide 287 telnet 1.3, 1.4 org.apache.tools.ant.taskdefs.optional.net.TelnetTask Executes a telnet session. Attributes initialcr (1.3, 1.4, boolean, N) If true, send a carriage return character after connecting. Defaults to false. password (1.3, 1.4, String, N) The login password. port (1.3, 1.4, int, N) The port number of the server. Defaults to 23. server (1.3, 1.4, String, Y) The hostname to connect to. timeout (1.3, 1.4, int, N) Number of seconds to wait before timing out. Defaults to no timeout. userid (1.3, 1.4, String, N) The login name. Content 0 n nested <read> elements (1.3, 1.4) Each contains a string of text to wait for from the server. 0 n nested <write> elements (1.3, 1.4) Each contains a string of text to send to the server. Ant: The Definitive Guide 288 test 1.3, 1.4 org.apache.tools.ant.taskdefs.optional.Test Executes a unit test in the org.apache.testlet framework. Attributes classpath (1.3, 1.4, Path, N) Specifies the classpath to use. classpathref (1.3, 1.4, Reference, N) A reference to a classpath defined elsewhere in the buildfile. forceshowtrace (1.3, 1.4, boolean, N) If true, show a stack trace on any failure. Defaults to false. showbanner (1.3, 1.4, String, N) If specified, show a banner when starting the testlet engine. showsuccess (1.3, 1.4, boolean, N) If true, show a message when the tests succeed. Defaults to false. showtrace (1.3, 1.4, boolean, N) If true, show a stack trace on errors, but not normal test failure. Defaults to false. Content 0,1 nested <classpath> elements (1.3, 1.4) A path element specifying the classpath. 0 n nested <testlet> elements (1.3, 1.4) Each contains a class name to test. For example: <testlet>com.oreilly.util.test.CustomerTestlet</testlet> Ant: The Definitive Guide 289 vsscheckin 1.4 org.apache.tools.ant.taskdefs.optional.vss.MSVSSCHECKIN Checks in files to Visual SourceSafe. Attributes autoresponse (1.4, String, N) Specifies the value for the -I flag. Legal values are Y and N. When omitted, the task passes -I to VSS. Otherwise, it passes -I-Y or -I-N. comment (1.4, String, N) The comment applied to the files. localpath (1.4, Path, N) Overrides the local working directory. login (1.4, String, N) A username/password combination, formatted like username,password, where ,password is optional. recursive (1.4, boolean, N) If true, operate recursively on subprojects. Defaults to false. serverpath (1.4, String, N) The directory in which srcsafe.ini resides. ssdir (1.4, String, N) The directory containing ss.exe. Ant searches the path if this is omitted. vsspath (1.4, String, Y) The path to the SourceSafe project, without the leading $ character. writable (1.4, boolean, N) If true, files are made writeable after check-in. Defaults to false. Ant: The Definitive Guide 290 Content None. vsscheckout 1.4 org.apache.tools.ant.taskdefs.optional.vss.MSVSSCHECKOUT Checks out files from Visual SourceSafe. Attributes autoresponse (1.4, String, N) Specifies the value for the -I flag. Legal values are Y and N. When omitted, the task passes -I to VSS. Otherwise, it passes -I-Y or -I-N. date (1.4, String, *) The date stamp used when checking out files. label (1.4, String, *) The label used when checking out files. localpath (1.4, Path, N) Overrides the local working directory. login (1.4, String, N) A username/password combination, formatted like username,password, where ,password is optional. recursive (1.4, boolean, N) If true, operate recursively on subprojects. Defaults to false. serverpath (1.4, String, N) The directory in which srcsafe.ini resides. ssdir (1.4, String, N) The directory containing ss.exe. Searches the PATH if omitted. Ant: The Definitive Guide 291 version (1.4, String, *) The version number used when checking out files. vsspath (1.4, String, Y) The path to the SourceSafe project, without the leading $ character. One of version, date, or label may be specified; all are optional. Content None. vssget all org.apache.tools.ant.taskdefs.optional.vss.MSVSSGET Gets files from Visual SourceSafe. Attributes autoresponse (1.3, 1.4, String, N) Specifies the value for the -I flag. Legal values are Y and N. When omitted, the task passes -I to VSS. Otherwise, passes -I-Y or -I-N. date (all, String, *) The date stamp used when getting files. label (all, String, *) The label used when getting files. localpath (all, Path, N) Overrides the local working directory. login (all, String, N) A username/password combination, formatted like username,password, where ,password is optional. quiet (1.4, boolean, N) If true, operate in quiet mode. Defaults to false. Ant: The Definitive Guide 292 recursive (all, boolean, N) If true, operate recursively on subprojects. Defaults to false. serverpath (1.4, String, N) Directory where srcsafe.ini resides. ssdir (all, String, N) Directory containing ss.exe. Searches the PATH if omitted. version (all, String, *) The version number used when getting files. vsspath (all, String, Y) The path to the SourceSafe project, without the leading $ character. writable (all, boolean, N) If true, files are made writable after getting them. Defaults to false. One of version, date, or label may be specified; all are optional. Content None. vsshistory 1.4 org.apache.tools.ant.taskdefs.optional.vss.MSVSSHISTORY Shows history for files and projects in Visual SourceSafe. Attributes dateformat (1.4, String, N) The format that is used by the fromdate and by the todate attributes. The task uses java.text.SimpleDateFormat, defaulting to DateFormat.SHORT. fromdate (1.4, String, *) The start date for comparison. Ant: The Definitive Guide 293 fromlabel (1.4, String, N) The start label for comparison. login (1.4, String, N) A username/password combination, formatted like username,password, where ,password is optional. numdays (1.4, int, *) The number of days relative to either fromdate or todate. May be a negative number. output (1.4, File, N) The destination file to write the diff to. recursive (1.4, boolean, N) If true, process projects recursively. Defaults to false. serverpath (1.4, String, N) The directory where srcsafe.ini resides. ssdir (1.4, String, N) The directory containing ss.exe. The task searches the PATH if omitted. style (1.4, Enum, N) The format for the history report. Legal values are brief, codediff, default, or nofile. Defaults to default. todate (1.4, String, *) The end date for comparison. tolabel (1.4, String, N) The end label for comparison. user (1.4, String, N) If specified, the task passes a user command (the -U option) to SourceSafe. Ant: The Definitive Guide 294 vsspath (1.4, String, Y) The path to the SourceSafe project, without the leading $ character. Various combinations of fromdate, todate, and numdays specify the time range for this task. Content None. vsslabel 1.3, 1.4 org.apache.tools.ant.taskdefs.optional.vss.MSVSSLABEL Assigns a label to files and projects in Visual SourceSafe. Attributes autoresponse (1.4, String, N) Specifies the value for the -I flag. Legal values are Y and N. When omitted, the task passes -I to VSS. Otherwise, it passes -I-Y or -I-N. comment (1.4, String, N) The comment to associate with this label. label (1.3, 1.4, String, Y) The label to apply to files. login (1.3, 1.4, String, N) A username/password combination, formatted like username,password, where ,password is optional. serverpath (1.4, String, N) The directory where srcsafe.ini resides. ssdir (1.3, 1.4, String, N) The directory containing ss.exe. The task searches the path if omitted. version (1.3, 1.4, String, N) The version to label. Defaults to the current version. [...]... interaction 300 Ant: The Definitive Guide A.2 Ant1 RIP 2002? So what does this mean for users of Ant1 ? Is it going away the day Ant2 becomes final? Not quite Even though many of the design proposals mentioned earlier are subject to debate and change (incidentally, delaying release), one thing remains a constant in the design of Ant2 : Ant1 buildfiles will not work with Ant2 Regardless, Ant1 's life support... the 308 Ant: The Definitive Guide System.exit( ) issue mentioned in Chapter 5, but we still don't know how to fix it What do we do? Ah yes, the System.exit( ) problem To recap, the problem is the result of developers' misuse of the System.exit( ) call in their code The System.exit( ) call speaks directly to the JVM, causing it to die immediately Since a Java program running from Ant is running in Ant' s... case since library version and availability is important Additionally, the pesky command-line limit, which can plague the administration of some application servers, is gone Whether there are 2 or 20 JARs, the classpath will always be defined with one, leaving room in the command for other options and paths We've 304 Ant: The Definitive Guide made the build and project manager's life easier by providing... of the Ant project are aware of how their contributions can affect thousands of people's projects and work In early 2001, they set forth on a plan to refactor Ant' s design Over time, Ant' s library has become bloated Features of some tasks overlap features of others There is no contract between the developers of the Ant engine and developers of Ant tasks and listeners Some implementations in the Ant engine... three months 311 Ant: The Definitive Guide Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects The animal on the cover of Ant: The Definitive Guide is a horned lizard There are 13 species of the horned lizard... head It is also known as the horny "toad." Despite the horned lizards' fierce appearance, they are not aggressive Their primary diet consists of ants, although they sometimes eat beetles, grasshoppers, and other insects, which they catch with their long tongues The horned lizards' first line of defense from predators is their camouflage, but they are also known to hiss and inflate their bodies to appear... 306 Ant: The Definitive Guide Assume for the moment that the java task must use the classpath attribute instead of a path DataType.A The only way to have both a property and DataType represent a path (without pathconvert) is to define both In this example, that doesn't seem like a big deal, but these paths can get long and complex You only want to define them once The following example... message=" -projecthelp - (An Ant option) Display all \ target descriptions"/> Now, if developers just call ant from the command line, they'll get the message shown in the following example: src%: ant Buildfile: build.xml help: [echo] Build the usage_example project [echo] Usage: ant [ant options] [target2 | target3 | ] [echo] build-lib - build just the project's library... facilitate the porting of Ant1 tasks Ant2 aims to be a marked improvement over Ant1 Most build and project design concepts formed with Ant1 should carry over Everything you've learned with Ant in a "build-design" sense will not go to waste 301 Ant: The Definitive Guide Appendix B Ant Solutions Over time, developers have created good, consistent solutions for builds Unfortunately, many of these solutions... stays the same Following is the build target from JBoss' buildfile: . interaction. Ant: The Definitive Guide 301 A.2 Ant1 RIP 2002? So what does this mean for users of Ant1 ? Is it going away the day Ant2 becomes final? Not quite. Even though many of the design. The version to label. Defaults to the current version. Ant: The Definitive Guide 295 vsspath (1.3, 1.4, String, Y) The path to the SourceSafe project, without the leading $ character. Content. Ant: The Definitive Guide 297 home (all, File, Y) The WebLogic distribution directory. jvmargs (all, String, N) Additional arguments for the JVM. name (all, String, N) The name of the

Ngày đăng: 13/08/2014, 21:21

Tài liệu cùng người dùng

Tài liệu liên quan