Browse Source

Provide access to old behaviour for those tasks that rely on it, such

as Anakia


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269471 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
e2cf23ba9c
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/main/org/apache/tools/ant/taskdefs/Definer.java

+ 8
- 2
src/main/org/apache/tools/ant/taskdefs/Definer.java View File

@@ -73,7 +73,13 @@ public abstract class Definer extends Task {
private Path classpath;
private File file;
private String resource;
private boolean reverseLoader = false;

public void setReverseLoader(boolean reverseLoader) {
this.reverseLoader = reverseLoader;
log("The reverseloader attribute is DEPRECATED. It will be removed", Project.MSG_WARN);
}
public void setClasspath(Path classpath) {
if (this.classpath == null) {
this.classpath = classpath;
@@ -179,9 +185,9 @@ public abstract class Definer extends Task {
private AntClassLoader createLoader() {
AntClassLoader al = null;
if (classpath != null) {
al = new AntClassLoader(project, classpath);
al = new AntClassLoader(project, classpath, !reverseLoader);
} else {
al = new AntClassLoader(project, Path.systemClasspath);
al = new AntClassLoader(project, Path.systemClasspath, !reverseLoader);
}
// need to load Task via system classloader or the new
// task we want to define will never be a Task but always


Loading…
Cancel
Save