Ant
Not introduced
Shell
,ratio
Make
There are many troubles, but the process control
(Flow Control)
It is also not possible, or if it can't complete the complex task.
Ant
Built-in simple process control methods, and we can implement complex process control from the outside of the scripting language.
ANT built-in process control method
1.
Depends
When defining a Target, the dependent Target is specified by Depends, then these dependencies must pass the Target before running this Target:
So, if just run B, A will be called first; just run C, A first call, then B, then C; run D, A first call, then B, then C, finally D Note B and A will only be called once instead of twice.
2. If and unsses define a Target, the dependent properties are specified by IF and UNSS. For example: XML Version = "1.0"?>
xml version = "1.0"?>
Using ANT built-in process control, first is very troublesome, followed by only some simple if / unless judgment, slightly complicated loop traversal traversal traversal, no way to complete the system. Ant doesn't define a set of scripts yourself, but introduces external scripts. Ant supports a lot of scripts, from JavaScript, Python, Ruby, Beanshell, TCL, to Judoscript, and even define script languages themselves. Unfortunately, is this not required to master a language? Let's talk about how to use a more common Mozilla JavaScript. First, download BSF from http://jakarta.apache.org/BSF/, I use BSF 2.3.0; go to http://www.mozilla.org/rhino/ download Rhino, I use Rhino1. 5r3. Put the JAR files
installation manual
> / lib
Under contents.
Here is a simple example: