Deprecated API

Contents

Deprecated Classes

Copydir
The copydir task is deprecated since Ant 1.2.
Copyfile
The copyfile task is deprecated since Ant 1.2.
Deltree
The deltree task is deprecated since Ant 1.2.
Exec
delegate to Execute instead.
Jikes
merged into the class Javac.
JikesOutputParser
use Jikes' exit value to detect compilation failure.
KeySubst
KeySubst is deprecated since Ant 1.1.
MimeMail
Use EmailTask instead.
Rename
The rename task is deprecated since Ant 1.2.
RenameExtensions
Use <move> instead
TaskOutputStream
use LogOutputStream instead.
Test
testlet has been abandoned in favor of JUnit by the Avalon community

Deprecated Fields

org.apache.tools.ant.types.DataType.description
The user should not be directly referencing variable.
org.apache.tools.ant.types.DataType.ref
The user should not be directly referencing variable.
org.apache.tools.ant.types.DataType.checked
The user should not be directly referencing variable.
org.apache.tools.ant.DirectoryScanner.DEFAULTEXCLUDES
use the getDefaultExcludes method instead.
org.apache.tools.ant.taskdefs.optional.perforce.P4Change.description
You should not be accessing this variable directly.
org.apache.tools.ant.Project.JAVA_1_0
org.apache.tools.ant.Project.JAVA_1_1
org.apache.tools.ant.Project.JAVA_1_2
org.apache.tools.ant.Project.JAVA_1_3
org.apache.tools.ant.Project.JAVA_1_4
org.apache.tools.ant.ProjectComponent.project
You should not be directly accessing this variable directly.
org.apache.tools.ant.taskdefs.Tar.WARN
Tar.WARN is deprecated and is replaced with Tar.TarLongFileMode.WARN
org.apache.tools.ant.taskdefs.Tar.FAIL
Tar.FAIL is deprecated and is replaced with Tar.TarLongFileMode.FAIL
org.apache.tools.ant.taskdefs.Tar.TRUNCATE
Tar.TRUNCATE is deprecated and is replaced with Tar.TarLongFileMode.TRUNCATE
org.apache.tools.ant.taskdefs.Tar.GNU
Tar.GNU is deprecated and is replaced with Tar.TarLongFileMode.GNU
org.apache.tools.ant.taskdefs.Tar.OMIT
Tar.OMIT is deprecated and is replaced with Tar.TarLongFileMode.OMIT
org.apache.tools.ant.Task.target
You should not be accessing this variable directly.
org.apache.tools.ant.Task.description
You should not be accessing this variable directly.
org.apache.tools.ant.Task.location
You should not be accessing this variable directly.
org.apache.tools.ant.Task.taskName
You should not be accessing this variable directly.
org.apache.tools.ant.Task.taskType
You should not be accessing this variable directly.
org.apache.tools.ant.Task.wrapper
You should not be accessing this variable directly.

Deprecated Methods

