source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/rmic.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 9.3 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>Rmic Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="rmic">Rmic</a></h2>
12<h3>Description</h3>
13<p>Runs the rmic compiler for a certain class.</p>
14<p>Rmic can be run on a single class (as specified with the classname
15attribute) or a number of classes at once (all classes below base that
16are neither _Stub nor _Skel classes). If you want to rmic a single
17class and this class is a class nested into another class, you have to
18specify the classname in the form <code>Outer$$Inner</code> instead of
19<code>Outer.Inner</code>.</p>
20<p>It is possible to refine the set of files that are being rmiced. This can be
21done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and <i>defaultexcludes</i>
22attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
23have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
24the files you want to have excluded. This is also done with patterns. And
25finally with the <i>defaultexcludes</i> attribute, you can specify whether you
26want to use default exclusions or not. See the section on <a
27href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
28inclusion/exclusion of files works, and how to write patterns.</p>
29<p>This task forms an implicit <a href="../CoreTypes/fileset.html">FileSet</a> and
30supports all attributes of <code>&lt;fileset&gt;</code>
31(<code>dir</code> becomes <code>base</code>) as well as the nested
32<code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
33<code>&lt;patternset&gt;</code> elements.</p>
34<p>It is possible to use different compilers. This can be selected
35with the &quot;build.rmic&quot; property or the <code>compiler</code>
36attribute. <a name="compilervalues">There are three choices</a>:</p>
37<ul>
38 <li>sun (the standard compiler of the JDK)</li>
39 <li>kaffe (the standard compiler of <a href="http://www.kaffe.org" target="_top">Kaffe</a>)</li>
40 <li>weblogic</li>
41</ul>
42
43<p>The <a href="http://dione.zcu.cz/~toman40/miniRMI/">miniRMI</a>
44project contains a compiler implementation for this task as well,
45please consult miniRMI's documentation to learn how to use it.</p>
46
47<h3>Parameters</h3>
48<table border="1" cellpadding="2" cellspacing="0">
49 <tr>
50 <td valign="top"><b>Attribute</b></td>
51 <td valign="top"><b>Description</b></td>
52 <td align="center" valign="top"><b>Required</b></td>
53 </tr>
54 <tr>
55 <td valign="top">base</td>
56 <td valign="top">the location to store the compiled files.</td>
57 <td valign="top" align="center">Yes</td>
58 </tr>
59 <tr>
60 <td valign="top">classname</td>
61 <td valign="top">the class for which to run <code>rmic</code>.</td>
62 <td valign="top" align="center">No</td>
63 </tr>
64 <tr>
65 <td valign="top">filtering</td>
66 <td valign="top">indicates whether token filtering should take place</td>
67 <td valign="top" align="center">No</td>
68 </tr>
69 <tr>
70 <td valign="top">sourcebase</td>
71 <td valign="top">Pass the &quot;-keepgenerated&quot; flag to rmic and
72 move the generated source file to the given sourcebase directory.</td>
73 <td align="center" valign="top">No</td>
74 </tr>
75 <tr>
76 <td valign="top">stubversion</td>
77 <td valign="top">Specify the JDK version for the generated stub code.
78 Specify &quot;1.1&quot; to pass the &quot;-v1.1&quot; option to rmic.</td>
79 <td align="center" valign="top">No</td>
80 </tr>
81 <tr>
82 <td valign="top">classpath</td>
83 <td valign="top">The classpath to use during compilation</td>
84 <td align="center" valign="top">No</td>
85 </tr>
86 <tr>
87 <td valign="top">classpathref</td>
88 <td valign="top">The classpath to use during compilation, given as <a
89 href="../using.html#references">reference</a> to a PATH defined elsewhere</td>
90 <td align="center" valign="top">No</td>
91 </tr>
92 <tr>
93 <td valign="top">includes</td>
94 <td valign="top">comma- or space-separated list of patterns of files that must be
95 included. All files are included when omitted.</td>
96 <td valign="top" align="center">No</td>
97 </tr>
98 <tr>
99 <td valign="top">includesfile</td>
100 <td valign="top">the name of a file. Each line of this file is
101 taken to be an include pattern</td>
102 <td valign="top" align="center">No</td>
103 </tr>
104 <tr>
105 <td valign="top">excludes</td>
106 <td valign="top">comma- or space-separated list of patterns of files that must be
107 excluded. No files (except default excludes) are excluded when omitted.</td>
108 <td valign="top" align="center">No</td>
109 </tr>
110 <tr>
111 <td valign="top">excludesfile</td>
112 <td valign="top">the name of a file. Each line of this file is
113 taken to be an exclude pattern</td>
114 <td valign="top" align="center">No</td>
115 </tr>
116 <tr>
117 <td valign="top">defaultexcludes</td>
118 <td valign="top">indicates whether default excludes should be used or not
119 (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when omitted.</td>
120 <td valign="top" align="center">No</td>
121 </tr>
122 <tr>
123 <td valign="top">verify</td>
124 <td valign="top">check that classes implement Remote before handing them
125 to rmic (default is false)</td>
126 <td align="center" valign="top">No</td>
127 </tr>
128 <tr>
129 <td valign="top">iiop</td>
130 <td valign="top">indicates that portable (RMI/IIOP) stubs should be generated</td>
131 <td align="center" valign="top">No</td>
132 </tr>
133 <tr>
134 <td valign="top">iiopopts</td>
135 <td valign="top">additional arguments for IIOP class generation</td>
136 <td align="center" valign="top">No</td>
137 </tr>
138 <tr>
139 <td valign="top">idl</td>
140 <td valign="top">indicates that IDL output files should be generated</td>
141 <td align="center" valign="top">No</td>
142 </tr>
143 <tr>
144 <td valign="top">idlopts</td>
145 <td valign="top">additional arguments for IDL file generation</td>
146 <td align="center" valign="top">No</td>
147 </tr>
148 <tr>
149 <td valign="top">debug</td>
150 <td valign="top">generate debug info (passes -g to rmic). Defaults to false.</td>
151 <td align="center" valign="top">No</td>
152 </tr>
153 <tr>
154 <td valign="top">includeAntRuntime</td>
155 <td valign="top">whether to include the Ant run-time libraries;
156 defaults to <code>yes</code>.</td>
157 <td align="center" valign="top">No</td>
158 </tr>
159 <tr>
160 <td valign="top">includeJavaRuntime</td>
161 <td valign="top">whether to include the default run-time
162 libraries from the executing VM; defaults to <code>no</code>.</td>
163 <td align="center" valign="top">No</td>
164 </tr>
165 <tr>
166 <td valign="top">extdirs</td>
167 <td valign="top">location of installed extensions.</td>
168 <td align="center" valign="top">No</td>
169 </tr>
170 <tr>
171 <td valign="top">compiler</td>
172 <td valign="top">The compiler implementation to use.
173 If this attribute is not set, the value of the
174 <code>build.rmic</code> property, if set, will be used.
175 Otherwise, the default compiler for the current VM will be used.
176 (See the above <a href="#compilervalues">list</a> of valid
177 compilers.)</td>
178 <td align="center" valign="top">No</td>
179 </tr>
180</table>
181<h3>Parameters specified as nested elements</h3>
182<h4>classpath and extdirs</h4>
183<p><code>Rmic</code>'s <i>classpath</i> and <i>extdirs</i> attributes are <a
184href="../using.html#path">PATH like structure</a> and can also be set via a nested
185<i>classpath</i> and <i>extdirs</i> elements.</p>
186
187<h4>compilerarg</h4>
188
189<p>You can specify additional command line arguments for the compiler
190with nested <code>&lt;compilerarg&gt;</code> elements. These elements
191are specified like <a href="../using.html#arg">Command-line
192Arguments</a> but have an additional attribute that can be used to
193enable arguments only if a given compiler implementation will be
194used.</p>
195<table border="1" cellpadding="2" cellspacing="0">
196<tr>
197 <td width="12%" valign="top"><b>Attribute</b></td>
198 <td width="78%" valign="top"><b>Description</b></td>
199 <td width="10%" valign="top"><b>Required</b></td>
200</tr>
201 <tr>
202 <td valign="top">value</td>
203 <td align="center" rowspan="4">See
204 <a href="../using.html#arg">Command-line Arguments</a>.</td>
205 <td align="center" rowspan="4">Exactly one of these.</td>
206 </tr>
207 <tr>
208 <td valign="top">line</td>
209 </tr>
210 <tr>
211 <td valign="top">file</td>
212 </tr>
213 <tr>
214 <td valign="top">path</td>
215 </tr>
216 <tr>
217 <td valign="top">compiler</td>
218 <td>Only pass the specified argument if the chosen
219 compiler implementation matches the value of this attribute.
220 Legal values are the
221 same as those in the above <a href="#compilervalues">list</a> of valid
222 compilers.)</td>
223 <td align="center">No</td>
224 </tr>
225</table>
226
227<h3>Examples</h3>
228<pre> &lt;rmic classname=&quot;com.xyz.FooBar&quot; base=&quot;${build}/classes&quot;/&gt;</pre>
229<p>runs the rmic compiler for the class <code>com.xyz.FooBar</code>. The
230compiled files will be stored in the directory <code>${build}/classes</code>.</p>
231<pre> &lt;rmic base=&quot;${build}/classes&quot; includes=&quot;**/Remote*.class&quot;/&gt;</pre>
232<p>runs the rmic compiler for all classes with <code>.class</code>
233files below <code>${build}/classes</code> whose classname starts with
234<i>Remote</i>. The compiled files will be stored in the directory
235<code>${build}/classes</code>.</p>
236
237<hr>
238<p align="center">Copyright &copy; 2000-2004 The Apache Software Foundation. All rights
239Reserved.</p>
240
241</body>
242</html>
243
Note: See TracBrowser for help on using the repository browser.