From 687d070ddadaf7990d498c5ba2e9d91c43e6003d Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 15 Feb 2002 15:19:18 +0000 Subject: [PATCH] Print a warning if we drop elements from a use supplied path. Avoid exactly that warning in Ant's own build file. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271367 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 16 ++++++++++------ src/main/org/apache/tools/ant/types/Path.java | 7 +++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/build.xml b/build.xml index be3e800b1..47d490598 100644 --- a/build.xml +++ b/build.xml @@ -66,6 +66,11 @@ + + + + + @@ -79,7 +84,7 @@ + refid="tests-classpath"/> + - + value="${tests-classpath.value}" /> @@ -1001,10 +1006,9 @@ - - + value="${tests-classpath.value}" /> + diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java index 2d220adf6..c2f3547b4 100644 --- a/src/main/org/apache/tools/ant/types/Path.java +++ b/src/main/org/apache/tools/ant/types/Path.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2001 The Apache Software Foundation. All rights + * Copyright (c) 2000-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -245,7 +245,10 @@ public class Path extends DataType implements Cloneable { if (f.exists()) { setLocation(f); - } + } else { + log("dropping " + f + " from path as it doesn't exist", + Project.MSG_WARN); + } } }