org.apache.tools.ant.AntClassLoader.initializeClass(Class)
use Class.forName with initialize=true instead.
org.apache.tools.ant.taskdefs.optional.ANTLR.setGlib(String)
since ant 1.6
org.apache.tools.ant.taskdefs.Available.setType(String)
setType(String) is deprecated and is replaced with setType(Available.FileDir) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.
org.apache.tools.ant.util.CollectionUtils.equals(Vector,Vector)
org.apache.tools.ant.util.CollectionUtils.equals(Dictionary,Dictionary)
org.apache.tools.ant.util.CollectionUtils.putAll(Dictionary,Dictionary)
org.apache.tools.ant.types.CommandlineJava.size()
please dont use this -it effectively creates the entire command.
org.apache.tools.ant.taskdefs.Copy.setPreserveLastModified(String)
setPreserveLastModified(String) has been deprecated and replaced with setPreserveLastModified(boolean) to consistently let the Introspection mechanism work.
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.addExtdirsToClasspath(Path)
use org.apache.tools.ant.types.Path#addExtdirs instead
org.apache.tools.ant.taskdefs.DefBase.setReverseLoader(boolean)
stop using this attribute
org.apache.tools.ant.taskdefs.Ear.setEarfile(File)
Use setDestFile(destfile) instead
org.apache.tools.ant.taskdefs.ExecuteJava.setOutput(PrintStream)
manage output at the task level
org.apache.tools.ant.taskdefs.FixCRLF.setCr(FixCRLF.AddAsisRemove)
use setEol instead.
org.apache.tools.ant.taskdefs.optional.net.FTP.setAction(String)
setAction(String) is deprecated and is replaced with setAction(FTP.Action) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.
org.apache.tools.ant.taskdefs.Gjdoc.setExtdirs(String)
Use the setExtdirs(Path) version.
org.apache.tools.ant.IntrospectionHelper.createElement(Project,Object,String)
This is not a namespace aware method.
org.apache.tools.ant.taskdefs.Jar.setJarfile(File)
Use setDestFile(File) instead
org.apache.tools.ant.taskdefs.Javadoc.setExtdirs(String)
Use the setExtdirs(Path) version.
org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask.createSourcespath()
org.apache.tools.ant.taskdefs.optional.jdepend.JDependTask.getSourcespath()
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.addSysproperty(Environment.Variable)
since ant 1.6
org.apache.tools.ant.taskdefs.MacroInstance.createDynamicElement(String)
org.apache.tools.ant.taskdefs.PathConvert.setTargetos(String)
use the method taking a TargetOs argument instead.
org.apache.tools.ant.Project.setDefaultTarget(String)
use setDefault
org.apache.tools.ant.Project.addFilter(String,String)
Use getGlobalFilterSet().addFilter(token,value)
org.apache.tools.ant.Project.getFilters()
Use getGlobalFilterSet().getFilterHash()
org.apache.tools.ant.Project.getJavaVersion()
use org.apache.tools.ant.util.JavaEnvUtils instead
org.apache.tools.ant.Project.resolveFile(String,File)
org.apache.tools.ant.Project.copyFile(String,String)
org.apache.tools.ant.Project.copyFile(String,String,boolean)
org.apache.tools.ant.Project.copyFile(String,String,boolean,boolean)
org.apache.tools.ant.Project.copyFile(String,String,boolean,boolean,boolean)
org.apache.tools.ant.Project.copyFile(File,File)
org.apache.tools.ant.Project.copyFile(File,File,boolean)
org.apache.tools.ant.Project.copyFile(File,File,boolean,boolean)
org.apache.tools.ant.Project.copyFile(File,File,boolean,boolean,boolean)
org.apache.tools.ant.Project.setFileLastModified(File,long)
org.apache.tools.ant.ProjectHelper.configureProject(Project,File)
Use the non-static parse method
org.apache.tools.ant.ProjectHelper.getContextClassLoader()
Use LoaderUtils.getContextClassLoader()
org.apache.tools.ant.ProjectHelper.configure(Object,AttributeList,Project)
Use IntrospectionHelper for each property
org.apache.tools.ant.ProjectHelper.replaceProperties(Project,String)
Use project.replaceProperties()
org.apache.tools.ant.ProjectHelper.replaceProperties(Project,String,Hashtable)
Use PropertyHelper
org.apache.tools.ant.ProjectHelper.parsePropertyString(String,Vector,Vector)
Use PropertyHelper
org.apache.tools.ant.taskdefs.Property.setUserProperty(boolean)
This was never a supported feature and has been deprecated without replacement
org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.setByLine(String)
- use setByLine(boolean)
org.apache.tools.ant.RuntimeConfigurable.setAttributes(AttributeList)
org.apache.tools.ant.RuntimeConfigurable.getAttributes()
Deprecated since Ant 1.6 in favor of getAttributeMap().
org.apache.tools.ant.taskdefs.SendEmail.setMailport(Integer)
Use setMailport(int) instead.
org.apache.tools.ant.taskdefs.optional.splash.SplashTask.setUseproxy(boolean)
use org.apache.tools.ant.taskdefs.optional.SetProxy
org.apache.tools.ant.taskdefs.SQLExec.printResults(PrintStream)
use the two arg version instead.
org.apache.tools.ant.taskdefs.Tar.setTarfile(File)
for consistency with other tasks, please use setDestFile()
org.apache.tools.ant.taskdefs.Tar.setLongfile(String)
setLongFile(String) is deprecated and is replaced with setLongFile(Tar.TarLongFileMode) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the mode in its own class.
org.apache.tools.ant.taskdefs.Tar.archiveIsUpToDate(String[])
use the two-arg version instead.
org.apache.tools.ant.taskdefs.Touch.touch(File)
org.apache.tools.ant.taskdefs.optional.TraXLiaison.getSystemId(File)
use org.apache.tools.ant.util.JAXPUtils#getSystemId instead
org.apache.tools.ant.taskdefs.Tstamp.CustomFormat.setUnit(String)
setUnit(String) is deprecated and is replaced with setUnit(Tstamp.Unit) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the unit in its own class.
org.apache.tools.ant.taskdefs.Unpack.setSrc(String)
setSrc(String) is deprecated and is replaced with setSrc(File) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.
org.apache.tools.ant.taskdefs.Unpack.setDest(String)
setDest(String) is deprecated and is replaced with setDest(File) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.
org.apache.tools.ant.taskdefs.War.setWarfile(File)
Use setDestFile(File) instead
org.apache.tools.ant.taskdefs.Zip.setZipfile(File)
Use setDestFile(File) instead.
org.apache.tools.ant.taskdefs.Zip.setFile(File)
Use setDestFile(File) instead

Deprecated Constructors

org.apache.tools.ant.taskdefs.ExecuteWatchdog.ExecuteWatchdog(int)
Use constructor with a long type instead.
org.apache.tools.ant.Main.Main(String[])
org.apache.tools.ant.types.Reference.Reference()
Please use Reference(Project,String) instead.
org.apache.tools.ant.types.Reference.Reference(String)
Please use Reference(Project,String) instead.

Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.