Browse Source

here is the bugfix. concatSystemClasspath returns a new classpath, so if jasperc was in ant's lib it got lost along with everything else.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273215 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 23 years ago
parent
commit
75cdf10211
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java

+ 5
- 1
src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java View File

@@ -104,10 +104,13 @@ public class JasperC extends DefaultJspCompilerAdapter {
// REVISIT. ugly. // REVISIT. ugly.
Java java = (Java) (getProject().createTask("java")); Java java = (Java) (getProject().createTask("java"));
if (getJspc().getClasspath() != null) { if (getJspc().getClasspath() != null) {
getProject().log("using user supplied classpath: "+getJspc().getClasspath(),
Project.MSG_DEBUG);
java.setClasspath(getJspc().getClasspath()); java.setClasspath(getJspc().getClasspath());
} else { } else {
Path classpath=new Path(getProject()); Path classpath=new Path(getProject());
classpath.concatSystemClasspath();
classpath=classpath.concatSystemClasspath("only");
getProject().log("using system classpath: "+classpath, Project.MSG_DEBUG);
java.setClasspath(classpath); java.setClasspath(classpath);
} }
java.setDir(getProject().getBaseDir()); java.setDir(getProject().getBaseDir());
@@ -121,6 +124,7 @@ public class JasperC extends DefaultJspCompilerAdapter {
//we are forking here to be sure that if JspC calls //we are forking here to be sure that if JspC calls
//System.exit() it doesn't halt the build //System.exit() it doesn't halt the build
java.setFork(true); java.setFork(true);
java.setTaskName("jasperc");
java.execute(); java.execute();
return true; return true;
} catch (Exception ex) { } catch (Exception ex) {


Loading…
Cancel
Save