From 5f8c440ba8fc73e8670f2db9836a48db4235a816 Mon Sep 17 00:00:00 2001 From: Costin Manolache Date: Mon, 6 Jan 2003 16:00:55 +0000 Subject: [PATCH] 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 --- src/main/org/apache/tools/ant/helper/ProjectHelper2.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java index dcb028fcf..b46e95a4e 100644 --- a/src/main/org/apache/tools/ant/helper/ProjectHelper2.java +++ b/src/main/org/apache/tools/ant/helper/ProjectHelper2.java @@ -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,