Это действительно зависит от того, что вы подразумеваете под «существенной разницей». Разница будет в том, что один вызывает другой, поэтому в основном это одно и то же, но используется в разных контекстах.
Вот фрагмент из defaults.properties
, который определяет стандартные задачи Ant:
ant=org.apache.tools.ant.taskdefs.Ant
antcall=org.apache.tools.ant.taskdefs.CallTarget
...........
Если вы откроете исходный код этих задач, вы увидите, что CallTarget
содержит объект Ant
и делегирует ему большую часть работы:
public class CallTarget extends Task {
private Ant callee;
...........
...........
/**
* Delegate the work to the ant task instance, after setting it up.
* @throws BuildException on validation failure or if the target didn't
* execute.
*/
public void execute() throws BuildException {
if (callee == null) {
init();
}
if (!targetSet) {
throw new BuildException(
"Attribute target or at least one nested target is required.",
getLocation());
}
callee.setAntfile(getProject().getProperty("ant.file"));
callee.setInheritAll(inheritAll);
callee.setInheritRefs(inheritRefs);
callee.execute();
}
..........
..........
}