advertisement
Ant Manual 1.5.4 12/9/2003 7:47 PM
includes includesfile excludes excludesfile a replacefilter where token is the name of the property and value is the properties value. comma- or space-separated list of patterns of files that must be included. All files are included when omitted. the name of a file. Each line of this file is taken to be an include pattern
No
No comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted.
No the name of a file. Each line of this file is taken to be an exclude pattern
No defaultexcludes indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted.
No
Examples
<replace file="${src}/index.html" token="@@@" value="wombat"/> replaces occurrences of the string "@@@" with the string "wombat", in the file
${src}/index.html
.
Parameters specified as nested elements
This task forms an implicit FileSet and supports all attributes of <fileset> as well as the nested <include>, <exclude> and <patternset> elements.
If either the text you want to replace or the replacement text cross line boundaries, you can use nested elements to specify them.
Examples
<replace dir="${src}" value="wombat">
<include name="**/*.html"/>
<replacetoken><![CDATA[multi line token]]></replacetoken>
</replace> replaces occurrences of the string "multi line\ntoken" with the string "wombat", in all HTML files in the directory ${src}.Where \n is the platform specific line separator.
<replace file="${src}/index.html">
<replacetoken><![CDATA[two line token]]></replacetoken>
<replacevalue><![CDATA[two line token]]></replacevalue>
</replace>
9.52.1 replacefilter
In addition to allowing for multiple replacements, optional nested <replacefilter> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <replace> attribute propertyFile.
Attribute Description Required
token The string to search for. Yes
146/305
Ant Manual 1.5.4 12/9/2003 7:47 PM
value The replacement string. property Name of the property whose value is to serve as the replacement value.
Either may be specified, but not both. Both can be omitted, if desired.
If neither value nor property is used, the value provided using the <replace> attribute
value and/or the <replacevalue> element is used. If no value was specified using either of these options, the token is replaced with an empty string.
Examples
<replace
file="configure.sh"
value="defaultvalue"
propertyFile="source/name.properties">
<replacefilter
token="@token1@"/>
<replacefilter
token="@token2@"
value="value2"/>
<replacefilter
token="@token3@"
property="property.key"/>
</replace>
In file configure.sh, replace all instances of "@token1@" with "defaultvalue", all instances of "@token2@" with "value2", and all instances of "@token3@" with the value of the property "property.key", as it appears in property file src/name.properties.
Note: It is possible to use either the token/<replacetoken> and value/<replacevalue> attributes/elements, the nested replacefilter elements, or both in the same operation.
9.53 Rmic
Description
Runs the rmic compiler for a certain class.
Rmic can be run on a single class (as specified with the classname attribute) or a number of classes at once (all classes below base that are neither _Stub nor _Skel classes). If you want to rmic a single class and this class is a class nested into another class, you have to specify the classname in the form Outer$$Inner instead of Outer.Inner.
It is possible to refine the set of files that are being rmiced. This can be done with the
includes, includesfile, excludes, excludesfile and defaultexcludes attributes. With the
includes or includesfile attribute you specify the files you want to have included by using patterns. The exclude or excludesfile attribute is used to specify the files you want to have excluded. This is also done with patterns. And finally with the defaultexcludes attribute, you can specify whether you want to use default exclusions or not. See the section on directory based tasks , on how the inclusion/exclusion of files works, and how to write patterns.
This task forms an implicit FileSet and supports all attributes of <fileset> (dir becomes base
) as well as the nested <include>, <exclude> and <patternset> elements.
147/305
Ant Manual 1.5.4 12/9/2003 7:47 PM
It is possible to use different compilers. This can be selected with the "build.rmic" property or the compiler attribute. There are three choices:
• sun (the standard compiler of the JDK)
• kaffe (the standard compiler of Kaffe )
• weblogic
The miniRMI project contains a compiler implementation for this task as well, please consult miniRMI's documentation to learn how to use it.
Parameters
Attribute
base classname filtering sourcebase stubversion
Description
Specify the JDK version for the generated stub code. Specify "1.1" to pass the "-v1.1" option to rmic.
Required
the location to store the compiled files. the class for which to run rmic.
Yes
No indicates whether token filtering should take place No
Pass the " -keepgenerated" flag to rmic and move the generated source file to the given sourcebase directory.
No
No classpath classpathref includes includesfile excludes excludesfile defaultexcludes verify
The classpath to use during compilation
The classpath to use during compilation, given as reference to a PATH defined elsewhere comma- or space-separated list of patterns of files that must be included. All files are included when omitted.
No
No
No the name of a file. Each line of this file is taken to be an include pattern No comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted.
No the name of a file. Each line of this file is taken to be an exclude pattern indicates whether default excludes should be used or not ("yes"/"no").
Default excludes are used when omitted. check that classes implement Remote before handing them to rmic
(default is false) indicates that portable (RMI/IIOP) stubs should be generated additional arguments for IIOP class generation
No
No
No
No
No iiop iiopopts idl idlopts indicates that IDL output files should be generated additional arguments for IDL file generation debug generate debug info (passes -g to rmic). Defaults to false. includeAntRuntime whether to include the Ant run-time libraries; defaults to yes. includeJavaRuntime whether to include the default run-time libraries from the executing
VM; defaults to no. extdirs location of installed extensions.
No
No
No
No
No
No
No compiler The compiler implementation to use. If this attribute is not set, the value of the build.rmic property, if set, will be used. Otherwise, the default compiler for the current VM will be used. (See the above list of valid compilers.)
Parameters specified as nested elements classpath and extdirs
148/305
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 4 Apache Ant User Manual Authors
- 5 Feedback and Troubleshooting
- 6 Introduction
- 7 Installing Ant
- 14 Running Ant
- 17 Using Ant
- 25 Concepts
- 61 Ant Tasks
- 67 Core Tasks
- 168 Optional Tasks
- 295 Listeners & Loggers
- 11 Apache Ant User Manual Authors
- 12 Feedback and Troubleshooting
- 13 Introduction
- 14 Installing Ant
- 14 Getting Ant
- 14 Binary Edition
- 14 Source Edition
- 14 System Requirements
- 14 Installing Ant
- 15 Setup
- 15 Optional Tasks
- 15 Windows
- 16 Unix (bash)
- 16 Unix (csh)
- 16 Advanced
- 16 Building Ant
- 17 Library Dependencies
- 18 Platform Issues
- 19 Microsoft Windows
- 19 Apple MacOS X
- 19 Novell Netware
- 20 Other platforms
- 21 Running Ant
- 21 Command Line
- 23 Cygwin Users
- 23 Running Ant via Java
- 24 Using Ant
- 24 Writing a Simple Buildfile
- 24 Projects
- 24 Targets
- 25 Tasks
- 26 Properties
- 26 Built-in Properties
- 27 Example Buildfile
- 28 Token Filters
- 28 Path-like Structures
- 30 Command-line Arguments
- 30 Examples
- 30 References
- 32 Concepts
- 32 build.sysclasspath
- 32 Common Attributes of all Tasks
- 32 Core Types
- 32 Description
- 32 Directory-based Tasks
- 36 DirSet
- 37 FileList
- 38 FileSet
- 39 Mapping File Names
- 42 FilterChains and FilterReaders
- 44 FilterReader
- 45 ExpandProperties
- 46 HeadFilter
- 46 LineContains
- 47 LineContainsRegExp
- 47 PrefixLines
- 47 ReplaceTokens
- 48 StripJavaComments
- 48 StripLineBreaks
- 49 StripLineComments
- 49 TabsToSpaces
- 50 TailFilter
- 51 FilterSet
- 52 PatternSet
- 54 Selectors
- 61 XMLCatalog
- 64 Optional Types
- 64 ClassFileSet
- 65 Extension
- 66 ExtensionSet
- 68 Ant Tasks
- 68 Overview of Ant Tasks
- 68 Archive Tasks
- 68 Audit/Coverage Tasks
- 68 Compile Tasks
- 69 Deployment Tasks
- 69 Documentation Tasks
- 69 EJB Tasks
- 69 Execution Tasks
- 69 File Tasks
- 70 Java2 Extensions Tasks
- 70 Logging Tasks
- 70 Mail Tasks
- 70 Miscellaneous Tasks
- 71 .NET Tasks
- 71 Pre-process Tasks
- 71 Property Tasks
- 72 Remote Tasks
- 72 SCM Tasks
- 72 Testing Tasks
- 72 Visual Age for Java Tasks
- 74 Core Tasks
- 76 AntCall
- 77 AntStructure
- 78 Apply/ExecOn
- 80 Available
- 82 Basename
- 82 BuildNumber
- 83 BUnzip2 / GUnzip
- 84 BZip2 / GZip
- 84 Checksum
- 86 Chmod
- 87 Concat
- 88 Condition
- 89 Conditions
- 93 Copydir – Deprecated
- 94 Copyfile – Deprecated
- 96 CvsChangeLog
- 98 cvspass
- 98 CvsTagDiff
- 100 Delete
- 102 Deltree – Deprecated
- 102 DependSet
- 103 Dirname
- 109 Filter
- 109 FixCRLF
- 112 GenKey
- 114 GUnzip
- 114 GZip / BZip
- 114 Input
- 120 Javac
- 125 Javadoc/Javadoc
- 131 LoadFile
- 132 LoadProperties
- 134 Manifest
- 136 Mkdir
- 138 Parallel
- 139 Patch
- 139 Pathconvert
- 141 Property
- 143 Record
- 145 Rename – Deprecated
- 145 Replace
- 146 replacefilter
- 149 Sequential
- 150 SignJar
- 150 Sleep
- 155 Style / Xslt
- 160 Taskdef
- 161 Tempfile
- 161 Touch
- 162 Tstamp
- 163 Typedef
- 164 Unjar/Untar/Unwar/Unzip
- 165 Uptodate
- 167 Waitfor
- 170 XmlP roperty
- 171 Xslt / Style
- 175 Optional Tasks
- 175 .NET tasks
-
175
-
176
-
177
- 178 Change Log
- 179 ANTLR
- 181 ClearCase Support
- 181 CCCheckin
- 182 CCCheckout
- 182 CCUnCheckout
- 183 CCUpdate
- 183 Continuus Support
- 183 CCMCheckin
- 184 CCMCheckout
- 184 CCMCheckinTask
- 184 CCMReconfigure
- 185 CCMCreateTask
- 185 Depend
- 187 Ant EJB Tasks User Manual
- 188 Introduction
- 188 EJB Tasks
- 197 Vendor-specific deployment elements
- 207 echoproperties
- 209 Sending Files
- 210 Getting Files
- 210 Deleting Files
- 210 Listing Files
- 211 Creating Directories
- 211 icontract
- 212 jarlib-available
- 214 jarlib-display
- 215 jarlib- manifest
- 216 jarlib-resolve
- 218 JavaCC
- 220 Javah
- 224 JDepend
- 225 JJTree
- 226 Jlink - Deprecated
- 228 JProbe
- 228 Introduction
- 228 JPCoverage
- 230 JPCovMerge
- 231 JPCovReport
- 233 JUnit
- 237 JUnitReport
- 238 MMetrics
- 239 MAudit
- 241 MimeMail – Deprecated
- 242 MParse
- 243 Native2Ascii
- 244 NetRexxC
- 246 Perforce Tasks User Manual
- 247 Introduction
- 247 The Tasks
- 247 General P4 Properties
- 248 Taskdefs
- 248 P4Sync
- 249 P4Change
- 249 P4Edit
- 249 P4Submit
- 250 P4Have
- 250 P4Label
- 250 P4Counter
- 251 P4Reopen
- 251 P4Revert
- 251 P4Add
- 252 PropertyFile
- 252 Introduction
- 252 PropertyFile Task
- 254 Ant Pvcs Task User Manual
- 255 Introduction
- 255 Pvcs Task
- 257 RenameExtensions – Deprecated
- 258 ReplaceRegExp
- 260 ANT ServerDeploy User Manual
- 260 ServerDeploy element
- 261 Generic element
- 261 WebLogic element
- 262 JOnAS (Java Open Applicaton Server) element
- 263 Setproxy
- 264 Script
- 265 Sound
- 266 SourceOffSite Tasks User Manual
- 266 Introduction
- 267 The Tasks
- 267 SOSGet
- 267 SOSLabel
- 268 SOSCheckIn
- 269 SOSCheckOut
- 269 Splash
- 270 StarTeam Support
- 271 Common Parameters for All Starteam Tasks
- 271 STCheckout
- 273 STCheckin
- 276 STLabel
- 277 STList
- 278 Starteam - Deprecated
- 280 Stylebook
- 281 Telnet
- 283 Translate
- 284 Visual Age for Java Tasks and Plugin User Manual
- 285 Table of Contents
- 285 Introduction
- 285 The Tasks
- 286 VAJLoad
- 286 VAJExport
- 287 VAJImport
- 288 The Plugin
- 291 Frequently Asked Questions
- 292 Microsoft Visual SourceSafe Tasks User Manual
- 293 Introduction
- 293 The Tasks
- 293 VssGet
- 294 VssLabel
- 295 VssHistory
- 296 VssCheckin
- 297 VssCheckout
- 297 VssAdd
- 298 VssCp
- 298 VssCreate
- 299 wljspc
- 300 XMLValidate
- 302 Listeners & Loggers
- 302 Overview
- 302 Listeners
- 302 Loggers
- 302 Built-in Listeners/Loggers
- 302 DefaultLogger
- 302 NoBannerLogger
- 302 MailLogger
- 303 AnsiColorLogger
- 304 Log4jListener
- 305 XmlLogger
- 305 Writing your own