diff --git a/WHATSNEW b/WHATSNEW
index da7536ee6..32de7e391 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -519,6 +519,9 @@ Other changes:
*
Imports another build file into the current project.
+ Note this task heavily relies on the ProjectHelper
+ implementation and doesn't really perform any work of its own. If
+ you have configured Ant to use a ProjectHelper other than Ant's
+ default, this task may or may not work.
+
On execution it will read another Ant file into
the same Project. This means that it basically works like the
@@ -83,7 +91,7 @@ property of the main buildfile. Note that "builddocs" is not the filename, but the name attribute
present in the imported project tag.
- If import file does not have a name attribute, the ant.file.projectname
+ If the imported file does not have a name attribute, the ant.file.projectname
property will not be set.
Imports the project defined by the property deploy-platform
+When using import the imported targets are available by up to two + names. Their "normal" name without any prefix and potentially with + a prefixed name (the value of the as attribute or the imported + project's name attribute, if any).
+ +When using include the included targets are only available in the + prefixed form.
+ +When using import, the imported target's depends attribute + remains unchanged, i.e. it uses "normal" names and allows you to + override targets in the dependency list.
+ +When using include, the included target's depends attribute is + rewritten so that prefixed names are used. This allows writers of + the included file to control which target is invoked as part of the + dependencies.
+ +It is possible to include the same file more than once by using + different prefixes, it is not possible to import the same file more + than once.
+ +Use import if you intend to override a target, otherwise use include.
+ +nested.xml shall be:
+ ++<project> + <target name="setUp"> + <property name="prop" value="in nested"/> + </target> + + <target name="echo" depends="setUp"> + <echo>prop has the value ${prop}</echo> + </target> +</project> ++ +
When using import like in
+ ++<project> + <target name="setUp"> + <property name="prop" value="in importing"/> + </target> + + <import file="nested.xml" as="nested"/> +</project> ++ +
Running the target nested.echo will emit: + +
+setUp: + +nested.echo: + [echo] prop has the value in importing ++ +
When using include like in
+ ++<project> + <target name="setUp"> + <property name="prop" value="in importing"/> + </target> + + <include file="nested.xml" as="nested"/> +</project> ++ +
Running the target nested.echo will emit: + +
+nested.setUp: + +nested.echo: + [echo] prop has the value in nested ++ +
and there won't be any target named "echo" on the including build file.