Browse Source

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
master
Stefan Bodewig 23 years ago
parent
commit
687d070dda
2 changed files with 15 additions and 8 deletions
  1. +10
    -6
      build.xml
  2. +5
    -2
      src/main/org/apache/tools/ant/types/Path.java

+ 10
- 6
build.xml View File

@@ -66,6 +66,11 @@
<path id="classpath">
</path>

<!-- empty for JDK 1.2+, contains classes.zip otherwise -->
<path id="classes.zip">
<fileset dir="${java.home}" includes="lib/classes.zip" />
</path>

<path id="tests-classpath">
<pathelement location="${build.classes}" />
<pathelement location="${build.tests}" />
@@ -79,7 +84,7 @@
</path>
<!-- turn this path into a string which is passed to the tests -->
<property name="tests-classpath.value"
refid="tests-classpath"/>
refid="tests-classpath"/>

<!--
===================================================================
@@ -909,12 +914,12 @@
fork="${junit.fork}">
<!-- <jvmarg value="-classic"/> -->
<classpath refid="tests-classpath"/>
<classpath refid="classes.zip" />

<sysproperty key="ant.home" value="${ant.home}" />
<sysproperty key="build.tests" value="${build.tests}"/>
<sysproperty key="java.home" value="${java.home}" />
<sysproperty key="tests-classpath.value"
value="${tests-classpath.value}" />
value="${tests-classpath.value}" />

<formatter type="brief" usefile="false" />

@@ -1001,10 +1006,9 @@
<!-- <jvmarg value="-classic"/> -->
<sysproperty key="ant.home" value="${ant.home}" />
<sysproperty key="build.tests" value="${build.tests}"/>
<sysproperty key="java.home" value="${java.home}" />
<sysproperty key="tests-classpath.value"
value="${tests-classpath.value}" />
<classpath location="${java.home}/lib/classes.zip" />
value="${tests-classpath.value}" />
<classpath refid="classes.zip" />
<classpath refid="tests-classpath"/>
<formatter type="plain" usefile="false" />
<test name="${testcase}" />


+ 5
- 2
src/main/org/apache/tools/ant/types/Path.java View File

@@ -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);
}
}
}



Loading…
Cancel
Save