Apache ant learning notes (2): Apache ant command line

Source: Internet
Author: User

The command line of Apache ant is the basis for building Apache ant. Although we usually integrate Apache ant in the IDE and use it for building, it is good for us to understand the Apache ant command line, for example, modify the default settings of Apache ant in IDE to meet your requirements. In addition, it is useful in command line scenarios, although few.

Enter the command line, enter ant-help, and display the following (the text in the arc is the option comment ):

Ant [Options] [target [TARGET2 [target3]...]


Options:


-Help,-H print this message (output the help information of the ant command of Apache ant)


-Projecthelp,-P print project help information (outputs project-related help information)


-Version print the version information and exit (output Apache ant version information)


-Diagnostics print information that might be helpful to diagnose or report problems. (outputs information such as the running environment and dependency library of the Apache ant project, and provides some useful help information for error diagnosis and report)


-Quiet and-q be extra quiet (hide the prompt output information when Apache ant is executed. The command line will not output the execution information of the specific target)


-Silent,-S print nothing but task outputs and build failures (only outputs the task output and build Failure Information)


-Verbose,-V be extra verbose (output details of Apache ant execution, including the operating system, Java environment, and other information)


-Debug,-D print debugging information (output the Apache ant information for debugging and detailed log information)


-Emacs,-e produce logging information without adornments (generate unmodified log information)


-Lib <path> specifies a path to search for jars and classes (specify the path for searching jar and classes so that Apache ant can use these class files)


-Logfile <File> use given file for log (use the specified file as the log output file of Apache ant instead of the command line output file)


-L <File> ''(same as-logfile <File>)


-Logger <classname> the class which is to perform logging (specify the log output class used by Apache ant)


-Listener <classname> Add an instance of class as a project listener (specify a project listener)


-Noinput do not allow interactive input (Interactive input is not allowed)


-Buildfile <File> use given buildfile (use the specified build file in the current directory for the build operation, and execute the default target .)


-File <File> ''(same as-buildfile <File>)


-F <File> ''(same as-buildfile <File>)


-D <property >=< value> use value for given property (sets an attribute value pair used by Apache ant, which can be directly referenced in target, the effect is the same as <property/> In buildfile, And the set property value can be overwritten)


-Keep-going,-K execute all targets that do not depend on failed target (s) (execute all targets that do not depend on the failed target)


-Propertyfile <Name> load all properties from file with-D properties taking precedence, compared with the <property/> attribute set in the Build File)


-Inputhandler <class> the class which will handle input requests (specify the class for processing Input requests)


-Find <File> (s) earch for buildfile towards the root of the filesystem and use it (searches for the specified Build File and builds it in the root directory direction. By default, the system first searches for the specified build file in the current directory. If no build file is found, it searches for the upper-level directory until the root directory. If a specified build file is found in this process, the build operation is performed. Otherwise, an error message is returned .)


-S <File> ''(same as-find <File>)


-Nice number a niceness value for the main thread: 1 (lowest) to 10 (highest); 5 is the default (specify the priority of the main thread: 1 to 10, 1 is the lowest, 10 is the highest, 5 is the default value)


-Nouserlib run ant without using the jar files from $ {user. home }/. ant/lib (not from $ {user when running Apache ant. home }/. ant/lib jar files)


-Noclasspath run ant without using classpath (the class specified by classpath is not used when running Apache ant)


-Autoproxy java1.5 +: Use the OS proxy settings (use the OS proxy settings, which requires java1.5 and later environments)


-Main <class> override ant's normal entry point (use the specified class to replace the normal entry point of Apache ant)

 

Apache ant learning notes (2): Apache ant command line

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.