Browse Source

fix <script> to allow bsf.jar to be in a nested <classpath>

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@490088 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
f150c7e837
3 changed files with 9 additions and 4 deletions
  1. +2
    -0
      WHATSNEW
  2. +4
    -4
      docs/manual/OptionalTasks/script.html
  3. +3
    -0
      src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java

+ 2
- 0
WHATSNEW View File

@@ -23,6 +23,8 @@ Other changes:

* Upgraded to Xerces 2.9.0

* <script> can now work with bsf.jar and js.jar in its <classpath>.

Changes from Ant 1.6.5 to Ant 1.7.0
===================================



+ 4
- 4
docs/manual/OptionalTasks/script.html View File

@@ -145,11 +145,11 @@ Groups@Google: "Rhino, enum.js, JavaAdapter?"</a> by Norris Boyd in the newsgrou
specific jar files.
</p>
<p>
<b>NB:</b> This classpath cannot (currently) be used to
<b>NB: (Since Ant 1.7.1)</b>
This classpath <em>can</em> be used to
specify the location of
the BSF jar file. Also, due to classloading issues, languages
that have engines in the BSF jar file cannot have the
implementation in the classpath element. This includes the
the BSF jar file and/or languages
that have engines in the BSF jar file. This includes the
javascript, jython, netrexx and jacl languages.
</p>
</p>


+ 3
- 0
src/main/org/apache/tools/ant/util/ScriptRunnerCreator.java View File

@@ -122,6 +122,9 @@ public class ScriptRunnerCreator {
LoaderUtils.classNameToResource(managerClass)) == null) {
return null;
}
if (managerClass.equals(BSF_MANAGER)) {
new ScriptFixBSFPath().fixClassLoader(scriptLoader, language);
}
try {
runner = (ScriptRunnerBase) Class.forName(
runnerClass, true, scriptLoader).newInstance();


Loading…
Cancel
Save