Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 99860 invoked from network); 23 Jul 2002 07:55:24 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 23 Jul 2002 07:55:24 -0000 Received: (qmail 14000 invoked by uid 97); 23 Jul 2002 07:55:31 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 13921 invoked by uid 97); 23 Jul 2002 07:55:30 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 13910 invoked by uid 97); 23 Jul 2002 07:55:29 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 23 Jul 2002 07:54:56 -0000 Message-ID: <20020723075456.63539.qmail@icarus.apache.org> From: donaldp@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs DynamicTask.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N donaldp 2002/07/23 00:54:56 Modified: src/main/org/apache/tools/ant ProjectComponent.java Task.java TaskAdapter.java UnknownElement.java src/main/org/apache/tools/ant/taskdefs AbstractCvsTask.java Ant.java AntStructure.java Available.java Checksum.java Chmod.java Concat.java Copy.java Copydir.java Copyfile.java Definer.java Delete.java DependSet.java Echo.java Exec.java ExecTask.java ExecuteOn.java Exit.java Expand.java Filter.java GenerateKey.java Input.java JDBCTask.java Java.java Javac.java Javadoc.java LoadFile.java LoadProperties.java MatchingTask.java Move.java Property.java Rmic.java SQLExec.java SignJar.java Tar.java Taskdef.java TempFile.java Touch.java Tstamp.java Typedef.java Unpack.java UpToDate.java WaitFor.java XSLTProcess.java XmlProperty.java Zip.java src/main/org/apache/tools/ant/taskdefs/cvslib ChangeLogTask.java src/main/org/apache/tools/ant/taskdefs/email EmailTask.java src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java Cab.java EchoProperties.java IContract.java Javah.java Native2Ascii.java NetRexxC.java RenameExtensions.java ReplaceRegExp.java Rpm.java Script.java XMLValidateTask.java src/main/org/apache/tools/ant/taskdefs/optional/ccm Continuus.java src/main/org/apache/tools/ant/taskdefs/optional/clearcase ClearCase.java src/main/org/apache/tools/ant/taskdefs/optional/depend Depend.java src/main/org/apache/tools/ant/taskdefs/optional/dotnet CSharp.java Ilasm.java src/main/org/apache/tools/ant/taskdefs/optional/ejb BorlandGenerateClient.java DDCreator.java EjbJar.java Ejbc.java IPlanetEjbcTask.java WLRun.java WLStop.java src/main/org/apache/tools/ant/taskdefs/optional/i18n Translate.java src/main/org/apache/tools/ant/taskdefs/optional/ide VAJImport.java src/main/org/apache/tools/ant/taskdefs/optional/javacc JJTree.java JavaCC.java src/main/org/apache/tools/ant/taskdefs/optional/jdepend JDependTask.java src/main/org/apache/tools/ant/taskdefs/optional/jsp JspC.java WLJspc.java src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java XMLResultAggregator.java src/main/org/apache/tools/ant/taskdefs/optional/metamata AbstractMetamataTask.java MMetrics.java MParse.java src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java src/main/org/apache/tools/ant/taskdefs/optional/perforce P4Add.java P4Base.java P4Change.java P4Counter.java src/main/org/apache/tools/ant/taskdefs/optional/sitraka CovMerge.java CovReport.java Coverage.java src/main/org/apache/tools/ant/taskdefs/optional/sos SOS.java src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSS.java MSVSSCHECKIN.java MSVSSCHECKOUT.java MSVSSGET.java src/main/org/apache/tools/ant/types Description.java XMLCatalog.java src/main/org/apache/tools/ant/types/selectors DependSelector.java PresentSelector.java src/testcases/org/apache/tools/ant/taskdefs DynamicTask.java Log: Encapsulate usage of project object rather than allowing objects 7 subclasses acessing a protected variable of their super super super .... class. Deprecated the variable so that that anyone directly referencing variable will get warning and suggestion to use the accessor. Revision Changes Path 1.5 +7 -3 jakarta-ant/src/main/org/apache/tools/ant/ProjectComponent.java Index: ProjectComponent.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectComponent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ProjectComponent.java 9 Apr 2002 15:27:07 -0000 1.4 +++ ProjectComponent.java 23 Jul 2002 07:54:46 -0000 1.5 @@ -60,11 +60,15 @@ * * @author Conor MacNeill */ - public abstract class ProjectComponent { - /** Project object of this component. */ - protected Project project = null; + /** + * Project object of this component. + * @deprecated You should not be directly accessing this variable + * directly. You should access project object via the getProject() + * or setProject() accessor/mutators. + */ + protected Project project; /** Sole constructor. */ public ProjectComponent() { 1.32 +52 -52 jakarta-ant/src/main/org/apache/tools/ant/Task.java Index: Task.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Task.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- Task.java 22 Jul 2002 12:39:33 -0000 1.31 +++ Task.java 23 Jul 2002 07:54:46 -0000 1.32 @@ -61,7 +61,7 @@ * * Use Project.createTask to create a new task instance rather than * using this class directly for construction. - * + * * @see Project#createTask */ public abstract class Task extends ProjectComponent { @@ -71,8 +71,8 @@ protected String description = null; /** Location within the build file of this task definition. */ protected Location location = Location.UNKNOWN_LOCATION; - /** - * Name of this task to be used for logging purposes. + /** + * Name of this task to be used for logging purposes. * This defaults to the same as the type, but may be * overridden by the user. For instance, the name "java" * isn't terribly descriptive for a task used within @@ -84,7 +84,7 @@ protected String taskType = null; /** Wrapper for this object, used to configure it at runtime. */ protected RuntimeConfigurable wrapper; - /** + /** * Whether or not this task is invalid. A task becomes invalid * if a conflicting class is specified as the implementation for * its type. @@ -114,7 +114,7 @@ public Target getOwningTarget() { return target; } - + /** * Sets the name to use in logging messages. * @@ -128,7 +128,7 @@ /** * Returns the name to use in logging messages. * - * @return the name to use in logging messages. + * @return the name to use in logging messages. */ public String getTaskName() { return taskName; @@ -144,14 +144,14 @@ this.taskType = type; } - /** + /** * Sets a description of the current action. This may be used for logging * purposes. - * - * @param desc Description of the current action. + * + * @param desc Description of the current action. * May be null, indicating that no description is * available. - * + * */ public void setDescription(String desc) { description = desc; @@ -159,7 +159,7 @@ /** * Returns the description of the current action. - * + * * @return the description of the current action, or null if * no description is available. */ @@ -176,10 +176,10 @@ public void init() throws BuildException {} /** - * Called by the project to let the task do its work. This method may be - * called more than once, if the task is invoked more than once. - * For example, - * if target1 and target2 both depend on target3, then running + * Called by the project to let the task do its work. This method may be + * called more than once, if the task is invoked more than once. + * For example, + * if target1 and target2 both depend on target3, then running * "ant target1 target2" will run all tasks in target3 twice. * * @exception BuildException if something goes wrong with the build @@ -188,11 +188,11 @@ /** * Returns the file/location where this task was defined. - * - * @return the file/location where this task was defined. + * + * @return the file/location where this task was defined. * Should not return null. Location.UNKNOWN_LOCATION * is used for unknown locations. - * + * * @see Location#UNKNOWN_LOCATION */ public Location getLocation() { @@ -201,11 +201,11 @@ /** * Sets the file/location where this task was defined. - * + * * @param location The file/location where this task was defined. * Should not be null - use * Location.UNKNOWN_LOCATION if the location isn't known. - * + * * @see Location#UNKNOWN_LOCATION */ public void setLocation(Location location) { @@ -214,7 +214,7 @@ /** * Returns the wrapper used for runtime configuration. - * + * * @return the wrapper used for runtime configuration. This * method will generate a new wrapper (and cache it) * if one isn't set already. @@ -232,7 +232,7 @@ * This method should be used only by the ProjectHelper and ant internals. * It is public to allow helper plugins to operate on tasks, normal tasks * should never use it. - * + * * @param wrapper The wrapper to be used for runtime configuration. * May be null, in which case the next call * to getRuntimeConfigurableWrapper will generate a new @@ -248,7 +248,7 @@ // unless I've missed something. /** * Configures this task - if it hasn't been done already. - * If the task has been invalidated, it is replaced with an + * If the task has been invalidated, it is replaced with an * UnknownElement task which uses the new definition in the project. * * @exception BuildException if the task cannot be configured. @@ -256,56 +256,56 @@ public void maybeConfigure() throws BuildException { if (!invalid) { if (wrapper != null) { - wrapper.maybeConfigure(project); + wrapper.maybeConfigure(getProject()); } } else { getReplacement(); } } - /** + /** * Handles a line of output by logging it with the INFO priority. - * + * * @param line The line of output to log. Should not be null. */ protected void handleOutput(String line) { log(line, Project.MSG_INFO); } - - /** + + /** * Handles an error line by logging it with the INFO priority. - * + * * @param line The error line to log. Should not be null. */ protected void handleErrorOutput(String line) { log(line, Project.MSG_ERR); } - - /** - * Logs a message with the default (INFO) priority. - * + + /** + * Logs a message with the default (INFO) priority. + * * @param msg The message to be logged. Should not be null. - */ - public void log(String msg) { - log(msg, Project.MSG_INFO); - } - - /** + */ + public void log(String msg) { + log(msg, Project.MSG_INFO); + } + + /** * Logs a mesage with the given priority. This delegates * the actual logging to the project. - * + * * @param msg The message to be logged. Should not be null. - * @param msgLevel The message priority at which this message is to + * @param msgLevel The message priority at which this message is to * be logged. - */ - public void log(String msg, int msgLevel) { - project.log(this, msg, msgLevel); - } - + */ + public void log(String msg, int msgLevel) { + getProject().log(this, msg, msgLevel); + } + /** * Performs this task if it's still valid, or gets a replacement * version and performs that otherwise. - * + * * Performing a task consists of firing a task started event, * configuring the task, executing it, and then firing task finished * event. If a runtime exception is thrown, the task finished event @@ -314,10 +314,10 @@ public final void perform() { if (!invalid) { try { - project.fireTaskStarted(this); + getProject().fireTaskStarted(this); maybeConfigure(); execute(); - project.fireTaskFinished(this, null); + getProject().fireTaskFinished(this, null); } catch (RuntimeException exc) { if (exc instanceof BuildException) { BuildException be = (BuildException) exc; @@ -325,7 +325,7 @@ be.setLocation(getLocation()); } } - project.fireTaskFinished(this, exc); + getProject().fireTaskFinished(this, exc); throw exc; } } else { @@ -367,7 +367,7 @@ private UnknownElement getReplacement() { if (replacement == null) { replacement = new UnknownElement(taskType); - replacement.setProject(project); + replacement.setProject(getProject()); replacement.setTaskType(taskType); replacement.setTaskName(taskName); replacement.setLocation(location); @@ -393,7 +393,7 @@ while (enum.hasMoreElements()) { RuntimeConfigurable childWrapper = (RuntimeConfigurable) enum.nextElement(); - UnknownElement childElement = + UnknownElement childElement = new UnknownElement(childWrapper.getElementTag()); parentElement.addChild(childElement); childElement.setRuntimeConfigurableWrapper(childWrapper); 1.18 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java Index: TaskAdapter.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- TaskAdapter.java 12 Apr 2002 13:26:50 -0000 1.17 +++ TaskAdapter.java 23 Jul 2002 07:54:47 -0000 1.18 @@ -122,7 +122,7 @@ setProjectM = c.getMethod("setProject", new Class[] {Project.class}); if (setProjectM != null) { - setProjectM.invoke(proxy, new Object[] {project}); + setProjectM.invoke(proxy, new Object[] {getProject()}); } } catch (NoSuchMethodException e) { // ignore this if the class being used as a task does not have 1.28 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.java Index: UnknownElement.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/UnknownElement.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- UnknownElement.java 22 Jun 2002 23:38:30 -0000 1.27 +++ UnknownElement.java 23 Jul 2002 07:54:47 -0000 1.28 @@ -121,7 +121,7 @@ handleChildren(realThing, wrapper); - wrapper.maybeConfigure(project); + wrapper.maybeConfigure(getProject()); } /** @@ -209,7 +209,7 @@ realChild = makeTask(child, childWrapper, false); ((TaskContainer) parent).addTask((Task) realChild); } else { - realChild = ih.createElement(project, parent, child.getTag()); + realChild = ih.createElement(getProject(), parent, child.getTag()); } childWrapper.setProxy(realChild); @@ -238,7 +238,7 @@ protected Object makeObject(UnknownElement ue, RuntimeConfigurable w) { Object o = makeTask(ue, w, true); if (o == null) { - o = project.createDataType(ue.getTag()); + o = getProject().createDataType(ue.getTag()); } if (o == null) { throw getNotFoundException("task or type", ue.getTag()); @@ -263,7 +263,7 @@ */ protected Task makeTask(UnknownElement ue, RuntimeConfigurable w, boolean onTopLevel) { - Task task = project.createTask(ue.getTag()); + Task task = getProject().createTask(ue.getTag()); if (task == null && !onTopLevel) { throw getNotFoundException("task", ue.getTag()); } 1.15 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java Index: AbstractCvsTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- AbstractCvsTask.java 22 Jun 2002 23:38:31 -0000 1.14 +++ AbstractCvsTask.java 23 Jul 2002 07:54:47 -0000 1.15 @@ -309,9 +309,9 @@ // Execute exe = new Execute(getExecuteStreamHandler(), null); - exe.setAntRun(project); + exe.setAntRun(getProject()); if (dest == null) { - dest = project.getBaseDir(); + dest = getProject().getBaseDir(); } if (!dest.exists()) { 1.63 +10 -10 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java Index: Ant.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- Ant.java 16 Jul 2002 13:06:45 -0000 1.62 +++ Ant.java 23 Jul 2002 07:54:47 -0000 1.63 @@ -152,7 +152,7 @@ newProject = new Project(); newProject.setJavaVersionProperty(); newProject.addTaskDefinition("property", - (Class) project.getTaskDefinitions() + (Class) getProject().getTaskDefinitions() .get("property")); } @@ -208,7 +208,7 @@ private void initializeProject() { newProject.setInputHandler(getProject().getInputHandler()); - Vector listeners = project.getBuildListeners(); + Vector listeners = getProject().getBuildListeners(); final int count = listeners.size(); for (int i = 0; i < count; i++) { newProject.addBuildListener((BuildListener) listeners.elementAt(i)); @@ -233,7 +233,7 @@ } } - Hashtable taskdefs = project.getTaskDefinitions(); + Hashtable taskdefs = getProject().getTaskDefinitions(); Enumeration et = taskdefs.keys(); while (et.hasMoreElements()) { String taskName = (String) et.nextElement(); @@ -245,7 +245,7 @@ newProject.addTaskDefinition(taskName, taskClass); } - Hashtable typedefs = project.getDataTypeDefinitions(); + Hashtable typedefs = getProject().getDataTypeDefinitions(); Enumeration e = typedefs.keys(); while (e.hasMoreElements()) { String typeName = (String) e.nextElement(); @@ -322,7 +322,7 @@ } if ((dir == null) && (inheritAll)) { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } initializeProject(); @@ -334,7 +334,7 @@ dir.getAbsolutePath()); } } else { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } overrideProperties(); @@ -358,8 +358,8 @@ // Are we trying to call the target in which we are defined (or // the build file if this is a top level task)? - if (newProject.getBaseDir().equals(project.getBaseDir()) && - newProject.getProperty("ant.file").equals(project.getProperty("ant.file")) + if (newProject.getBaseDir().equals(getProject().getBaseDir()) && + newProject.getProperty("ant.file").equals(getProject().getProperty("ant.file")) && getOwningTarget() != null && (getOwningTarget().getName().equals("") || getOwningTarget().getName().equals(target))) { @@ -411,7 +411,7 @@ * requested. */ private void addReferences() throws BuildException { - Hashtable thisReferences = (Hashtable) project.getReferences().clone(); + Hashtable thisReferences = (Hashtable) getProject().getReferences().clone(); Hashtable newReferences = newProject.getReferences(); Enumeration e; if (references.size() > 0) { @@ -460,7 +460,7 @@ * keep our fingers crossed.

*/ private void copyReference(String oldKey, String newKey) { - Object orig = project.getReference(oldKey); + Object orig = getProject().getReference(oldKey); Class c = orig.getClass(); Object copy = orig; try { 1.27 +7 -11 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java Index: AntStructure.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/AntStructure.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- AntStructure.java 15 Jul 2002 14:41:47 -0000 1.26 +++ AntStructure.java 23 Jul 2002 07:54:47 -0000 1.27 @@ -127,27 +127,25 @@ out = new PrintWriter(new FileWriter(output)); } - printHead(out, project.getTaskDefinitions().keys(), - project.getDataTypeDefinitions().keys()); + printHead(out, getProject().getTaskDefinitions().keys(), + getProject().getDataTypeDefinitions().keys()); printTargetDecl(out); - Enumeration dataTypes = project.getDataTypeDefinitions().keys(); + Enumeration dataTypes = getProject().getDataTypeDefinitions().keys(); while (dataTypes.hasMoreElements()) { String typeName = (String) dataTypes.nextElement(); printElementDecl(out, typeName, - (Class) project.getDataTypeDefinitions().get(typeName)); + (Class) getProject().getDataTypeDefinitions().get(typeName)); } - Enumeration tasks = project.getTaskDefinitions().keys(); + Enumeration tasks = getProject().getTaskDefinitions().keys(); while (tasks.hasMoreElements()) { String taskName = (String) tasks.nextElement(); printElementDecl(out, taskName, - (Class) project.getTaskDefinitions().get(taskName)); + (Class) getProject().getTaskDefinitions().get(taskName)); } - printTail(out); - } catch (IOException ioe) { throw new BuildException("Error writing " + output.getAbsolutePath(), ioe, location); @@ -358,8 +356,6 @@ } } } - - private void printTail(PrintWriter out) {} /** * Does this String match the XML-NMTOKEN production? 1.47 +8 -8 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java Index: Available.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- Available.java 22 Jun 2002 23:38:31 -0000 1.46 +++ Available.java 23 Jul 2002 07:54:47 -0000 1.47 @@ -109,7 +109,7 @@ */ public Path createClasspath() { if (this.classpath == null) { - this.classpath = new Path(project); + this.classpath = new Path(getProject()); } return this.classpath.createPath(); } @@ -141,7 +141,7 @@ */ public Path createFilepath() { if (this.filepath == null) { - this.filepath = new Path(project); + this.filepath = new Path(getProject()); } return this.filepath.createPath(); } @@ -184,9 +184,9 @@ * * @param file the name of the file which is required. */ - public void setFile(File f) { + public void setFile(File file) { this.file = FileUtils.newFileUtils() - .removeLeadingPath(getProject().getBaseDir(), f); + .removeLeadingPath(getProject().getBaseDir(), file); } /** @@ -264,7 +264,7 @@ * Evaluate the availability of a resource. * * @return boolean is the resource is available. - * @exception if the condition is not configured correctly + * @exception BuildException if the condition is not configured correctly */ public boolean eval() throws BuildException { if (classname == null && file == null && resource == null) { @@ -281,8 +281,8 @@ } if (classpath != null) { - classpath.setProject(project); - this.loader = new AntClassLoader(project, classpath); + classpath.setProject(getProject()); + this.loader = new AntClassLoader(getProject(), classpath); } String appendix = ""; @@ -344,7 +344,7 @@ */ private boolean checkFile() { if (filepath == null) { - return checkFile(project.resolveFile(file), file); + return checkFile(getProject().resolveFile(file), file); } else { String[] paths = filepath.list(); for (int i = 0; i < paths.length; ++i) { 1.24 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java Index: Checksum.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Checksum.java 22 Jun 2002 23:38:31 -0000 1.23 +++ Checksum.java 23 Jul 2002 07:54:47 -0000 1.24 @@ -209,7 +209,7 @@ isCondition = false; boolean value = validateAndExecute(); if (verifyProperty != null) { - project.setNewProperty(verifyProperty, + getProject().setNewProperty(verifyProperty, new Boolean(value).toString()); } } @@ -314,10 +314,10 @@ int sizeofFileSet = filesets.size(); for (int i = 0; i < sizeofFileSet; i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] srcFiles = ds.getIncludedFiles(); for (int j = 0; j < srcFiles.length; j++) { - File src = new File(fs.getDir(project), srcFiles[j]); + File src = new File(fs.getDir(getProject()), srcFiles[j]); addToIncludeFileMap(src); } } @@ -400,7 +400,7 @@ if (isCondition) { checksumMatches = checksum.equals(property); } else { - project.setNewProperty(prop, checksum); + getProject().setNewProperty(prop, checksum); } } else if (destination instanceof java.io.File) { if (isCondition) { 1.30 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java Index: Chmod.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Chmod.java 9 Jul 2002 21:05:58 -0000 1.29 +++ Chmod.java 23 Jul 2002 07:54:47 -0000 1.30 @@ -193,7 +193,7 @@ location); } - if (defaultSetDefined && defaultSet.getDir(project) != null) { + if (defaultSetDefined && defaultSet.getDir(getProject()) != null) { addFileset(defaultSet); } super.checkConfiguration(); @@ -206,11 +206,11 @@ * second branch of the if statement below catches for backwards * compatibility. */ - if (defaultSetDefined || defaultSet.getDir(project) == null) { + if (defaultSetDefined || defaultSet.getDir(getProject()) == null) { try { super.execute(); } finally { - if (defaultSetDefined && defaultSet.getDir(project) != null) { + if (defaultSetDefined && defaultSet.getDir(getProject()) != null) { filesets.removeElement(defaultSet); } } @@ -218,7 +218,7 @@ // we are chmodding the given directory Execute execute = prepareExec(); Commandline cloned = (Commandline) cmdl.clone(); - cloned.createArgument().setValue(defaultSet.getDir(project) + cloned.createArgument().setValue(defaultSet.getDir(getProject()) .getPath()); try { execute.setCommandline(cloned.getCommandline()); 1.7 +6 -6 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Concat.java Index: Concat.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Concat.java 22 Jun 2002 23:38:31 -0000 1.6 +++ Concat.java 23 Jul 2002 07:54:47 -0000 1.7 @@ -246,10 +246,10 @@ // determine the files from the set which need to be // concatenated. DirectoryScanner scanner = - fileSet.getDirectoryScanner(project); + fileSet.getDirectoryScanner(getProject()); // Determine the root path. - fileSetBase = fileSet.getDir(project); + fileSetBase = fileSet.getDir(getProject()); // Get the list of files. srcFiles = scanner.getIncludedFiles(); @@ -259,10 +259,10 @@ FileList fileList = (FileList) next; // Determine the root path. - fileSetBase = fileList.getDir(project); + fileSetBase = fileList.getDir(getProject()); // Get the list of files. - srcFiles = fileList.getFiles(project); + srcFiles = fileList.getFiles(getProject()); } @@ -455,8 +455,8 @@ String text = textBuffer.toString(); // Replace ${property} strings. - text = ProjectHelper.replaceProperties(project, text, - project.getProperties()); + text = ProjectHelper.replaceProperties(getProject(), text, + getProject().getProperties()); // Set up a writer if necessary. FileWriter writer = null; 1.45 +7 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copy.java Index: Copy.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copy.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- Copy.java 9 Jul 2002 21:05:58 -0000 1.44 +++ Copy.java 23 Jul 2002 07:54:47 -0000 1.45 @@ -282,7 +282,7 @@ throw new BuildException("Cannot define more than one mapper", location); } - mapperElement = new Mapper(project); + mapperElement = new Mapper(getProject()); return mapperElement; } @@ -351,8 +351,8 @@ // deal with the filesets for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); - File fromDir = fs.getDir(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + File fromDir = fs.getDir(getProject()); String[] srcFiles = ds.getIncludedFiles(); String[] srcDirs = ds.getIncludedDirectories(); @@ -416,7 +416,7 @@ "Cannot concatenate multiple files into a single file."); } else { FileSet fs = (FileSet) filesets.elementAt(0); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] srcFiles = ds.getIncludedFiles(); if (srcFiles.length == 0) { @@ -517,7 +517,7 @@ new FilterSetCollection(); if (filtering) { executionFilters - .addFilterSet(project.getGlobalFilterSet()); + .addFilterSet(getProject().getGlobalFilterSet()); } for (Enumeration filterEnum = filterSets.elements(); filterEnum.hasMoreElements();) { @@ -527,7 +527,7 @@ fileUtils.copyFile(fromFile, toFile, executionFilters, filterChains, forceOverwrite, preserveLastModified, encoding, - project); + getProject()); } catch (IOException ioe) { String msg = "Failed to copy " + fromFile + " to " + toFile + " due to " + ioe.getMessage(); 1.23 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java Index: Copydir.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Copydir.java 12 Apr 2002 14:46:44 -0000 1.22 +++ Copydir.java 23 Jul 2002 07:54:47 -0000 1.23 @@ -137,7 +137,7 @@ String fromFile = (String) enum.nextElement(); String toFile = (String) filecopyList.get(fromFile); try { - project.copyFile(fromFile, toFile, filtering, + getProject().copyFile(fromFile, toFile, filtering, forceOverwrite); } catch (IOException ioe) { String msg = "Failed to copy " + fromFile + " to " 1.14 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copyfile.java Index: Copyfile.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copyfile.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Copyfile.java 11 Apr 2002 09:19:06 -0000 1.13 +++ Copyfile.java 23 Jul 2002 07:54:47 -0000 1.14 @@ -120,7 +120,7 @@ if (forceOverwrite || srcFile.lastModified() > destFile.lastModified()) { try { - project.copyFile(srcFile, destFile, filtering, forceOverwrite); + getProject().copyFile(srcFile, destFile, filtering, forceOverwrite); } catch (IOException ioe) { String msg = "Error copying file: " + srcFile.getAbsolutePath() + " due to " + ioe.getMessage(); 1.18 +7 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java Index: Definer.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Definer.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Definer.java 22 Jun 2002 23:38:31 -0000 1.17 +++ Definer.java 23 Jul 2002 07:54:47 -0000 1.18 @@ -117,7 +117,7 @@ */ public Path createClasspath() { if (this.classpath == null) { - this.classpath = new Path(project); + this.classpath = new Path(getProject()); } return this.classpath.createPath(); } @@ -246,7 +246,7 @@ */ private AntClassLoader createLoader() { // magic property - if (project.getProperty(REUSE_LOADER_REF) != null) { + if (getProject().getProperty(REUSE_LOADER_REF) != null) { // Generate the 'reuse' name automatically from the reference. // This allows that work on both ant1.4 and ant1.5. // ( in 1.4 it'll require the task/type to be in classpath if they @@ -258,7 +258,7 @@ // If a loader has been set ( either by loaderRef or magic property ) if (loaderId != null) { - Object reusedLoader = project.getReference(loaderId); + Object reusedLoader = getProject().getReference(loaderId); if (reusedLoader != null) { if (reusedLoader instanceof AntClassLoader) { return (AntClassLoader)reusedLoader; @@ -272,9 +272,9 @@ AntClassLoader al = null; if (classpath != null) { - al = new AntClassLoader(project, classpath, !reverseLoader); + al = new AntClassLoader(getProject(), classpath, !reverseLoader); } else { - al = new AntClassLoader(project, Path.systemClasspath, + al = new AntClassLoader(getProject(), Path.systemClasspath, !reverseLoader); } // need to load Task via system classloader or the new @@ -286,8 +286,8 @@ // If the loader is new, record it for future uses by other // task/typedefs if (loaderId != null) { - if (project.getReference(loaderId) == null) { - project.addReference(loaderId, al); + if (getProject().getReference(loaderId) == null) { + getProject().addReference(loaderId, al); } } 1.33 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java Index: Delete.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- Delete.java 22 Jun 2002 23:38:31 -0000 1.32 +++ Delete.java 23 Jul 2002 07:54:47 -0000 1.33 @@ -331,10 +331,10 @@ for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); try { - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] files = ds.getIncludedFiles(); String[] dirs = ds.getIncludedDirectories(); - removeFiles(fs.getDir(project), files, dirs); + removeFiles(fs.getDir(getProject()), files, dirs); } catch (BuildException be) { // directory doesn't exist or is not readable if (failonerror) { 1.19 +9 -9 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/DependSet.java Index: DependSet.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/DependSet.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- DependSet.java 9 Jul 2002 21:05:58 -0000 1.18 +++ DependSet.java 23 Jul 2002 07:54:47 -0000 1.19 @@ -195,12 +195,12 @@ continue; } - DirectoryScanner targetDS = targetFS.getDirectoryScanner(project); + DirectoryScanner targetDS = targetFS.getDirectoryScanner(getProject()); String[] targetFiles = targetDS.getIncludedFiles(); for (int i = 0; i < targetFiles.length; i++) { - File dest = new File(targetFS.getDir(project), targetFiles[i]); + File dest = new File(targetFS.getDir(getProject()), targetFiles[i]); allTargets.addElement(dest); if (dest.lastModified() > now) { @@ -224,11 +224,11 @@ while (enumTargetLists.hasMoreElements()) { FileList targetFL = (FileList) enumTargetLists.nextElement(); - String[] targetFiles = targetFL.getFiles(project); + String[] targetFiles = targetFL.getFiles(getProject()); for (int i = 0; i < targetFiles.length; i++) { - File dest = new File(targetFL.getDir(project), targetFiles[i]); + File dest = new File(targetFL.getDir(getProject()), targetFiles[i]); if (!dest.exists()) { log(targetFiles[i] + " does not exist.", Project.MSG_VERBOSE); upToDate = false; @@ -264,10 +264,10 @@ while (upToDate && enumSourceLists.hasMoreElements()) { FileList sourceFL = (FileList) enumSourceLists.nextElement(); - String[] sourceFiles = sourceFL.getFiles(project); + String[] sourceFiles = sourceFL.getFiles(getProject()); for (int i = 0; upToDate && i < sourceFiles.length; i++) { - File src = new File(sourceFL.getDir(project), sourceFiles[i]); + File src = new File(sourceFL.getDir(getProject()), sourceFiles[i]); if (src.lastModified() > now) { log("Warning: " + sourceFiles[i] @@ -298,11 +298,11 @@ while (upToDate && enumSourceSets.hasMoreElements()) { FileSet sourceFS = (FileSet) enumSourceSets.nextElement(); - DirectoryScanner sourceDS = sourceFS.getDirectoryScanner(project); + DirectoryScanner sourceDS = sourceFS.getDirectoryScanner(getProject()); String[] sourceFiles = sourceDS.getIncludedFiles(); for (int i = 0; upToDate && i < sourceFiles.length; i++) { - File src = new File(sourceFS.getDir(project), sourceFiles[i]); + File src = new File(sourceFS.getDir(getProject()), sourceFiles[i]); if (src.lastModified() > now) { log("Warning: " + sourceFiles[i] 1.23 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Echo.java Index: Echo.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Echo.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Echo.java 9 Jul 2002 21:05:58 -0000 1.22 +++ Echo.java 23 Jul 2002 07:54:47 -0000 1.23 @@ -131,7 +131,7 @@ * Set a multiline message. */ public void addText(String msg) { - message += project.replaceProperties(msg); + message += getProject().replaceProperties(msg); } /** 1.30 +10 -15 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java Index: Exec.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Exec.java 15 Apr 2002 15:33:08 -0000 1.29 +++ Exec.java 23 Jul 2002 07:54:47 -0000 1.30 @@ -87,8 +87,6 @@ protected PrintWriter fos = null; private boolean failOnError = false; - private static final int BUFFER_SIZE = 512; - public Exec() { System.err.println("As of Ant 1.2 released in October 2000, " + "the Exec class"); @@ -116,31 +114,31 @@ // default directory to the project's base directory if (dir == null) { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } if (myos.toLowerCase().indexOf("windows") >= 0) { - if (!dir.equals(project.resolveFile("."))) { + if (!dir.equals(getProject().resolveFile("."))) { if (myos.toLowerCase().indexOf("nt") >= 0) { command = "cmd /c cd " + dir + " && " + command; } else { - String ant = project.getProperty("ant.home"); + String ant = getProject().getProperty("ant.home"); if (ant == null) { throw new BuildException("Property 'ant.home' not " + "found", location); } - String antRun = project.resolveFile(ant + "/bin/antRun.bat").toString(); + String antRun = getProject().resolveFile(ant + "/bin/antRun.bat").toString(); command = antRun + " " + dir + " " + command; } } } else { - String ant = project.getProperty("ant.home"); + String ant = getProject().getProperty("ant.home"); if (ant == null) { throw new BuildException("Property 'ant.home' not found", location); } - String antRun = project.resolveFile(ant + "/bin/antRun").toString(); + String antRun = getProject().resolveFile(ant + "/bin/antRun").toString(); command = antRun + " " + dir + " " + command; } @@ -159,9 +157,9 @@ // copy input and error to the output stream StreamPumper inputPumper = - new StreamPumper(proc.getInputStream(), Project.MSG_INFO, this); + new StreamPumper(proc.getInputStream(), Project.MSG_INFO); StreamPumper errorPumper = - new StreamPumper(proc.getErrorStream(), Project.MSG_WARN, this); + new StreamPumper(proc.getErrorStream(), Project.MSG_WARN); // starts pumping away the generated output/error inputPumper.start(); @@ -193,7 +191,7 @@ } public void setDir(String d) { - this.dir = project.resolveFile(d); + this.dir = getProject().resolveFile(d); } public void setOs(String os) { @@ -233,16 +231,13 @@ private int messageLevel; private boolean endOfStream = false; private int SLEEP_TIME = 5; - private Exec parent; - public StreamPumper(InputStream is, int messageLevel, Exec parent) { + public StreamPumper(InputStream is, int messageLevel) { this.din = new BufferedReader(new InputStreamReader(is)); this.messageLevel = messageLevel; - this.parent = parent; } public void pumpStream() throws IOException { - byte[] buf = new byte[BUFFER_SIZE]; if (!endOfStream) { String line = din.readLine(); 1.40 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java Index: ExecTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- ExecTask.java 9 Jul 2002 21:05:58 -0000 1.39 +++ ExecTask.java 23 Jul 2002 07:54:47 -0000 1.40 @@ -216,7 +216,7 @@ protected void maybeSetResultPropertyValue(int result) { String res = Integer.toString(result); if (resultProperty != null) { - project.setNewProperty(resultProperty, res); + getProject().setNewProperty(resultProperty, res); } } @@ -301,7 +301,7 @@ protected Execute prepareExec() throws BuildException { // default directory to the project's base directory if (dir == null) { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } Execute exe = new Execute(createHandler(), createWatchdog()); exe.setAntRun(getProject()); @@ -351,7 +351,7 @@ } val.append(line); } - project.setNewProperty(outputprop, val.toString()); + getProject().setNewProperty(outputprop, val.toString()); } } 1.33 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java Index: ExecuteOn.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- ExecuteOn.java 9 Jul 2002 21:05:58 -0000 1.32 +++ ExecuteOn.java 23 Jul 2002 07:54:47 -0000 1.33 @@ -180,7 +180,7 @@ throw new BuildException("Cannot define more than one mapper", location); } - mapperElement = new Mapper(project); + mapperElement = new Mapper(getProject()); return mapperElement; } @@ -219,8 +219,8 @@ Vector baseDirs = new Vector(); for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - File base = fs.getDir(project); - DirectoryScanner ds = fs.getDirectoryScanner(project); + File base = fs.getDir(getProject()); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); if (!"dir".equals(type)) { String[] s = getFiles(base, ds); 1.19 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exit.java Index: Exit.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exit.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Exit.java 9 Jul 2002 21:05:58 -0000 1.18 +++ Exit.java 23 Jul 2002 07:54:47 -0000 1.19 @@ -115,7 +115,7 @@ if (message == null) { message = ""; } - message += project.replaceProperties(msg); + message += getProject().replaceProperties(msg); } private boolean testIfCondition() { @@ -123,14 +123,14 @@ return true; } - return project.getProperty(ifCondition) != null; + return getProject().getProperty(ifCondition) != null; } private boolean testUnlessCondition() { if (unlessCondition == null || "".equals(unlessCondition)) { return true; } - return project.getProperty(unlessCondition) == null; + return getProject().getProperty(unlessCondition) == null; } } 1.32 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Expand.java Index: Expand.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Expand.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- Expand.java 1 Jun 2002 12:26:38 -0000 1.31 +++ Expand.java 23 Jul 2002 07:54:47 -0000 1.32 @@ -130,8 +130,8 @@ if (filesets.size() > 0) { for (int j = 0; j < filesets.size(); j++) { FileSet fs = (FileSet) filesets.elementAt(j); - DirectoryScanner ds = fs.getDirectoryScanner(project); - File fromDir = fs.getDir(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + File fromDir = fs.getDir(getProject()); String[] files = ds.getIncludedFiles(); for (int i = 0; i < files.length; ++i) { @@ -183,7 +183,7 @@ boolean included = false; for (int v = 0; v < patternsets.size(); v++) { PatternSet p = (PatternSet) patternsets.elementAt(v); - String[] incls = p.getIncludePatterns(project); + String[] incls = p.getIncludePatterns(getProject()); if (incls != null) { for (int w = 0; w < incls.length; w++) { boolean isIncl = @@ -194,7 +194,7 @@ } } } - String[] excls = p.getExcludePatterns(project); + String[] excls = p.getExcludePatterns(getProject()); if (excls != null) { for (int w = 0; w < excls.length; w++) { boolean isExcl = 1.19 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Filter.java Index: Filter.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Filter.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Filter.java 9 Jul 2002 21:05:58 -0000 1.18 +++ Filter.java 23 Jul 2002 07:54:47 -0000 1.19 @@ -119,7 +119,7 @@ } if (isSingleFilter) { - project.getGlobalFilterSet().addFilter(token, value); + getProject().getGlobalFilterSet().addFilter(token, value); } if (isFiltersFromFile) { @@ -129,6 +129,6 @@ protected void readFilters() throws BuildException { log("Reading filters from " + filtersFile, Project.MSG_VERBOSE); - project.getGlobalFilterSet().readFiltersFromFile(filtersFile); + getProject().getGlobalFilterSet().readFiltersFromFile(filtersFile); } } 1.18 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java Index: GenerateKey.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- GenerateKey.java 22 Jun 2002 23:38:31 -0000 1.17 +++ GenerateKey.java 23 Jul 2002 07:54:47 -0000 1.18 @@ -400,7 +400,7 @@ } log("Generating Key for " + alias); - final ExecTask cmd = (ExecTask) project.createTask("exec"); + final ExecTask cmd = (ExecTask) getProject().createTask("exec"); cmd.setExecutable("keytool"); Commandline.Argument arg = cmd.createArg(); arg.setLine(sb.toString()); 1.14 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Input.java Index: Input.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Input.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Input.java 28 Jun 2002 12:47:18 -0000 1.13 +++ Input.java 23 Jul 2002 07:54:47 -0000 1.14 @@ -155,7 +155,7 @@ value = defaultvalue; } if (addproperty != null) { - project.setNewProperty(addproperty, value); + getProject().setNewProperty(addproperty, value); } } 1.5 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java Index: JDBCTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- JDBCTask.java 9 Jul 2002 21:05:58 -0000 1.4 +++ JDBCTask.java 23 Jul 2002 07:54:48 -0000 1.5 @@ -204,7 +204,7 @@ */ public Path createClasspath() { if (this.classpath == null) { - this.classpath = new Path(project); + this.classpath = new Path(getProject()); } return this.classpath.createPath(); } @@ -383,7 +383,7 @@ log( "Loading " + driver + " using AntClassLoader with classpath " + classpath, Project.MSG_VERBOSE); - loader = new AntClassLoader(project, classpath); + loader = new AntClassLoader(getProject(), classpath); if (caching) { loaderMap.put(driver, loader); } 1.48 +5 -5 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Java.java Index: Java.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- Java.java 9 Jul 2002 21:05:58 -0000 1.47 +++ Java.java 23 Jul 2002 07:54:48 -0000 1.48 @@ -196,7 +196,7 @@ * Adds a path to the classpath. */ public Path createClasspath() { - return cmdl.createClasspath(project).createPath(); + return cmdl.createClasspath(getProject()).createPath(); } /** @@ -403,7 +403,7 @@ outStream = new PrintStream(new FileOutputStream(out.getAbsolutePath(), append)); - exe.execute(project); + exe.execute(getProject()); } catch (IOException io) { throw new BuildException(io, location); } finally { @@ -412,7 +412,7 @@ } } } else { - exe.execute(project); + exe.execute(getProject()); } } @@ -433,10 +433,10 @@ createWatchdog()); } - exe.setAntRun(project); + exe.setAntRun(getProject()); if (dir == null) { - dir = project.getBaseDir(); + dir = getProject().getBaseDir(); } else if (!dir.exists() || !dir.isDirectory()) { throw new BuildException(dir.getAbsolutePath() + " is not a valid directory", 1.105 +7 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java Index: Javac.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- Javac.java 9 Jul 2002 21:05:58 -0000 1.104 +++ Javac.java 23 Jul 2002 07:54:48 -0000 1.105 @@ -214,7 +214,7 @@ */ public Path createSrc() { if (src == null) { - src = new Path(project); + src = new Path(getProject()); } return src.createPath(); } @@ -282,7 +282,7 @@ */ public Path createSourcepath() { if (compileSourcepath == null) { - compileSourcepath = new Path(project); + compileSourcepath = new Path(getProject()); } return compileSourcepath.createPath(); } @@ -317,7 +317,7 @@ */ public Path createClasspath() { if (compileClasspath == null) { - compileClasspath = new Path(project); + compileClasspath = new Path(getProject()); } return compileClasspath.createPath(); } @@ -354,7 +354,7 @@ */ public Path createBootclasspath() { if (bootclasspath == null) { - bootclasspath = new Path(project); + bootclasspath = new Path(getProject()); } return bootclasspath.createPath(); } @@ -391,7 +391,7 @@ */ public Path createExtdirs() { if (extdirs == null) { - extdirs = new Path(project); + extdirs = new Path(getProject()); } return extdirs.createPath(); } @@ -666,7 +666,7 @@ // compile lists String[] list = src.list(); for (int i = 0; i < list.length; i++) { - File srcDir = project.resolveFile(list[i]); + File srcDir = getProject().resolveFile(list[i]); if (!srcDir.exists()) { throw new BuildException("srcdir \"" + srcDir.getPath() 1.100 +7 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Index: Javadoc.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- Javadoc.java 9 Jul 2002 21:05:58 -0000 1.99 +++ Javadoc.java 23 Jul 2002 07:54:48 -0000 1.100 @@ -535,7 +535,7 @@ */ public Path createSourcepath() { if (sourcePath == null) { - sourcePath = new Path(project); + sourcePath = new Path(getProject()); } return sourcePath.createPath(); } @@ -570,7 +570,7 @@ while (tok.hasMoreTokens()) { String f = tok.nextToken(); SourceFile sf = new SourceFile(); - sf.setFile(project.resolveFile(f)); + sf.setFile(getProject().resolveFile(f)); addSource(sf); } } @@ -806,7 +806,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } @@ -840,7 +840,7 @@ */ public Path createBootclasspath() { if (bootclasspath == null) { - bootclasspath = new Path(project); + bootclasspath = new Path(getProject()); } return bootclasspath.createPath(); } @@ -1067,7 +1067,7 @@ if (!tok.hasMoreTokens()) { throw new BuildException(linkOfflineError); } - le.setPackagelistLoc(project.resolveFile(tok.nextToken())); + le.setPackagelistLoc(getProject().resolveFile(tok.nextToken())); } } @@ -1823,7 +1823,7 @@ JavadocOutputStream out = new JavadocOutputStream(Project.MSG_INFO); JavadocOutputStream err = new JavadocOutputStream(Project.MSG_WARN); Execute exe = new Execute(new PumpStreamHandler(out, err)); - exe.setAntRun(project); + exe.setAntRun(getProject()); /* * No reason to change the working directory as all filenames and @@ -2012,7 +2012,7 @@ * Convenience method to expand properties. */ protected String expand(String content) { - return project.replaceProperties(content); + return getProject().replaceProperties(content); } } 1.20 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java Index: LoadFile.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadFile.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- LoadFile.java 22 Jun 2002 23:38:32 -0000 1.19 +++ LoadFile.java 23 Jul 2002 07:54:48 -0000 1.20 @@ -188,7 +188,7 @@ crh.setBufferSize(size); crh.setPrimaryReader(instream); crh.setFilterChains(filterChains); - crh.setProject(project); + crh.setProject(getProject()); instream = crh.getAssembledReader(); text = crh.readFully(instream); @@ -196,7 +196,7 @@ if (text != null) { if (text.length() > 0) { - project.setNewProperty(property, text); + getProject().setNewProperty(property, text); log("loaded " + text.length() + " characters", Project.MSG_VERBOSE); log(property + " := " + text, Project.MSG_DEBUG); 1.9 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java Index: LoadProperties.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- LoadProperties.java 19 Jul 2002 17:48:36 -0000 1.8 +++ LoadProperties.java 23 Jul 2002 07:54:48 -0000 1.9 @@ -158,7 +158,7 @@ crh.setBufferSize(size); crh.setPrimaryReader(instream); crh.setFilterChains(filterChains); - crh.setProject(project); + crh.setProject(getProject()); instream = crh.getAssembledReader(); String text = crh.readFully(instream); @@ -182,7 +182,7 @@ final String value = props.getProperty(key); if (key != null && value != null && value.trim().length() > 0) { - project.setNewProperty(key, value); + getProject().setNewProperty(key, value); } } tis.close(); 1.28 +1 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java Index: MatchingTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- MatchingTask.java 9 Jul 2002 21:05:59 -0000 1.27 +++ MatchingTask.java 23 Jul 2002 07:54:48 -0000 1.28 @@ -209,7 +209,7 @@ protected DirectoryScanner getDirectoryScanner(File baseDir) { fileset.setDir(baseDir); fileset.setDefaultexcludes(useDefaultExcludes); - return fileset.getDirectoryScanner(project); + return fileset.getDirectoryScanner(getProject()); } /** @@ -291,7 +291,6 @@ * Add a new selector into this container. * * @param selector the new selector to add - * @return the selector that was added */ public void appendSelector(FileSelector selector) { fileset.appendSelector(selector); 1.28 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Move.java Index: Move.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Move.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- Move.java 22 Jun 2002 23:38:32 -0000 1.27 +++ Move.java 23 Jul 2002 07:54:48 -0000 1.28 @@ -160,7 +160,7 @@ new FilterSetCollection(); if (filtering) { executionFilters - .addFilterSet(project.getGlobalFilterSet()); + .addFilterSet(getProject().getGlobalFilterSet()); } for (Enumeration filterEnum = getFilterSets().elements(); @@ -173,7 +173,7 @@ getFilterChains(), forceOverwrite, getPreserveLastModified(), - getEncoding(), project); + getEncoding(), getProject()); f = new File(fromFile); if (!f.delete()) { @@ -217,7 +217,7 @@ Enumeration e = filesets.elements(); while (e.hasMoreElements()) { FileSet fs = (FileSet) e.nextElement(); - File dir = fs.getDir(project); + File dir = fs.getDir(getProject()); if (okToDelete(dir)) { deleteDir(dir); 1.52 +6 -6 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java Index: Property.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Property.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- Property.java 9 Jul 2002 21:05:59 -0000 1.51 +++ Property.java 23 Jul 2002 07:54:48 -0000 1.52 @@ -276,7 +276,7 @@ */ public Path createClasspath() { if (this.classpath == null) { - this.classpath = new Path(project); + this.classpath = new Path(getProject()); } return this.classpath.createPath(); } @@ -408,7 +408,7 @@ ClassLoader cL = null; if (classpath != null) { - cL = new AntClassLoader(project, classpath); + cL = new AntClassLoader(getProject(), classpath); } else { cL = this.getClass().getClassLoader(); } @@ -472,7 +472,7 @@ String name = (String) e.nextElement(); String value = props.getProperty(name); - String v = project.replaceProperties(value); + String v = getProject().replaceProperties(value); if (prefix != null) { name = prefix + name; @@ -489,13 +489,13 @@ */ protected void addProperty(String n, String v) { if (userProperty) { - if (project.getUserProperty(n) == null) { - project.setInheritedProperty(n, v); + if (getProject().getUserProperty(n) == null) { + getProject().setInheritedProperty(n, v); } else { log("Override ignored for " + n, Project.MSG_VERBOSE); } } else { - project.setNewProperty(n, v); + getProject().setNewProperty(n, v); } } 1.39 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java Index: Rmic.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rmic.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- Rmic.java 22 Jun 2002 23:38:32 -0000 1.38 +++ Rmic.java 23 Jul 2002 07:54:48 -0000 1.39 @@ -259,7 +259,7 @@ */ public Path createClasspath() { if (compileClasspath == null) { - compileClasspath = new Path(project); + compileClasspath = new Path(getProject()); } return compileClasspath.createPath(); } @@ -414,7 +414,7 @@ */ public Path createExtdirs() { if (extdirs == null) { - extdirs = new Path(project); + extdirs = new Path(getProject()); } return extdirs.createPath(); } @@ -493,7 +493,7 @@ adapter.setRmic(this); Path classpath = adapter.getClasspath(); - loader = new AntClassLoader(project, classpath); + loader = new AntClassLoader(getProject(), classpath); try { // scan base dirs to build up compile lists only if a 1.45 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java Index: SQLExec.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- SQLExec.java 9 Jul 2002 21:05:59 -0000 1.44 +++ SQLExec.java 23 Jul 2002 07:54:48 -0000 1.45 @@ -338,8 +338,8 @@ // deal with the filesets for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); - File srcDir = fs.getDir(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + File srcDir = fs.getDir(getProject()); String[] srcFiles = ds.getIncludedFiles(); @@ -435,7 +435,7 @@ while ((line = in.readLine()) != null){ line = line.trim(); - line = project.replaceProperties(line); + line = getProject().replaceProperties(line); if (line.startsWith("//")) { continue; } 1.23 +3 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SignJar.java Index: SignJar.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SignJar.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- SignJar.java 22 Jun 2002 23:38:32 -0000 1.22 +++ SignJar.java 23 Jul 2002 07:54:48 -0000 1.23 @@ -62,7 +62,6 @@ import org.apache.tools.ant.Task; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; -import org.apache.tools.ant.Project; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.util.JavaEnvUtils; @@ -235,10 +234,10 @@ // deal with the filesets for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] jarFiles = ds.getIncludedFiles(); for (int j = 0; j < jarFiles.length; j++) { - doOneJar(new File(fs.getDir(project), jarFiles[j]), null); + doOneJar(new File(fs.getDir(getProject()), jarFiles[j]), null); } } } @@ -266,7 +265,7 @@ return; } - final ExecTask cmd = (ExecTask) project.createTask("exec"); + final ExecTask cmd = (ExecTask) getProject().createTask("exec"); cmd.setExecutable("jarsigner"); if (null != keystore) { 1.34 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java Index: Tar.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- Tar.java 22 Jun 2002 23:38:32 -0000 1.33 +++ Tar.java 23 Jul 2002 07:54:48 -0000 1.34 @@ -265,14 +265,14 @@ boolean upToDate = true; for (Enumeration e = filesets.elements(); e.hasMoreElements();) { TarFileSet fs = (TarFileSet) e.nextElement(); - String[] files = fs.getFiles(project); + String[] files = fs.getFiles(getProject()); if (!archiveIsUpToDate(files)) { upToDate = false; } for (int i = 0; i < files.length; ++i) { - if (tarFile.equals(new File(fs.getDir(project), + if (tarFile.equals(new File(fs.getDir(getProject()), files[i]))) { throw new BuildException("A tar file cannot include " + "itself", location); @@ -309,7 +309,7 @@ for (Enumeration e = filesets.elements(); e.hasMoreElements();) { TarFileSet fs = (TarFileSet) e.nextElement(); - String[] files = fs.getFiles(project); + String[] files = fs.getFiles(getProject()); if (files.length > 1 && fs.getFullpath().length() > 0) { throw new BuildException("fullpath attribute may only " + "be specified for " @@ -317,7 +317,7 @@ + "single file."); } for (int i = 0; i < files.length; i++) { - File f = new File(fs.getDir(project), files[i]); + File f = new File(fs.getDir(getProject()), files[i]); String name = files[i].replace(File.separatorChar, '/'); tarFile(f, tOut, name, fs); } 1.24 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java Index: Taskdef.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Taskdef.java 22 Jun 2002 23:38:32 -0000 1.23 +++ Taskdef.java 23 Jul 2002 07:54:48 -0000 1.24 @@ -79,6 +79,6 @@ * execution. */ protected void addDefinition(String name, Class c) throws BuildException { - project.addTaskDefinition(name, c); + getProject().addTaskDefinition(name, c); } } 1.3 +2 -6 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/TempFile.java Index: TempFile.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/TempFile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TempFile.java 1 Jun 2002 12:26:38 -0000 1.2 +++ TempFile.java 23 Jul 2002 07:54:48 -0000 1.3 @@ -54,10 +54,6 @@ package org.apache.tools.ant.taskdefs; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Properties; import org.apache.tools.ant.Task; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.util.FileUtils; @@ -155,10 +151,10 @@ throw new BuildException("no property specified"); } if (destDir == null) { - destDir = project.resolveFile("."); + destDir = getProject().resolveFile("."); } FileUtils utils = FileUtils.newFileUtils(); File tfile = utils.createTempFile(prefix, suffix, destDir); - project.setNewProperty(property, tfile.toString()); + getProject().setNewProperty(property, tfile.toString()); } } 1.26 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Touch.java Index: Touch.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Touch.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- Touch.java 22 Jun 2002 23:38:32 -0000 1.25 +++ Touch.java 23 Jul 2002 07:54:48 -0000 1.26 @@ -210,8 +210,8 @@ // deal with the filesets for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); - File fromDir = fs.getDir(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + File fromDir = fs.getDir(getProject()); String[] srcFiles = ds.getIncludedFiles(); String[] srcDirs = ds.getIncludedDirectories(); 1.30 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tstamp.java Index: Tstamp.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tstamp.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Tstamp.java 9 Jul 2002 21:05:59 -0000 1.29 +++ Tstamp.java 23 Jul 2002 07:54:48 -0000 1.30 @@ -112,18 +112,18 @@ Enumeration i = customFormats.elements(); while (i.hasMoreElements()) { CustomFormat cts = (CustomFormat) i.nextElement(); - cts.execute(project, d, location); + cts.execute(getProject(), d, location); } SimpleDateFormat dstamp = new SimpleDateFormat ("yyyyMMdd"); - project.setNewProperty(prefix + "DSTAMP", dstamp.format(d)); + getProject().setNewProperty(prefix + "DSTAMP", dstamp.format(d)); SimpleDateFormat tstamp = new SimpleDateFormat ("HHmm"); - project.setNewProperty(prefix + "TSTAMP", tstamp.format(d)); + getProject().setNewProperty(prefix + "TSTAMP", tstamp.format(d)); SimpleDateFormat today = new SimpleDateFormat ("MMMM d yyyy", Locale.US); - project.setNewProperty(prefix + "TODAY", today.format(d)); + getProject().setNewProperty(prefix + "TODAY", today.format(d)); } catch (Exception e) { throw new BuildException(e); 1.9 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Typedef.java Index: Typedef.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Typedef.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Typedef.java 22 Jun 2002 23:38:32 -0000 1.8 +++ Typedef.java 23 Jul 2002 07:54:48 -0000 1.9 @@ -84,6 +84,6 @@ * implement abstract callback of parent class */ protected void addDefinition(String name, Class c) throws BuildException { - project.addDataTypeDefinition(name, c); + getProject().addDataTypeDefinition(name, c); } } 1.13 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java Index: Unpack.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Unpack.java 22 Jun 2002 23:38:32 -0000 1.12 +++ Unpack.java 23 Jul 2002 07:54:48 -0000 1.13 @@ -82,7 +82,7 @@ public void setSrc(String src) { log("DEPRECATED - The setSrc(String) method has been deprecated." + " Use setSrc(File) instead."); - setSrc(project.resolveFile(src)); + setSrc(getProject().resolveFile(src)); } /** @@ -95,7 +95,7 @@ public void setDest(String dest) { log("DEPRECATED - The setDest(String) method has been deprecated." + " Use setDest(File) instead."); - setDest(project.resolveFile(dest)); + setDest(getProject().resolveFile(dest)); } /** 1.22 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java Index: UpToDate.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- UpToDate.java 9 Jul 2002 21:05:59 -0000 1.21 +++ UpToDate.java 23 Jul 2002 07:54:48 -0000 1.22 @@ -156,7 +156,7 @@ throw new BuildException("Cannot define more than one mapper", location); } - mapperElement = new Mapper(project); + mapperElement = new Mapper(getProject()); return mapperElement; } @@ -196,8 +196,8 @@ boolean upToDate = true; while (upToDate && enum.hasMoreElements()) { FileSet fs = (FileSet) enum.nextElement(); - DirectoryScanner ds = fs.getDirectoryScanner(project); - upToDate = upToDate && scanDir(fs.getDir(project), + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); + upToDate = upToDate && scanDir(fs.getDir(getProject()), ds.getIncludedFiles()); } @@ -229,7 +229,7 @@ } boolean upToDate = eval(); if (upToDate) { - this.project.setNewProperty(_property, getValue()); + this.getProject().setNewProperty(_property, getValue()); if (mapperElement == null) { log("File \"" + _targetFile.getAbsolutePath() + "\" is up-to-date.", Project.MSG_VERBOSE); 1.13 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/WaitFor.java Index: WaitFor.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/WaitFor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- WaitFor.java 22 Jun 2002 23:38:32 -0000 1.12 +++ WaitFor.java 23 Jul 2002 07:54:48 -0000 1.13 @@ -164,7 +164,7 @@ } if (timeoutProperty != null) { - project.setNewProperty(timeoutProperty, "true"); + getProject().setNewProperty(timeoutProperty, "true"); } } finally { maxWaitMillis = savedMaxWaitMillis; @@ -175,7 +175,7 @@ /** * The enumeration of units: * millisecond, second, minute, hour, day, week - * @todo: we use timestamps in many places, why not factor this out + * @todo we use timestamps in many places, why not factor this out */ public static class Unit extends EnumeratedAttribute { 1.49 +7 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java Index: XSLTProcess.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- XSLTProcess.java 12 Jul 2002 21:25:29 -0000 1.48 +++ XSLTProcess.java 23 Jul 2002 07:54:48 -0000 1.49 @@ -193,7 +193,7 @@ try { if (baseDir == null) { - baseDir = project.resolveFile("."); + baseDir = getProject().resolveFile("."); } liaison = getLiaison(); @@ -205,7 +205,7 @@ log("Using " + liaison.getClass().toString(), Project.MSG_VERBOSE); - File stylesheet = project.resolveFile(xslFile); + File stylesheet = getProject().resolveFile(xslFile); if (!stylesheet.exists()) { stylesheet = fileUtils.resolveFile(baseDir, xslFile); /* @@ -326,7 +326,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } @@ -398,7 +398,7 @@ if (classpath == null) { return Class.forName(classname); } else { - AntClassLoader al = new AntClassLoader(project, classpath); + AntClassLoader al = new AntClassLoader(getProject(), classpath); Class c = al.loadClass(classname); AntClassLoader.initializeClass(c); return c; @@ -702,7 +702,7 @@ */ public void init() throws BuildException { super.init(); - xmlCatalog.setProject(project); + xmlCatalog.setProject(getProject()); } /** @@ -810,7 +810,7 @@ /** * Create an instance of a factory attribute. - * @return the newly created factory attribute + * the newly created factory attribute */ public void addAttribute(Attribute attr) { attributes.addElement(attr); 1.6 +2 -5 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java Index: XmlProperty.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- XmlProperty.java 9 Jul 2002 21:05:59 -0000 1.5 +++ XmlProperty.java 23 Jul 2002 07:54:48 -0000 1.6 @@ -63,13 +63,11 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.FactoryConfigurationError; import javax.xml.parsers.ParserConfigurationException; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import java.util.Vector; /** * Loads property values from a valid XML file, @@ -91,7 +89,6 @@ * * @author Nicola Ken Barozzi * @author Erik Hatcher - * @created 14 January 2002 * @ant.task name="xmlproperty" category="xml" */ @@ -201,7 +198,7 @@ String attributeValue = attributeNode.getNodeValue(); log(attributeName + ":" + attributeValue, Project.MSG_DEBUG); - project.setNewProperty(attributeName, attributeValue); + getProject().setNewProperty(attributeName, attributeValue); } } @@ -209,7 +206,7 @@ String nodeText = node.getNodeValue(); if (nodeText.trim().length() != 0) { log(prefix + ":" + nodeText, Project.MSG_DEBUG); - project.setNewProperty(prefix, nodeText); + getProject().setNewProperty(prefix, nodeText); } } 1.81 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java Index: Zip.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- Zip.java 9 Jul 2002 21:05:59 -0000 1.80 +++ Zip.java 23 Jul 2002 07:54:48 -0000 1.81 @@ -298,7 +298,7 @@ log("Processing groupfileset ", Project.MSG_VERBOSE); FileSet fs = (FileSet) groupfilesets.elementAt(i); - FileScanner scanner = fs.getDirectoryScanner(project); + FileScanner scanner = fs.getDirectoryScanner(getProject()); String[] files = scanner.getIncludedFiles(); File basedir = scanner.getBasedir(); for (int j = 0; j < files.length; j++) { @@ -319,7 +319,7 @@ } for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - dss.addElement (fs.getDirectoryScanner(project)); + dss.addElement (fs.getDirectoryScanner(getProject())); } int dssSize = dss.size(); FileScanner[] scanners = new FileScanner[dssSize]; @@ -845,7 +845,7 @@ // Add each fileset in the Vector. for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String prefix = ""; String fullpath = ""; 1.17 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java Index: ChangeLogTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ChangeLogTask.java 9 Jul 2002 21:06:01 -0000 1.16 +++ ChangeLogTask.java 23 Jul 2002 07:54:50 -0000 1.17 @@ -262,7 +262,7 @@ while (e.hasMoreElements()) { final FileSet fileSet = (FileSet) e.nextElement(); final DirectoryScanner scanner = - fileSet.getDirectoryScanner(project); + fileSet.getDirectoryScanner(getProject()); final String[] files = scanner.getIncludedFiles(); for (int i = 0; i < files.length; i++) { 1.14 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java Index: EmailTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- EmailTask.java 22 Jun 2002 23:38:35 -0000 1.13 +++ EmailTask.java 23 Jul 2002 07:54:50 -0000 1.14 @@ -353,7 +353,7 @@ StringTokenizer t = new StringTokenizer(filenames, ", "); while (t.hasMoreTokens()) { - files.addElement(project.resolveFile(t.nextToken())); + files.addElement(getProject().resolveFile(t.nextToken())); } } @@ -475,7 +475,7 @@ while (e.hasMoreElements()) { FileSet fs = (FileSet) e.nextElement(); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] includedFiles = ds.getIncludedFiles(); File baseDir = ds.getBasedir(); 1.13 +3 -10 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java Index: ANTLR.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ANTLR.java 9 Jul 2002 21:06:02 -0000 1.12 +++ ANTLR.java 23 Jul 2002 07:54:50 -0000 1.13 @@ -89,9 +89,6 @@ /** an optional super grammar file */ private String superGrammar; - /** optional flag to enable parseView debugging */ - private boolean debug; - /** optional flag to enable html output */ private boolean html; @@ -110,9 +107,6 @@ /** optional flag to add trace methods to the tree walker only */ private boolean traceTreeWalker; - /** should fork ? */ - private final boolean fork = true; - /** working directory */ private File workingdir = null; @@ -148,7 +142,7 @@ * Sets a flag to enable ParseView debugging */ public void setDebug(boolean enable) { - debug = enable; + log( "debug attribute is never used", Project.MSG_WARN); } /** @@ -216,7 +210,7 @@ * because a directory might be given for Antlr debug. */ public Path createClasspath() { - return commandline.createClasspath(project).createPath(); + return commandline.createClasspath(getProject()).createPath(); } /** @@ -329,7 +323,6 @@ // if no output directory is specified, used the target's directory if (outputDirectory == null) { - String fileName = target.toString(); setOutputdirectory(new File(target.getParent())); } if (!outputDirectory.isDirectory()) { @@ -363,7 +356,7 @@ private int run(String[] command) throws BuildException { Execute exe = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN), null); - exe.setAntRun(project); + exe.setAntRun(getProject()); if (workingdir != null) { exe.setWorkingDirectory(workingdir); } 1.20 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java Index: Cab.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Cab.java 22 Jun 2002 23:38:35 -0000 1.19 +++ Cab.java 23 Jul 2002 07:54:50 -0000 1.20 @@ -159,7 +159,7 @@ * it appears in the logs to be the same task as this one. */ protected ExecTask createExec() throws BuildException { - ExecTask exec = (ExecTask) project.createTask("exec"); + ExecTask exec = (ExecTask) getProject().createTask("exec"); exec.setOwningTarget(this.getOwningTarget()); exec.setTaskName(this.getTaskName()); exec.setDescription(this.getDescription()); @@ -253,7 +253,7 @@ for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); if (fs != null) { - appendFiles(files, fs.getDirectoryScanner(project)); + appendFiles(files, fs.getDirectoryScanner(getProject())); } } } 1.13 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java Index: EchoProperties.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- EchoProperties.java 9 Jul 2002 21:06:02 -0000 1.12 +++ EchoProperties.java 23 Jul 2002 07:54:51 -0000 1.13 @@ -243,7 +243,7 @@ use Ant's properties */ if(inFile == null) { // add ant properties - CollectionUtils.putAll(allProps, project.getProperties()); + CollectionUtils.putAll(allProps, getProject().getProperties()); } else { if (inFile.exists() && inFile.isDirectory()) { String message = "srcfile is a directory!"; 1.11 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java Index: IContract.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- IContract.java 9 Jul 2002 21:06:02 -0000 1.10 +++ IContract.java 23 Jul 2002 07:54:51 -0000 1.11 @@ -536,7 +536,7 @@ // Prepare the directories for iContract. iContract will make them if they // don't exist, but for some reason I don't know, it will complain about the REP files // afterwards - Mkdir mkdir = (Mkdir) project.createTask("mkdir"); + Mkdir mkdir = (Mkdir) getProject().createTask("mkdir"); mkdir.setDir(instrumentDir); mkdir.execute(); @@ -549,7 +549,7 @@ Path baseClasspath = createClasspath(); // Might need to add the core classes if we're not using Sun's Javac (like Jikes) - String compiler = project.getProperty("build.compiler"); + String compiler = getProject().getProperty("build.compiler"); ClasspathHelper classpathHelper = new ClasspathHelper(compiler); classpathHelper.modify(baseClasspath); @@ -586,7 +586,7 @@ iContractClasspath.append(new Path(getProject(), buildDir.getAbsolutePath())); // Create a forked java process - Java iContract = (Java) project.createTask("java"); + Java iContract = (Java) getProject().createTask("java"); iContract.setTaskName(getTaskName()); iContract.setFork(true); 1.17 +3 -5 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java Index: Javah.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Javah.java 9 Jul 2002 21:06:02 -0000 1.16 +++ Javah.java 23 Jul 2002 07:54:51 -0000 1.17 @@ -104,8 +104,6 @@ public class Javah extends Task { - private static final String FAIL_MSG = "Compile failed, messages should have been provided."; - private Vector classes = new Vector(2); private String cls; private File destDir; @@ -175,7 +173,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } @@ -204,7 +202,7 @@ */ public Path createBootclasspath() { if (bootclasspath == null) { - bootclasspath = new Path(project); + bootclasspath = new Path(getProject()); } return bootclasspath.createPath(); } @@ -305,7 +303,7 @@ classpath = Path.systemClasspath; } - String compiler = project.getProperty("build.compiler"); + String compiler = getProject().getProperty("build.compiler"); if (compiler == null) { if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1) && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)) { 1.10 +2 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java Index: Native2Ascii.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Native2Ascii.java 9 Jul 2002 21:06:02 -0000 1.9 +++ Native2Ascii.java 23 Jul 2002 07:54:51 -0000 1.10 @@ -142,19 +142,18 @@ throw new BuildException("Cannot define more than one mapper", location); } - mapper = new Mapper(project); + mapper = new Mapper(getProject()); return mapper; } public void execute() throws BuildException { - Commandline baseCmd = null; // the common portion of our cmd line DirectoryScanner scanner = null; // Scanner to find our inputs String[] files; // list of files to process // default srcDir to basedir if (srcDir == null){ - srcDir = project.resolveFile("."); + srcDir = getProject().resolveFile("."); } // Require destDir 1.21 +35 -39 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java Index: NetRexxC.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- NetRexxC.java 9 Jul 2002 21:06:02 -0000 1.20 +++ NetRexxC.java 23 Jul 2002 07:54:51 -0000 1.21 @@ -140,7 +140,6 @@ private boolean diag; private boolean explicit; private boolean format; - private boolean java; private boolean keep; private boolean logo = true; private boolean replace; @@ -174,8 +173,6 @@ // other implementation variables private Vector compileList = new Vector(); private Hashtable filecopyList = new Hashtable(); - private String oldClasspath = System.getProperty("java.class.path"); - /** * Set whether literals are treated as binary, rather than NetRexx types @@ -294,7 +291,7 @@ * false. */ public void setJava(boolean java) { - this.java = java; + log( "The attribute java is currently unused.", Project.MSG_WARN ); } @@ -535,103 +532,103 @@ public void init() { String p; - if ((p = project.getProperty("ant.netrexxc.binary")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.binary")) != null) { this.binary = Project.toBoolean(p); } // classpath makes no sense - if ((p = project.getProperty("ant.netrexxc.comments")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.comments")) != null) { this.comments = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.compact")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.compact")) != null) { this.compact = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.compile")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.compile")) != null) { this.compile = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.console")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.console")) != null) { this.console = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.crossref")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.crossref")) != null) { this.crossref = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.decimal")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.decimal")) != null) { this.decimal = Project.toBoolean(p); // destDir } - if ((p = project.getProperty("ant.netrexxc.diag")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.diag")) != null) { this.diag = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.explicit")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.explicit")) != null) { this.explicit = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.format")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.format")) != null) { this.format = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.java")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.java")) != null) { this.java = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.keep")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.keep")) != null) { this.keep = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.logo")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.logo")) != null) { this.logo = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.replace")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.replace")) != null) { this.replace = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.savelog")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.savelog")) != null) { this.savelog = Project.toBoolean(p); // srcDir } - if ((p = project.getProperty("ant.netrexxc.sourcedir")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.sourcedir")) != null) { this.sourcedir = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.strictargs")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.strictargs")) != null) { this.strictargs = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.strictassign")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.strictassign")) != null) { this.strictassign = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.strictcase")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.strictcase")) != null) { this.strictcase = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.strictimport")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.strictimport")) != null) { this.strictimport = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.strictprops")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.strictprops")) != null) { this.strictprops = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.strictsignal")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.strictsignal")) != null) { this.strictsignal = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.symbols")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.symbols")) != null) { this.symbols = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.time")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.time")) != null) { this.time = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.trace")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.trace")) != null) { setTrace(p); } - if ((p = project.getProperty("ant.netrexxc.utf8")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.utf8")) != null) { this.utf8 = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.verbose")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.verbose")) != null) { setVerbose(p); } - if ((p = project.getProperty("ant.netrexxc.suppressMethodArgumentNotUsed")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.suppressMethodArgumentNotUsed")) != null) { this.suppressMethodArgumentNotUsed = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.suppressPrivatePropertyNotUsed")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.suppressPrivatePropertyNotUsed")) != null) { this.suppressPrivatePropertyNotUsed = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.suppressVariableNotUsed")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.suppressVariableNotUsed")) != null) { this.suppressVariableNotUsed = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.suppressExceptionNotSignalled")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.suppressExceptionNotSignalled")) != null) { this.suppressExceptionNotSignalled = Project.toBoolean(p); } - if ((p = project.getProperty("ant.netrexxc.suppressDeprecation")) != null) { + if ((p = getProject().getProperty("ant.netrexxc.suppressDeprecation")) != null) { this.suppressDeprecation = Project.toBoolean(p); } } @@ -712,7 +709,7 @@ String toFile = (String) filecopyList.get(fromFile); try { - project.copyFile(fromFile, toFile); + getProject().copyFile(fromFile, toFile); } catch (IOException ioe) { String msg = "Failed to copy " + fromFile + " to " + toFile + " due to " + ioe.getMessage(); @@ -730,7 +727,6 @@ String classpath = getCompileClasspath(); StringBuffer compileOptions = new StringBuffer(); - StringBuffer fileList = new StringBuffer(); // create an array of strings for input to the compiler: one array // comes from the compile options, the other from the compileList @@ -904,7 +900,7 @@ System.getProperty("path.separator"), false); while (tok.hasMoreTokens()) { - File f = project.resolveFile(tok.nextToken()); + File f = getProject().resolveFile(tok.nextToken()); if (f.exists()) { target.append(File.pathSeparator); 1.17 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java Index: RenameExtensions.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- RenameExtensions.java 9 Jul 2002 21:06:02 -0000 1.16 +++ RenameExtensions.java 23 Jul 2002 07:54:51 -0000 1.17 @@ -151,7 +151,7 @@ log("using the same patterns on as you\'ve used here", Project.MSG_INFO); - Move move = (Move) project.createTask("move"); + Move move = (Move) getProject().createTask("move"); move.setOwningTarget(target); move.setTaskName(getTaskName()); move.setLocation(getLocation()); 1.12 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java Index: ReplaceRegExp.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ReplaceRegExp.java 9 Jul 2002 21:06:02 -0000 1.11 +++ ReplaceRegExp.java 23 Jul 2002 07:54:51 -0000 1.12 @@ -285,10 +285,10 @@ String input, int options) { String res = input; - Regexp regexp = r.getRegexp(project); + Regexp regexp = r.getRegexp(getProject()); if (regexp.matches(input, options)) { - res = regexp.substitute(input, s.getExpression(project), options); + res = regexp.substitute(input, s.getExpression(getProject()), options); } return res; @@ -314,8 +314,8 @@ boolean changes = false; - log("Replacing pattern '" + regex.getPattern(project) + - "' with '" + subs.getExpression(project) + + log("Replacing pattern '" + regex.getPattern(getProject()) + + "' with '" + subs.getExpression(getProject()) + "' in '" + f.getPath() + "'" + (byline ? " by line" : "") + (flags.length() > 0 ? " with flags: '" + flags + "'" : "") + 1.10 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java Index: Rpm.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Rpm.java 9 Jul 2002 21:06:02 -0000 1.9 +++ Rpm.java 23 Jul 2002 07:54:51 -0000 1.10 @@ -169,9 +169,9 @@ Execute exe = new Execute(streamhandler, null); - exe.setAntRun(project); + exe.setAntRun(getProject()); if (topDir == null) { - topDir = project.getBaseDir(); + topDir = getProject().getBaseDir(); } exe.setWorkingDirectory(topDir); 1.17 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java Index: Script.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Script.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Script.java 9 Jul 2002 21:06:02 -0000 1.16 +++ Script.java 23 Jul 2002 07:54:51 -0000 1.17 @@ -111,10 +111,10 @@ */ public void execute() throws BuildException { try { - addBeans(project.getProperties()); - addBeans(project.getUserProperties()); - addBeans(project.getTargets()); - addBeans(project.getReferences()); + addBeans(getProject().getProperties()); + addBeans(getProject().getUserProperties()); + addBeans(getProject().getTargets()); + addBeans(getProject().getReferences()); beans.put("project", getProject()); 1.21 +6 -9 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java Index: XMLValidateTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- XMLValidateTask.java 9 Jul 2002 21:06:02 -0000 1.20 +++ XMLValidateTask.java 23 Jul 2002 07:54:51 -0000 1.21 @@ -56,9 +56,6 @@ import java.io.File; import java.io.FileReader; import java.io.IOException; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Vector; @@ -163,7 +160,7 @@ * or SAX2 org.xml.sax.Parser. *

if className is an implementation of org.xml.sax.Parser, {@link #setLenient(boolean)}, * will be ignored. - *

if not set, the default {@link #DEFAULT_XML_READER_CLASSNAME} will be used. + *

if not set, the default will be used. * @see org.xml.sax.XMLReader * @see org.xml.sax.Parser */ @@ -190,7 +187,7 @@ */ public Path createClasspath() { if (this.classpath == null) { - this.classpath = new Path(project); + this.classpath = new Path(getProject()); } return this.classpath.createPath(); } @@ -226,7 +223,7 @@ public void init() throws BuildException { super.init(); - xmlCatalog.setProject(project); + xmlCatalog.setProject(getProject()); } /** @@ -270,11 +267,11 @@ for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] files = ds.getIncludedFiles(); for (int j = 0; j < files.length ; j++) { - File srcFile = new File(fs.getDir(project), files[j]); + File srcFile = new File(fs.getDir(getProject()), files[j]); doValidate(srcFile); fileProcessed++; } @@ -301,7 +298,7 @@ try { // load the parser class if (classpath != null) { - AntClassLoader loader = new AntClassLoader(project, classpath); + AntClassLoader loader = new AntClassLoader(getProject(), classpath); readerClass = loader.loadClass(readerClassName); AntClassLoader.initializeClass(readerClass); } else { 1.8 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java Index: Continuus.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Continuus.java 22 Jun 2002 23:38:35 -0000 1.7 +++ Continuus.java 23 Jul 2002 07:54:52 -0000 1.8 @@ -103,7 +103,7 @@ * @param dir the directory containing the ccm executable */ public final void setCcmDir(String dir) { - ccmDir = project.translatePath(dir); + ccmDir = getProject().translatePath(dir); } /** 1.8 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java Index: ClearCase.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ClearCase.java 22 Jun 2002 23:38:35 -0000 1.7 +++ ClearCase.java 23 Jul 2002 07:54:52 -0000 1.8 @@ -87,7 +87,7 @@ * @param dir the directory containing the cleartool executable */ public final void setClearToolDir(String dir) { - m_ClearToolDir = project.translatePath(dir); + m_ClearToolDir = getProject().translatePath(dir); } /** 1.30 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java Index: Depend.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Depend.java 9 Jul 2002 21:06:03 -0000 1.29 +++ Depend.java 23 Jul 2002 07:54:52 -0000 1.30 @@ -179,7 +179,7 @@ */ public Path createClasspath() { if (dependClasspath == null) { - dependClasspath = new Path(project); + dependClasspath = new Path(getProject()); } return dependClasspath.createPath(); } @@ -588,7 +588,7 @@ private void determineOutOfDateClasses() { outOfDateClasses = new Hashtable(); for (int i = 0; i < srcPathList.length; i++) { - File srcDir = (File) project.resolveFile(srcPathList[i]); + File srcDir = (File) getProject().resolveFile(srcPathList[i]); if (srcDir.exists()) { DirectoryScanner ds = this.getDirectoryScanner(srcDir); String[] files = ds.getIncludedFiles(); 1.27 +3 -11 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java Index: CSharp.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- CSharp.java 9 Jul 2002 21:06:04 -0000 1.26 +++ CSharp.java 23 Jul 2002 07:54:52 -0000 1.27 @@ -316,12 +316,6 @@ private File srcDir; /** - * destination directory (null means use the source directory) NB: this is - * currently not used - */ - private File destDir; - - /** * type of target. Should be one of exe|library|module|winexe|(null) * default is exe; the actual value (if not null) is fed to the command * line.
@@ -389,7 +383,7 @@ public void setReferenceFiles(Path path) { //demand create pathlist if (referenceFiles == null) { - referenceFiles = new Path(this.project); + referenceFiles = new Path(this.getProject()); } referenceFiles.append(path); } @@ -734,7 +728,7 @@ *@param dirName The new DestDir value */ public void setDestDir(File dirName) { - this.destDir = dirName; + log( "DestDir currently unused", Project.MSG_WARN ); } @@ -1021,7 +1015,6 @@ targetType = null; win32icon = null; srcDir = null; - destDir = null; mainClass = null; unsafe = false; warnLevel = 3; @@ -1069,7 +1062,7 @@ public void execute() throws BuildException { if (srcDir == null) { - srcDir = project.resolveFile("."); + srcDir = getProject().resolveFile("."); } log("CSC working from source directory " + srcDir, Project.MSG_VERBOSE); validate(); @@ -1113,7 +1106,6 @@ DirectoryScanner scanner = super.getDirectoryScanner(srcDir); String[] dependencies = scanner.getIncludedFiles(); log("compiling " + dependencies.length + " file" + ((dependencies.length == 1) ? "" : "s")); - String baseDir = scanner.getBasedir().toString(); File base = scanner.getBasedir(); //add to the command for (int i = 0; i < dependencies.length; i++) { 1.20 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java Index: Ilasm.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Ilasm.java 9 Jul 2002 21:06:04 -0000 1.19 +++ Ilasm.java 23 Jul 2002 07:54:52 -0000 1.20 @@ -492,7 +492,7 @@ public void execute() throws BuildException { if (srcDir == null) { - srcDir = project.resolveFile("."); + srcDir = getProject().resolveFile("."); } //get dependencies list. 1.11 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java Index: BorlandGenerateClient.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- BorlandGenerateClient.java 22 Jun 2002 23:38:36 -0000 1.10 +++ BorlandGenerateClient.java 23 Jul 2002 07:54:52 -0000 1.11 @@ -146,7 +146,7 @@ */ public Path createClasspath() { if (this.classpath == null) { - this.classpath = new Path(project); + this.classpath = new Path(getProject()); } return this.classpath.createPath(); } 1.17 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java Index: DDCreator.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- DDCreator.java 9 Jul 2002 21:06:04 -0000 1.16 +++ DDCreator.java 23 Jul 2002 07:54:52 -0000 1.17 @@ -125,14 +125,14 @@ } String systemClassPath = System.getProperty("java.class.path"); - String execClassPath = project.translatePath(systemClassPath + ":" + classpath); - Java ddCreatorTask = (Java) project.createTask("java"); + String execClassPath = getProject().translatePath(systemClassPath + ":" + classpath); + Java ddCreatorTask = (Java) getProject().createTask("java"); ddCreatorTask.setTaskName(getTaskName()); ddCreatorTask.setFork(true); ddCreatorTask.setClassname("org.apache.tools.ant.taskdefs.optional.ejb.DDCreatorHelper"); Commandline.Argument arguments = ddCreatorTask.createArg(); arguments.setLine(args); - ddCreatorTask.setClasspath(new Path(project, execClassPath)); + ddCreatorTask.setClasspath(new Path(getProject(), execClassPath)); if (ddCreatorTask.executeJava() != 0) { throw new BuildException("Execution of ddcreator helper failed"); } @@ -165,6 +165,6 @@ * @param s the classpath to use for the ddcreator tool. */ public void setClasspath(String s) { - this.classpath = project.translatePath(s); + this.classpath = getProject().translatePath(s); } } 1.37 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java Index: EjbJar.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- EjbJar.java 9 Jul 2002 21:06:04 -0000 1.36 +++ EjbJar.java 23 Jul 2002 07:54:52 -0000 1.37 @@ -336,7 +336,7 @@ */ public Path createClasspath() { if (config.classpath == null) { - config.classpath = new Path(project); + config.classpath = new Path(getProject()); } return config.classpath.createPath(); } 1.21 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java Index: Ejbc.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Ejbc.java 9 Jul 2002 21:06:04 -0000 1.20 +++ Ejbc.java 23 Jul 2002 07:54:52 -0000 1.21 @@ -131,14 +131,14 @@ } String systemClassPath = System.getProperty("java.class.path"); - String execClassPath = project.translatePath(systemClassPath + ":" + classpath + + String execClassPath = getProject().translatePath(systemClassPath + ":" + classpath + ":" + generatedFilesDirectory); // get all the files in the descriptor directory DirectoryScanner ds = super.getDirectoryScanner(descriptorDirectory); String[] files = ds.getIncludedFiles(); - Java helperTask = (Java) project.createTask("java"); + Java helperTask = (Java) getProject().createTask("java"); helperTask.setTaskName(getTaskName()); helperTask.setFork(true); helperTask.setClassname("org.apache.tools.ant.taskdefs.optional.ejb.EjbcHelper"); @@ -155,7 +155,7 @@ Commandline.Argument arguments = helperTask.createArg(); arguments.setLine(args); - helperTask.setClasspath(new Path(project, execClassPath)); + helperTask.setClasspath(new Path(getProject(), execClassPath)); if (helperTask.executeJava() != 0) { throw new BuildException("Execution of ejbc helper failed"); } @@ -210,7 +210,7 @@ * Set the classpath to be used for this compilation. */ public void setClasspath(String s) { - this.classpath = project.translatePath(s); + this.classpath = getProject().translatePath(s); } /** 1.8 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java Index: IPlanetEjbcTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- IPlanetEjbcTask.java 9 Jul 2002 21:06:05 -0000 1.7 +++ IPlanetEjbcTask.java 23 Jul 2002 07:54:52 -0000 1.8 @@ -184,7 +184,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } 1.21 +6 -6 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java Index: WLRun.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- WLRun.java 9 Jul 2002 21:06:05 -0000 1.20 +++ WLRun.java 23 Jul 2002 07:54:52 -0000 1.21 @@ -149,7 +149,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } @@ -159,7 +159,7 @@ */ public Path createWLClasspath() { if (weblogicClasspath == null) { - weblogicClasspath = new Path(project); + weblogicClasspath = new Path(getProject()); } return weblogicClasspath.createPath(); } @@ -200,7 +200,7 @@ // If an explicit securityPolicy file was specified, it maybe an // absolute path. Use the project to resolve it. if (this.securityPolicy != null && !securityPolicyFile.exists()) { - securityPolicyFile = project.resolveFile(securityPolicy); + securityPolicyFile = getProject().resolveFile(securityPolicy); } // If we still can't find it, complain if (!securityPolicyFile.exists()) { @@ -229,7 +229,7 @@ throw new BuildException("You must supply a management password to start the server"); } - Java weblogicServer = (Java) project.createTask("java"); + Java weblogicServer = (Java) getProject().createTask("java"); weblogicServer.setTaskName(getTaskName()); weblogicServer.setFork(true); weblogicServer.setDir(weblogicSystemHome); @@ -275,7 +275,7 @@ propertiesFile = new File(weblogicSystemHome, weblogicPropertiesFile); if (!propertiesFile.exists()) { // OK, properties file may be absolute - propertiesFile = project.resolveFile(weblogicPropertiesFile); + propertiesFile = getProject().resolveFile(weblogicPropertiesFile); if (!propertiesFile.exists()) { throw new BuildException("Properties file " + weblogicPropertiesFile + " not found in weblogic home " + weblogicSystemHome + @@ -283,7 +283,7 @@ } } - Java weblogicServer = (Java) project.createTask("java"); + Java weblogicServer = (Java) getProject().createTask("java"); weblogicServer.setTaskName(getTaskName()); weblogicServer.setFork(true); weblogicServer.setClassname(weblogicMainClass); 1.13 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java Index: WLStop.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- WLStop.java 9 Jul 2002 21:06:05 -0000 1.12 +++ WLStop.java 23 Jul 2002 07:54:53 -0000 1.13 @@ -117,7 +117,7 @@ throw new BuildException("The url of the weblogic server must be provided."); } - Java weblogicAdmin = (Java) project.createTask("java"); + Java weblogicAdmin = (Java) getProject().createTask("java"); weblogicAdmin.setFork(true); weblogicAdmin.setClassname("weblogic.Admin"); String args; @@ -152,7 +152,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } 1.14 +1 -7 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java Index: Translate.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Translate.java 9 Jul 2002 21:06:06 -0000 1.13 +++ Translate.java 23 Jul 2002 07:54:53 -0000 1.14 @@ -132,10 +132,6 @@ */ private Hashtable resourceMap = new Hashtable(); /** - * Generated locale based on user attributes - */ - private Locale locale; - /** * Used to resolve file names. */ private FileUtils fileUtils = FileUtils.newFileUtils(); @@ -286,8 +282,6 @@ bundleCountry = Locale.getDefault().getCountry(); } - locale = new Locale(bundleLanguage, bundleCountry); - if (bundleVariant == null) { Locale l = new Locale(bundleLanguage, bundleCountry); bundleVariant = l.getVariant(); @@ -488,7 +482,7 @@ private void translate() throws BuildException { for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); String[] srcFiles = ds.getIncludedFiles(); for (int j = 0; j < srcFiles.length; j++) { try { 1.16 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java Index: VAJImport.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJImport.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- VAJImport.java 9 Jul 2002 21:06:06 -0000 1.15 +++ VAJImport.java 23 Jul 2002 07:54:53 -0000 1.16 @@ -194,7 +194,7 @@ * Workspace. */ protected void importFileset(FileSet fileset) { - DirectoryScanner ds = fileset.getDirectoryScanner(this.project); + DirectoryScanner ds = fileset.getDirectoryScanner(this.getProject()); if (ds.getIncludedFiles().length == 0) { return; } 1.15 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java Index: JJTree.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- JJTree.java 9 Jul 2002 21:06:07 -0000 1.14 +++ JJTree.java 23 Jul 2002 07:54:53 -0000 1.15 @@ -237,12 +237,12 @@ targetName.substring(0, targetName.indexOf(".jjt")) + ".jj"); if (javaFile.exists() && target.lastModified() < javaFile.lastModified()) { - project.log("Target is already built - skipping (" + target + ")"); + getProject().log("Target is already built - skipping (" + target + ")"); return; } cmdl.createArgument().setValue(target.getAbsolutePath()); - final Path classpath = cmdl.createClasspath(project); + final Path classpath = cmdl.createClasspath(getProject()); final File javaccJar = JavaCC.getArchiveFile(javaccHome); classpath.createPathElement().setPath(javaccJar.getAbsolutePath()); classpath.addJavaRuntime(); 1.18 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java Index: JavaCC.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- JavaCC.java 9 Jul 2002 21:06:07 -0000 1.17 +++ JavaCC.java 23 Jul 2002 07:54:53 -0000 1.18 @@ -309,7 +309,7 @@ } cmdl.createArgument().setValue(target.getAbsolutePath()); - final Path classpath = cmdl.createClasspath(project); + final Path classpath = cmdl.createClasspath(getProject()); final File javaccJar = JavaCC.getArchiveFile(javaccHome); classpath.createPathElement().setPath(javaccJar.getAbsolutePath()); classpath.addJavaRuntime(); 1.14 +3 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java Index: JDependTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- JDependTask.java 9 Jul 2002 21:06:07 -0000 1.13 +++ JDependTask.java 23 Jul 2002 07:54:53 -0000 1.14 @@ -170,7 +170,7 @@ */ public Path createSourcespath() { if (_sourcesPath == null) { - _sourcesPath = new Path(project); + _sourcesPath = new Path(getProject()); } return _sourcesPath.createPath(); } @@ -214,7 +214,7 @@ */ public Path createClasspath() { if (_compileClasspath == null) { - _compileClasspath = new Path(project); + _compileClasspath = new Path(getProject()); } return _compileClasspath.createPath(); } @@ -284,7 +284,6 @@ // execute the test and get the return code int exitValue = JDependTask.ERRORS; - boolean wasKilled = false; if (!getFork()) { exitValue = executeInVM(commandline); } else { @@ -417,7 +416,7 @@ execute.setCommandline(commandline.getCommandline()); if (getDir() != null) { execute.setWorkingDirectory(getDir()); - execute.setAntRun(project); + execute.setAntRun(getProject()); } if (getOutputFile() != null) { 1.21 +4 -12 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java Index: JspC.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- JspC.java 9 Jul 2002 21:06:07 -0000 1.20 +++ JspC.java 23 Jul 2002 07:54:54 -0000 1.21 @@ -134,13 +134,6 @@ protected boolean failOnError = true; /** - * -uribase <dir> The uri directory compilations should be relative to - * (Default is "/") - */ - - private File uribase; - - /** * -uriroot <dir> The root directory that uri files should be resolved * against, */ @@ -258,7 +251,7 @@ * @param uribase The new Uribase value */ public void setUribase(File uribase) { - this.uribase = uribase; + log( "Uribase is currently an unused parameter", Project.MSG_WARN); } public File getUribase() { @@ -297,7 +290,7 @@ */ public Path createClasspath() { if (classpath == null) { - classpath = new Path(project); + classpath = new Path(getProject()); } return classpath.createPath(); } @@ -336,7 +329,7 @@ */ public Path createCompilerclasspath() { if (compilerClasspath == null) { - compilerClasspath = new Path(project); + compilerClasspath = new Path(getProject()); } return compilerClasspath.createPath(); } @@ -445,7 +438,7 @@ resetFileLists(); int filecount = 0; for (int i = 0; i < list.length; i++) { - File srcDir = (File) project.resolveFile(list[i]); + File srcDir = (File) getProject().resolveFile(list[i]); if (!srcDir.exists()) { throw new BuildException("srcdir \"" + srcDir.getPath() + "\" does not exist!", location); @@ -599,7 +592,6 @@ } String javaFileName = mangler.mapJspToJavaName(srcFile); // String srcFileDir=srcFile.getParent(); - String packageNameIn = srcFile.getAbsolutePath(); return new File(dest, javaFileName); } 1.10 +5 -8 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java Index: WLJspc.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- WLJspc.java 9 Jul 2002 21:06:07 -0000 1.9 +++ WLJspc.java 23 Jul 2002 07:54:54 -0000 1.10 @@ -143,16 +143,14 @@ } - String systemClassPath = System.getProperty("java.class.path"); - - pathToPackage + pathToPackage = this.destinationPackage.replace('.', File.separatorChar); // get all the files in the sourceDirectory DirectoryScanner ds = super.getDirectoryScanner(sourceDirectory); //use the systemclasspath as well, to include the ant jar if (compileClasspath == null) { - compileClasspath = new Path(project); + compileClasspath = new Path(getProject()); } compileClasspath.append(Path.systemClasspath); @@ -162,7 +160,7 @@ // Therefore, takes loads of time // Can pass directories at a time (*.jsp) but easily runs out of memory on hefty dirs // (even on a Sun) - Java helperTask = (Java) project.createTask("java"); + Java helperTask = (Java) getProject().createTask("java"); helperTask.setFork(true); helperTask.setClassname("weblogic.jspc"); helperTask.setTaskName(getTaskName()); @@ -245,7 +243,7 @@ */ public Path createClasspath() { if (compileClasspath == null) { - compileClasspath = new Path(project); + compileClasspath = new Path(getProject()); } return compileClasspath; } @@ -297,8 +295,7 @@ // Can be written better... this is too hacky! jspFile = new File(files[i]); parents = jspFile.getParent(); - int loc = 0; - + if ((parents != null) && (!("").equals(parents))) { parents = this.replaceString(parents, File.separator, "_/"); pack = pathToPackage + File.separator + "_" + parents; 1.46 +13 -13 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Index: JUnitTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- JUnitTask.java 9 Jul 2002 21:06:08 -0000 1.45 +++ JUnitTask.java 23 Jul 2002 07:54:54 -0000 1.46 @@ -406,7 +406,7 @@ * @since Ant 1.2 */ public Path createClasspath() { - return commandline.createClasspath(project).createPath(); + return commandline.createClasspath(getProject()).createPath(); } /** @@ -451,7 +451,7 @@ * @since Ant 1.2 */ public BatchTest createBatchTest() { - BatchTest test = new BatchTest(project); + BatchTest test = new BatchTest(getProject()); batchTests.addElement(test); return test; } @@ -523,7 +523,7 @@ Enumeration list = getIndividualTests(); while (list.hasMoreElements()) { JUnitTest test = (JUnitTest) list.nextElement(); - if (test.shouldRun(project)) { + if (test.shouldRun(getProject())) { execute(test); } } @@ -537,7 +537,7 @@ // set the default values if not specified //@todo should be moved to the test class instead. if (test.getTodir() == null) { - test.setTodir(project.resolveFile(".")); + test.setTodir(getProject().resolveFile(".")); } if (test.getOutfile() == null) { @@ -571,10 +571,10 @@ log("TEST " + test.getName() + " FAILED" + (wasKilled ? " (timeout)" : ""), Project.MSG_ERR); if (errorOccurredHere && test.getErrorProperty() != null) { - project.setNewProperty(test.getErrorProperty(), "true"); + getProject().setNewProperty(test.getErrorProperty(), "true"); } if (failureOccurredHere && test.getFailureProperty() != null) { - project.setNewProperty(test.getFailureProperty(), "true"); + getProject().setNewProperty(test.getFailureProperty(), "true"); } } } @@ -635,10 +635,10 @@ // forked test File propsFile = FileUtils.newFileUtils().createTempFile("junit", ".properties", - project.getBaseDir()); + getProject().getBaseDir()); cmd.createArgument().setValue("propsfile=" + propsFile.getAbsolutePath()); - Hashtable p = project.getProperties(); + Hashtable p = getProject().getProperties(); Properties props = new Properties(); for (Enumeration enum = p.keys(); enum.hasMoreElements();) { Object key = enum.nextElement(); @@ -659,7 +659,7 @@ Project.MSG_WARN), watchdog); execute.setCommandline(cmd.getCommandline()); - execute.setAntRun(project); + execute.setAntRun(getProject()); if (dir != null) { execute.setWorkingDirectory(dir); } @@ -734,7 +734,7 @@ */ private int executeInVM(JUnitTest arg) throws BuildException { JUnitTest test = (JUnitTest) arg.clone(); - test.setProperties(project.getProperties()); + test.setProperties(getProject().getProperties()); if (dir != null) { log("dir attribute ignored if running in the same VM", Project.MSG_WARN); @@ -765,7 +765,7 @@ classpath.append(antRuntimeClasses); } - cl = new AntClassLoader(null, project, classpath, false); + cl = new AntClassLoader(null, getProject(), classpath, false); log("Using CLASSPATH " + cl.getClasspath(), Project.MSG_VERBOSE); @@ -882,7 +882,7 @@ String filename = test.getOutfile() + fe.getExtension(); File destFile = new File(test.getTodir(), filename); String absFilename = destFile.getAbsolutePath(); - return project.resolveFile(absFilename); + return getProject().resolveFile(absFilename); } return null; } 1.19 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java Index: XMLResultAggregator.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- XMLResultAggregator.java 9 Jul 2002 21:06:08 -0000 1.18 +++ XMLResultAggregator.java 23 Jul 2002 07:54:54 -0000 1.19 @@ -187,7 +187,7 @@ toFile = DEFAULT_FILENAME; } if (toDir == null){ - toDir = project.resolveFile(DEFAULT_DIR); + toDir = getProject().resolveFile(DEFAULT_DIR); } return new File(toDir, toFile); } @@ -202,14 +202,14 @@ final int size = filesets.size(); for (int i = 0; i < size; i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); ds.scan(); String[] f = ds.getIncludedFiles(); for (int j = 0; j < f.length; j++) { String pathname = f[j]; if (pathname.endsWith(".xml")) { File file = new File(ds.getBasedir(), pathname); - file = project.resolveFile(file.getPath()); + file = getProject().resolveFile(file.getPath()); v.addElement(file); } } 1.9 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java Index: AbstractMetamataTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AbstractMetamataTask.java 9 Jul 2002 21:06:08 -0000 1.8 +++ AbstractMetamataTask.java 23 Jul 2002 07:54:54 -0000 1.9 @@ -144,7 +144,7 @@ */ public Path createClasspath() { if (classPath == null) { - classPath = new Path(project); + classPath = new Path(getProject()); } return classPath; } @@ -155,7 +155,7 @@ */ public Path createSourcepath() { if (sourcePath == null) { - sourcePath = new Path(project); + sourcePath = new Path(getProject()); } return sourcePath; } @@ -212,7 +212,7 @@ // set the classpath as the jar file File jar = getMetamataJar(metamataHome); - final Path classPath = cmdl.createClasspath(project); + final Path classPath = cmdl.createClasspath(getProject()); classPath.createPathElement().setLocation(jar); // set the metamata.home property @@ -332,7 +332,7 @@ Hashtable files = new Hashtable(); for (int i = 0; i < fileSets.size(); i++) { FileSet fs = (FileSet) fileSets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); ds.scan(); String[] f = ds.getIncludedFiles(); log(i + ") Adding " + f.length + " files from directory " + ds.getBasedir(), Project.MSG_VERBOSE); 1.7 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java Index: MMetrics.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MMetrics.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- MMetrics.java 9 Jul 2002 21:06:08 -0000 1.6 +++ MMetrics.java 23 Jul 2002 07:54:54 -0000 1.7 @@ -161,7 +161,7 @@ */ public Path createPath() { if (path == null) { - path = new Path(project); + path = new Path(getProject()); } return path; 1.14 +5 -5 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java Index: MParse.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- MParse.java 9 Jul 2002 21:06:08 -0000 1.13 +++ MParse.java 23 Jul 2002 07:54:54 -0000 1.14 @@ -144,7 +144,7 @@ // set the classpath as the jar files File[] jars = getMetamataLibs(); - final Path classPath = cmdl.createClasspath(project); + final Path classPath = cmdl.createClasspath(getProject()); for (int i = 0; i < jars.length; i++){ classPath.createPathElement().setLocation(jars[i]); } @@ -175,7 +175,7 @@ pathname = pathname.substring(0, pos) + ".java"; File javaFile = new File(pathname); if (javaFile.exists() && target.lastModified() < javaFile.lastModified()) { - project.log("Target is already build - skipping (" + target + ")"); + getProject().log("Target is already build - skipping (" + target + ")"); return; } @@ -203,7 +203,7 @@ name = "__jj" + name.substring(0, pos) + ".sunjj"; final File sunjj = new File(target.getParent(), name); if (sunjj.exists()) { - project.log("Removing stale file: " + sunjj.getName()); + getProject().log("Removing stale file: " + sunjj.getName()); sunjj.delete(); } } @@ -236,7 +236,7 @@ if (metamataHome == null || !metamataHome.exists()){ throw new BuildException("'metamatahome' must point to Metamata home directory."); } - metamataHome = project.resolveFile(metamataHome.getPath()); + metamataHome = getProject().resolveFile(metamataHome.getPath()); // check that the needed jar exists. File[] jars = getMetamataLibs(); @@ -252,7 +252,7 @@ || !target.getName().endsWith(".jj")) { throw new BuildException("Invalid target: " + target); } - target = project.resolveFile(target.getPath()); + target = getProject().resolveFile(target.getPath()); } /** 1.25 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java Index: FTP.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- FTP.java 9 Jul 2002 21:06:08 -0000 1.24 +++ FTP.java 23 Jul 2002 07:54:54 -0000 1.25 @@ -471,10 +471,10 @@ FileScanner ds; if (action == SEND_FILES) { - ds = fs.getDirectoryScanner(project); + ds = fs.getDirectoryScanner(getProject()); } else { ds = new FTPDirectoryScanner(ftp); - fs.setupDirectoryScanner(ds, project); + fs.setupDirectoryScanner(ds, getProject()); ds.scan(); } @@ -704,7 +704,7 @@ try { // XXX - why not simply new File(dir, filename)? - File file = project.resolveFile(new File(dir, filename).getPath()); + File file = getProject().resolveFile(new File(dir, filename).getPath()); if (newerOnly && isUpToDate(ftp, file, resolveFile(filename))) { return; @@ -790,7 +790,7 @@ OutputStream outstream = null; try { - File file = project.resolveFile(new File(dir, filename).getPath()); + File file = getProject().resolveFile(new File(dir, filename).getPath()); if (newerOnly && isUpToDate(ftp, file, resolveFile(filename))) { return; 1.9 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java Index: P4Add.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- P4Add.java 9 Jul 2002 21:06:09 -0000 1.8 +++ P4Add.java 23 Jul 2002 07:54:55 -0000 1.9 @@ -134,7 +134,7 @@ for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); - DirectoryScanner ds = fs.getDirectoryScanner(project); + DirectoryScanner ds = fs.getDirectoryScanner(getProject()); //File fromDir = fs.getDir(project); String[] srcFiles = ds.getIncludedFiles(); 1.17 +4 -12 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java Index: P4Base.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- P4Base.java 9 Jul 2002 21:06:09 -0000 1.16 +++ P4Base.java 23 Jul 2002 07:54:55 -0000 1.17 @@ -165,13 +165,13 @@ //Get default P4 settings from environment - Mark would have done something cool with //introspection here.....:-) String tmpprop; - if ((tmpprop = project.getProperty("p4.port")) != null) { + if ((tmpprop = getProject().getProperty("p4.port")) != null) { setPort(tmpprop); } - if ((tmpprop = project.getProperty("p4.client")) != null) { + if ((tmpprop = getProject().getProperty("p4.client")) != null) { setClient(tmpprop); } - if ((tmpprop = project.getProperty("p4.user")) != null) { + if ((tmpprop = getProject().getProperty("p4.user")) != null) { setUser(tmpprop); } } @@ -182,7 +182,6 @@ /** Execute P4 command assembled by subclasses. @param command The command to run - @param p4input Input to be fed to command on stdin @param handler A P4Handler to process any input and output */ protected void execP4Command(String command, P4Handler handler) throws BuildException { @@ -203,13 +202,6 @@ } commandline.createArgument().setLine(command); - - String[] cmdline = commandline.getCommandline(); - String cmdl = ""; - for (int i = 0; i < cmdline.length; i++) { - cmdl += cmdline[i] + " "; - } - log(commandline.describeCommand(), Project.MSG_VERBOSE); if (handler == null) { @@ -218,7 +210,7 @@ Execute exe = new Execute(handler, null); - exe.setAntRun(project); + exe.setAntRun(getProject()); exe.setCommandline(commandline.getCommandline()); 1.13 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java Index: P4Change.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- P4Change.java 9 Jul 2002 21:06:09 -0000 1.12 +++ P4Change.java 23 Jul 2002 07:54:55 -0000 1.13 @@ -87,7 +87,7 @@ if (emptyChangeList == null) { emptyChangeList = getEmptyChangeList(); } - final Project myProj = project; + final Project myProj = getProject(); P4Handler handler = new P4HandlerAdapter() { public void process(String line) { 1.8 +1 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java Index: P4Counter.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- P4Counter.java 9 Jul 2002 21:06:09 -0000 1.7 +++ P4Counter.java 23 Jul 2002 07:54:55 -0000 1.8 @@ -139,7 +139,7 @@ } if (shouldSetProperty) { - final Project myProj = project; + final Project myProj = getProject(); P4Handler handler = new P4HandlerAdapter() { public void process(String line) { 1.12 +2 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java Index: CovMerge.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CovMerge.java 9 Jul 2002 21:06:11 -0000 1.11 +++ CovMerge.java 23 Jul 2002 07:54:55 -0000 1.12 @@ -184,7 +184,7 @@ for (int j = 0; j < f.length; j++) { String pathname = f[j]; File file = new File(ds.getBasedir(), pathname); - file = project.resolveFile(file.getPath()); + file = getProject().resolveFile(file.getPath()); v.addElement(file); } } @@ -210,7 +210,7 @@ pw.println(snapshots[i].getAbsolutePath()); } // last file is the output snapshot - pw.println(project.resolveFile(tofile.getPath())); + pw.println(getProject().resolveFile(tofile.getPath())); pw.flush(); } catch (IOException e) { throw new BuildException("I/O error while writing to " + file, e); 1.13 +6 -6 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java Index: CovReport.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- CovReport.java 9 Jul 2002 21:06:12 -0000 1.12 +++ CovReport.java 23 Jul 2002 07:54:55 -0000 1.13 @@ -228,7 +228,7 @@ */ public Path createSourcepath() { if (sourcePath == null) { - sourcePath = new Path(project); + sourcePath = new Path(getProject()); } return sourcePath.createPath(); } @@ -253,7 +253,7 @@ */ public Path createCoveragepath() { if (coveragePath == null) { - coveragePath = new Path(project); + coveragePath = new Path(getProject()); } return coveragePath.createPath(); } @@ -342,12 +342,12 @@ if (filters != null) { v.addElement("-filters=" + filters); } - v.addElement("-output=" + project.resolveFile(tofile.getPath())); - v.addElement("-snapshot=" + project.resolveFile(snapshot.getPath())); + v.addElement("-output=" + getProject().resolveFile(tofile.getPath())); + v.addElement("-snapshot=" + getProject().resolveFile(snapshot.getPath())); // as a default -sourcepath use . in JProbe, so use project . if (sourcePath == null) { - sourcePath = new Path(project); - sourcePath.createPath().setLocation(project.resolveFile(".")); + sourcePath = new Path(getProject()); + sourcePath.createPath().setLocation(getProject().resolveFile(".")); } v.addElement("-sourcepath=" + sourcePath); 1.12 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java Index: Coverage.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Coverage.java 9 Jul 2002 21:06:12 -0000 1.11 +++ Coverage.java 23 Jul 2002 07:54:55 -0000 1.12 @@ -297,7 +297,7 @@ * classpath to run the files. */ public Path createClasspath() { - return cmdlJava.createClasspath(project).createPath(); + return cmdlJava.createClasspath(getProject()).createPath(); } /** @@ -370,14 +370,14 @@ if (snapshotDir == null) { snapshotDir = new File("."); } - snapshotDir = project.resolveFile(snapshotDir.getPath()); + snapshotDir = getProject().resolveFile(snapshotDir.getPath()); if (!snapshotDir.isDirectory() || !snapshotDir.exists()) { throw new BuildException("Snapshot directory does not exists :" + snapshotDir); } if (workingDir == null) { workingDir = new File("."); } - workingDir = project.resolveFile(workingDir.getPath()); + workingDir = getProject().resolveFile(workingDir.getPath()); // check for info, do your best to select the java executable. // JProbe 3.0 fails if there is no javaexe option. So @@ -409,7 +409,7 @@ params.addElement("-jp_vm=" + vm); } if (javaExe != null) { - params.addElement("-jp_java_exe=" + project.resolveFile(javaExe.getPath())); + params.addElement("-jp_java_exe=" + getProject().resolveFile(javaExe.getPath())); } params.addElement("-jp_working_dir=" + workingDir.getPath()); params.addElement("-jp_snapshot_dir=" + snapshotDir.getPath()); 1.7 +5 -5 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java Index: SOS.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SOS.java 9 Jul 2002 21:06:12 -0000 1.6 +++ SOS.java 23 Jul 2002 07:54:55 -0000 1.7 @@ -455,10 +455,10 @@ */ public String getLocalPath() { if (localPath == null) { - return project.getBaseDir().getAbsolutePath(); + return getProject().getBaseDir().getAbsolutePath(); } else { // make sure localDir exists, create it if it doesn't - File dir = project.resolveFile(localPath); + File dir = getProject().resolveFile(localPath); if (!dir.exists()) { boolean done = dir.mkdirs(); if (!done) { @@ -466,7 +466,7 @@ "successful for an unknown reason"; throw new BuildException(msg, location); } - project.log("Created dir: " + dir.getAbsolutePath()); + getProject().log("Created dir: " + dir.getAbsolutePath()); } return dir.getAbsolutePath(); } @@ -486,8 +486,8 @@ Project.MSG_INFO, Project.MSG_WARN)); - exe.setAntRun(project); - exe.setWorkingDirectory(project.getBaseDir()); + exe.setAntRun(getProject()); + exe.setWorkingDirectory(getProject().getBaseDir()); exe.setCommandline(cmd.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { 1.21 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java Index: MSVSS.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- MSVSS.java 9 Jul 2002 21:06:14 -0000 1.20 +++ MSVSS.java 23 Jul 2002 07:54:55 -0000 1.21 @@ -122,7 +122,7 @@ } /** - * @return the appropriate login command if the 'login' attribute was specified, otherwise an empty string + * the appropriate login command if the 'login' attribute was specified, otherwise an empty string */ public void getLoginCommand(Commandline cmd) { if (m_vssLogin == null) { @@ -187,8 +187,8 @@ exe.setEnvironment(newEnv); } - exe.setAntRun(project); - exe.setWorkingDirectory(project.getBaseDir()); + exe.setAntRun(getProject()); + exe.setWorkingDirectory(getProject().getBaseDir()); exe.setCommandline(cmd.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { 1.10 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java Index: MSVSSCHECKIN.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- MSVSSCHECKIN.java 9 Jul 2002 21:06:14 -0000 1.9 +++ MSVSSCHECKIN.java 23 Jul 2002 07:54:55 -0000 1.10 @@ -138,7 +138,7 @@ return; } else { // make sure m_LocalDir exists, create it if it doesn't - File dir = project.resolveFile(m_LocalPath); + File dir = getProject().resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir.mkdirs(); if (!done) { @@ -147,7 +147,7 @@ + "succesful for an unknown reason"; throw new BuildException(msg, location); } - project.log("Created dir: " + dir.getAbsolutePath()); + getProject().log("Created dir: " + dir.getAbsolutePath()); } cmd.createArgument().setValue(FLAG_OVERRIDE_WORKING_DIR @@ -164,7 +164,7 @@ } /** - * @return the 'recursive' command if the attribute was 'true', otherwise an empty string + * the 'recursive' command if the attribute was 'true', otherwise an empty string */ public void getRecursiveCommand(Commandline cmd) { if (!m_Recursive) { @@ -182,7 +182,7 @@ } /** - * @return the 'make writable' command if the attribute was 'true', otherwise an empty string + * the 'make writable' command if the attribute was 'true', otherwise an empty string */ public void getWritableCommand(Commandline cmd) { if (!m_Writable) { 1.10 +3 -3 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java Index: MSVSSCHECKOUT.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- MSVSSCHECKOUT.java 9 Jul 2002 21:06:14 -0000 1.9 +++ MSVSSCHECKOUT.java 23 Jul 2002 07:54:55 -0000 1.10 @@ -138,7 +138,7 @@ return; } else { // make sure m_LocalDir exists, create it if it doesn't - File dir = project.resolveFile(m_LocalPath); + File dir = getProject().resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir.mkdirs(); if (!done) { @@ -146,7 +146,7 @@ "succesful for an unknown reason"; throw new BuildException(msg, location); } - project.log("Created dir: " + dir.getAbsolutePath()); + getProject().log("Created dir: " + dir.getAbsolutePath()); } cmd.createArgument().setValue(FLAG_OVERRIDE_WORKING_DIR + m_LocalPath); @@ -162,7 +162,7 @@ } /** - * @return the 'recursive' command if the attribute was 'true', otherwise an empty string + * the 'recursive' command if the attribute was 'true', otherwise an empty string */ public void getRecursiveCommand(Commandline cmd) { if (!m_Recursive) { 1.19 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java Index: MSVSSGET.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- MSVSSGET.java 9 Jul 2002 21:06:14 -0000 1.18 +++ MSVSSGET.java 23 Jul 2002 07:54:55 -0000 1.19 @@ -205,7 +205,7 @@ return; } else { // make sure m_LocalDir exists, create it if it doesn't - File dir = project.resolveFile(m_LocalPath); + File dir = getProject().resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir.mkdirs(); if (!done) { @@ -213,7 +213,7 @@ "successful for an unknown reason"; throw new BuildException(msg, location); } - project.log("Created dir: " + dir.getAbsolutePath()); + getProject().log("Created dir: " + dir.getAbsolutePath()); } cmd.createArgument().setValue(FLAG_OVERRIDE_WORKING_DIR + m_LocalPath); @@ -229,7 +229,7 @@ } /** - * @return the 'recursive' command if the attribute was 'true', otherwise an empty string + * the 'recursive' command if the attribute was 'true', otherwise an empty string */ public void getRecursiveCommand(Commandline cmd) { if (!m_Recursive) { @@ -260,7 +260,7 @@ } /** - * @return the 'make writable' command if the attribute was 'true', otherwise an empty string + * the 'make writable' command if the attribute was 'true', otherwise an empty string */ public void getWritableCommand(Commandline cmd) { if (!m_Writable) { 1.8 +4 -4 jakarta-ant/src/main/org/apache/tools/ant/types/Description.java Index: Description.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/Description.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Description.java 7 Mar 2002 16:10:39 -0000 1.7 +++ Description.java 23 Jul 2002 07:54:56 -0000 1.8 @@ -77,11 +77,11 @@ * Adds descriptive text to the project. */ public void addText(String text) { - String currentDescription = project.getDescription(); + String currentDescription = getProject().getDescription(); if (currentDescription == null) { - project.setDescription(text); + getProject().setDescription(text); } else { - project.setDescription(currentDescription + text); + getProject().setDescription(currentDescription + text); } } } 1.13 +7 -11 jakarta-ant/src/main/org/apache/tools/ant/types/XMLCatalog.java Index: XMLCatalog.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/XMLCatalog.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- XMLCatalog.java 9 Jul 2002 21:06:14 -0000 1.12 +++ XMLCatalog.java 23 Jul 2002 07:54:56 -0000 1.13 @@ -349,7 +349,7 @@ log("resolveEntity: '" + publicId + "': '" + systemId + "'", Project.MSG_DEBUG); - InputSource inputSource = resolveEntityImpl(publicId, systemId); + InputSource inputSource = resolveEntityImpl(publicId ); if (inputSource == null) { log("No matching catalog entry found, parser will use: '" + @@ -478,11 +478,9 @@ */ private String removeFragment(String uri) { String result = uri; - String fragment = null; int hashPos = uri.indexOf("#"); if (hashPos >= 0) { result = uri.substring(0, hashPos); - fragment = uri.substring(hashPos+1); } return result; } @@ -502,7 +500,7 @@ // location attribute. This is resolved using the appropriate // base. // - File resFile = project.resolveFile(uri); + File resFile = getProject().resolveFile(uri); InputSource source = null; if (resFile.exists() && resFile.canRead()) { @@ -537,9 +535,9 @@ AntClassLoader loader = null; if (classpath != null) { - loader = new AntClassLoader(project, classpath); + loader = new AntClassLoader(getProject(), classpath); } else { - loader = new AntClassLoader(project, Path.systemClasspath); + loader = new AntClassLoader(getProject(), Path.systemClasspath); } // @@ -606,8 +604,7 @@ /** * Implements the guts of the resolveEntity() lookup strategy. */ - private InputSource resolveEntityImpl(String publicId, - String systemId) { + private InputSource resolveEntityImpl(String publicId) { InputSource result = null; @@ -636,8 +633,7 @@ /** * Implements the guts of the resolve() lookup strategy. */ - private SAXSource resolveImpl(String href, String base) - throws TransformerException { + private SAXSource resolveImpl(String href, String base) { SAXSource result = null; InputSource source = null; 1.4 +1 -2 jakarta-ant/src/main/org/apache/tools/ant/types/selectors/DependSelector.java Index: DependSelector.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/selectors/DependSelector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DependSelector.java 9 Jul 2002 21:06:14 -0000 1.3 +++ DependSelector.java 23 Jul 2002 07:54:56 -0000 1.4 @@ -56,7 +56,6 @@ import java.io.File; -import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Mapper; import org.apache.tools.ant.util.IdentityMapper; import org.apache.tools.ant.util.FileNameMapper; @@ -132,7 +131,7 @@ if (mapperElement != null) { throw new BuildException("Cannot define more than one mapper"); } - mapperElement = new Mapper(project); + mapperElement = new Mapper(getProject()); return mapperElement; } 1.4 +1 -2 jakarta-ant/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java Index: PresentSelector.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/selectors/PresentSelector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PresentSelector.java 9 Jul 2002 21:06:14 -0000 1.3 +++ PresentSelector.java 23 Jul 2002 07:54:56 -0000 1.4 @@ -56,7 +56,6 @@ import java.io.File; -import org.apache.tools.ant.Project; import org.apache.tools.ant.types.Mapper; import org.apache.tools.ant.util.IdentityMapper; import org.apache.tools.ant.util.FileNameMapper; @@ -123,7 +122,7 @@ if (mapperElement != null) { throw new BuildException("Cannot define more than one mapper"); } - mapperElement = new Mapper(project); + mapperElement = new Mapper(getProject()); return mapperElement; } 1.3 +1 -1 jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/DynamicTask.java Index: DynamicTask.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/DynamicTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DynamicTask.java 7 May 2002 11:08:33 -0000 1.2 +++ DynamicTask.java 23 Jul 2002 07:54:56 -0000 1.3 @@ -63,7 +63,7 @@ } public void setDynamicAttribute(String name, String value) { - project.setNewProperty(name, value); + getProject().setNewProperty(name, value); } public Object createDynamicElement(String name) { -- To unsubscribe, e-mail: For additional commands, e-mail: