Browse Source

Warn of duplicated project name only if importing.

There are normal cases ( antcall) where the same build file is parsed many times
( this could be avoided now - as an optimization ).
It is a problem only in import, because of the target conflict resolution.
( targets are qualified with the project name )


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273769 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 22 years ago
parent
commit
5f8c440ba8
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/helper/ProjectHelper2.java

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

@@ -629,7 +629,8 @@ public class ProjectHelper2 extends ProjectHelper {
String dup = project.getProperty(antFileProp);
if (dup != null) {
File dupFile = new File(dup);
if (!dupFile.equals(context.buildFile)) {
if( context.ignoreProjectTag &&
!dupFile.equals(context.buildFile)) {
project.log("Duplicated project name in import. Project "+
context.currentProjectName + " defined first in " +
dup + " and again in " + context.buildFile,


Loading…
Cancel
Save