Browse Source

Do not set ant.file.{projectname} when the project name

is not set in the <project> tag. (as discussed)
Bugzilla report: 39920



git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@453401 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
583cfae0e5
3 changed files with 8 additions and 1 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -0
      docs/manual/CoreTasks/import.html
  3. +1
    -1
      src/main/org/apache/tools/ant/helper/ProjectHelper2.java

+ 3
- 0
WHATSNEW View File

@@ -40,6 +40,9 @@ Fixed bugs:
* fix for junit4 issue introducted since beta2.
Bugzilla report 40682.

* Error in duplicate project name with <import> and <antcall>.
Bugzilla report 39920.

Other changes:
--------------



+ 4
- 0
docs/manual/CoreTasks/import.html View File

@@ -79,6 +79,10 @@ property of the main buildfile.</p>

<p>Note that &quot;builddocs&quot; is not the filename, but the name attribute
present in the imported project tag.</p>
<p>
If import file does not have a name attribute, the ant.file.projectname
property will not be set.
</p>

<h4>Resolving files against the imported file</h4>



+ 1
- 1
src/main/org/apache/tools/ant/helper/ProjectHelper2.java View File

@@ -738,7 +738,7 @@ public class ProjectHelper2 extends ProjectHelper {
}
}

if (context.getBuildFile() != null) {
if (context.getBuildFile() != null && nameAttributeSet) {
project.setUserProperty("ant.file."
+ context.getCurrentProjectName(),
context.getBuildFile().toString());


Loading…
Cancel
Save