Apache Ant Command Line ArgumentsSometimes, project's task require arguments which will be passed to another process by using command line. Ant allows command line arguments, even arguments which contains space characters. It supports <arg> element to pass arguments and uses various attribute given below. Attributes
Ant treats command line and paths in Unix shell way and it is highly recommended to avoid the line attribute. ExampleIt is a single line command line argument having space characters. A command line argument with two separate options : -l and -a. when we run only ant from command line without any argument, Ant look for the default file build.xml and execute target. -build This argument is used while running build file other than default build.xml. Ex. -find It searches for build file, first into the current directory then in the parent directory and until the file is found. It require filename, if not passed default build.xml is assumed. Ex. -Dproperty It helps to set property value by using command line. Property is a name of property and value is a value associated to the property. Ex. -quiet It is used to show less information to the console. Ex. Next TopicApache Ant If and Unless Attributes |