Browse Source

remove tabs

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269984 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
e22d7c5093
2 changed files with 44 additions and 44 deletions
  1. +35
    -35
      src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
  2. +9
    -9
      src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/CompilerAdapterFactory.java

+ 35
- 35
src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java View File

@@ -119,7 +119,7 @@ public class JspC extends MatchingTask
private int verbose = 0; private int verbose = 0;
protected Vector compileList = new Vector(); protected Vector compileList = new Vector();
protected boolean failOnError = true; protected boolean failOnError = true;
/** /**
* -uribase <dir>The uri directory compilations should be relative to * -uribase <dir>The uri directory compilations should be relative to
* (Default is "/") * (Default is "/")
@@ -132,7 +132,7 @@ public class JspC extends MatchingTask
* against, * against,
*/ */
private File uriroot; private File uriroot;
private final static String FAIL_MSG private final static String FAIL_MSG
= "Compile failed, messages should have been provided."; = "Compile failed, messages should have been provided.";
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@@ -213,8 +213,8 @@ public class JspC extends MatchingTask
{ {
mapped = mapped_; mapped = mapped_;
} }
/**
/**
* -uribase. the uri context of relative URI * -uribase. the uri context of relative URI
* references in the JSP pages. If it does not * references in the JSP pages. If it does not
* exist then it is derived from the location of the file * exist then it is derived from the location of the file
@@ -226,9 +226,9 @@ public class JspC extends MatchingTask
this.uribase = uribase; this.uribase = uribase;
} }


public File getUribase() {
return uriroot;
}
public File getUribase() {
return uriroot;
}


/** /**
* -uriroot <dir>The root directory that uri files should be resolved * -uriroot <dir>The root directory that uri files should be resolved
@@ -240,11 +240,11 @@ public class JspC extends MatchingTask
this.uriroot = uriroot; this.uriroot = uriroot;
} }


public File getUriroot() {
return uriroot;
}
public File getUriroot() {
return uriroot;
}
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/** Set the classpath to be used for this compilation */ /** Set the classpath to be used for this compilation */
public void setClasspath(Path cp) { public void setClasspath(Path cp) {
@@ -305,7 +305,7 @@ public class JspC extends MatchingTask
// scan source directories and dest directory to build up both copy // scan source directories and dest directory to build up both copy
// lists and compile lists // lists and compile lists
resetFileLists(); resetFileLists();
int filecount=0;
int filecount=0;
for (int i = 0; i < list.length; i++) { for (int i = 0; i < list.length; i++) {
File srcDir = (File)project.resolveFile(list[i]); File srcDir = (File)project.resolveFile(list[i]);
if (!srcDir.exists()) { if (!srcDir.exists()) {
@@ -316,7 +316,7 @@ public class JspC extends MatchingTask
DirectoryScanner ds = this.getDirectoryScanner(srcDir); DirectoryScanner ds = this.getDirectoryScanner(srcDir);


String[] files = ds.getIncludedFiles(); String[] files = ds.getIncludedFiles();
filecount=files.length;
filecount=files.length;
scanDir(srcDir, dest, files); scanDir(srcDir, dest, files);
} }


@@ -326,7 +326,7 @@ public class JspC extends MatchingTask
if (compiler == null) { if (compiler == null) {
compiler = "jasper"; compiler = "jasper";
} }
log("compiling "+compileList.size()+" files",Project.MSG_VERBOSE);
log("compiling "+compileList.size()+" files",Project.MSG_VERBOSE);


if (compileList.size() > 0) { if (compileList.size() > 0) {


@@ -350,14 +350,14 @@ public class JspC extends MatchingTask
} }
} }
} }
else {
if(filecount==0) {
log("there were no files to compile",Project.MSG_INFO);
}
else {
log("all files are up to date",Project.MSG_VERBOSE);
}
}
else {
if(filecount==0) {
log("there were no files to compile",Project.MSG_INFO);
}
else {
log("all files are up to date",Project.MSG_VERBOSE);
}
}
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/** /**
@@ -391,19 +391,19 @@ public class JspC extends MatchingTask


if (!javaFile.exists() || if (!javaFile.exists() ||
srcFile.lastModified() > javaFile.lastModified()) srcFile.lastModified() > javaFile.lastModified())
{
if (!javaFile.exists()) {
log("Compiling " + srcFile.getPath() +
" because java file "
+ javaFile.getPath() + " does not exist",
Project.MSG_DEBUG);
} else {
log("Compiling " + srcFile.getPath() +
" because it is out of date with respect to "
+ javaFile.getPath(), Project.MSG_DEBUG);
{
if (!javaFile.exists()) {
log("Compiling " + srcFile.getPath() +
" because java file "
+ javaFile.getPath() + " does not exist",
Project.MSG_DEBUG);
} else {
log("Compiling " + srcFile.getPath() +
" because it is out of date with respect to "
+ javaFile.getPath(), Project.MSG_DEBUG);
}
compileList.addElement(srcFile.getAbsolutePath());
} }
compileList.addElement(srcFile.getAbsolutePath());
}
} }
} }
} }


+ 9
- 9
src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/CompilerAdapterFactory.java View File

@@ -87,14 +87,14 @@ public class CompilerAdapterFactory {
*/ */
public static CompilerAdapter getCompiler( String compilerType, Task task ) public static CompilerAdapter getCompiler( String compilerType, Task task )
throws BuildException { throws BuildException {
/* If I've done things right, this should be the extent of the
* conditional statements required.
*/
if ( compilerType.equalsIgnoreCase("jasper") ) {
return new JasperC();
}
return resolveClassName( compilerType );
/* If I've done things right, this should be the extent of the
* conditional statements required.
*/
if ( compilerType.equalsIgnoreCase("jasper") ) {
return new JasperC();
} }
return resolveClassName( compilerType );
}


/** /**
* Tries to resolve the given classname into a compiler adapter. * Tries to resolve the given classname into a compiler adapter.
@@ -114,11 +114,11 @@ public class CompilerAdapterFactory {
throw new BuildException( className + " can\'t be found.", cnfe ); throw new BuildException( className + " can\'t be found.", cnfe );
} catch ( ClassCastException cce ) { } catch ( ClassCastException cce ) {
throw new BuildException(className + " isn\'t the classname of " throw new BuildException(className + " isn\'t the classname of "
+ "a compiler adapter.", cce);
+ "a compiler adapter.", cce);
} catch ( Throwable t ) { } catch ( Throwable t ) {
// for all other possibilities // for all other possibilities
throw new BuildException(className + " caused an interesting " throw new BuildException(className + " caused an interesting "
+ "exception.", t);
+ "exception.", t);
} }
} }




Loading…
Cancel
Save