Apache Ant 1.5.4 Manual


Add to my manuals
305 Pages

advertisement

Apache Ant 1.5.4 Manual | Manualzz

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

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents