You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/11/13 17:05:48 UTC
svn commit: r713745 - in /ant/core/trunk: docs/manual/CoreTasks/include.html
src/main/org/apache/tools/ant/helper/ProjectHelper2.java
Author: bodewig
Date: Thu Nov 13 08:05:47 2008
New Revision: 713745
URL: http://svn.apache.org/viewvc?rev=713745&view=rev
Log:
make sure prefix isn't set to project name in import. make sure it is set even when no target has been encountered in include.
Modified:
ant/core/trunk/docs/manual/CoreTasks/include.html
ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
Modified: ant/core/trunk/docs/manual/CoreTasks/include.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/include.html?rev=713745&r1=713744&r2=713745&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/include.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/include.html Thu Nov 13 08:05:47 2008
@@ -74,6 +74,9 @@
"b", then the targets of that last build file will be prefixed by
"a.b.".</p>
+<p><code><import></code> contribute to the prefix as well, but
+ only if their <code>as</code> attribute has been specified.
+
<h4>Special Properties</h4>
<p>Included files are treated as they are present in the main
Modified: ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java?rev=713745&r1=713744&r2=713745&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java Thu Nov 13 08:05:47 2008
@@ -687,6 +687,14 @@
if (!context.isIgnoringProjectTag()) {
project.setName(value);
project.addReference(value, project);
+ } else if (isInIncludeMode()) {
+ if (!"".equals(value)
+ && (getCurrentTargetPrefix() == null
+ || getCurrentTargetPrefix().length() == 0)
+ ) {
+ // help nested include tasks
+ setCurrentTargetPrefix(value);
+ }
}
}
} else if (key.equals("id")) {
@@ -918,11 +926,6 @@
projectName = null;
}
- // help nested include tasks
- if (projectName != null) {
- setCurrentTargetPrefix(projectName);
- }
-
return projectName;
}