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