You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Rmic.java 23 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. /*
  2. * The Apache Software License, Version 1.1
  3. *
  4. * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
  5. * reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. *
  14. * 2. Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in
  16. * the documentation and/or other materials provided with the
  17. * distribution.
  18. *
  19. * 3. The end-user documentation included with the redistribution, if
  20. * any, must include the following acknowlegement:
  21. * "This product includes software developed by the
  22. * Apache Software Foundation (http://www.apache.org/)."
  23. * Alternately, this acknowlegement may appear in the software itself,
  24. * if and wherever such third-party acknowlegements normally appear.
  25. *
  26. * 4. The names "Ant" and "Apache Software
  27. * Foundation" must not be used to endorse or promote products derived
  28. * from this software without prior written permission. For written
  29. * permission, please contact apache@apache.org.
  30. *
  31. * 5. Products derived from this software may not be called "Apache"
  32. * nor may "Apache" appear in their names without prior written
  33. * permission of the Apache Group.
  34. *
  35. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  36. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  37. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38. * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  39. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  40. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  41. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  42. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  43. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  44. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  45. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  46. * SUCH DAMAGE.
  47. * ====================================================================
  48. *
  49. * This software consists of voluntary contributions made by many
  50. * individuals on behalf of the Apache Software Foundation. For more
  51. * information on the Apache Software Foundation, please see
  52. * <http://www.apache.org/>.
  53. */
  54. package org.apache.tools.ant.taskdefs;
  55. import java.io.File;
  56. import java.io.IOException;
  57. import java.rmi.Remote;
  58. import java.util.Vector;
  59. import org.apache.tools.ant.BuildException;
  60. import org.apache.tools.ant.DirectoryScanner;
  61. import org.apache.tools.ant.Project;
  62. import org.apache.tools.ant.taskdefs.rmic.RmicAdapter;
  63. import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory;
  64. import org.apache.tools.ant.types.FilterSetCollection;
  65. import org.apache.tools.ant.types.Path;
  66. import org.apache.tools.ant.types.Reference;
  67. import org.apache.tools.ant.util.FileNameMapper;
  68. import org.apache.tools.ant.util.FileUtils;
  69. import org.apache.tools.ant.util.SourceFileScanner;
  70. import org.apache.tools.ant.util.facade.FacadeTaskHelper;
  71. /**
  72. * Runs the rmic compiler against classes.</p>
  73. * <p>Rmic can be run on a single class (as specified with the classname
  74. * attribute) or a number of classes at once (all classes below base that
  75. * are neither _Stub nor _Skel classes). If you want to rmic a single
  76. * class and this class is a class nested into another class, you have to
  77. * specify the classname in the form <code>Outer$$Inner</code> instead of
  78. * <code>Outer.Inner</code>.</p>
  79. * <p>It is possible to refine the set of files that are being rmiced. This can be
  80. * done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>,
  81. * <i>excludesfile</i> and <i>defaultexcludes</i>
  82. * attributes. With the <i>includes</i> or <i>includesfile</i> attribute you specify the files you want to
  83. * have included by using patterns. The <i>exclude</i> or <i>excludesfile</i> attribute is used to specify
  84. * the files you want to have excluded. This is also done with patterns. And
  85. * finally with the <i>defaultexcludes</i> attribute, you can specify whether you
  86. * want to use default exclusions or not. See the section on
  87. * directory based tasks</a>, on how the
  88. * inclusion/exclusion of files works, and how to write patterns.</p>
  89. * <p>This task forms an implicit FileSet and
  90. * supports all attributes of <code>&lt;fileset&gt;</code>
  91. * (<code>dir</code> becomes <code>base</code>) as well as the nested
  92. * <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
  93. * <code>&lt;patternset&gt;</code> elements.</p>
  94. * <p>It is possible to use different compilers. This can be selected
  95. * with the &quot;build.rmic&quot; property or the <code>compiler</code>
  96. * attribute. <a name="compilervalues">There are three choices</a>:</p>
  97. * <ul>
  98. * <li>sun (the standard compiler of the JDK)</li>
  99. * <li>kaffe (the standard compiler of
  100. * {@link <a href="http://www.kaffe.org">Kaffe</a>})</li>
  101. * <li>weblogic</li>
  102. * </ul>
  103. *
  104. * <p> The <a href="http://dione.zcu.cz/~toman40/miniRMI/">miniRMI</a>
  105. * project contains a compiler implementation for this task as well,
  106. * please consult miniRMI's documentation to learn how to use it.</p>
  107. *
  108. * @author duncan@x180.com
  109. * @author ludovic.claude@websitewatchers.co.uk
  110. * @author David Maclean <a href="mailto:david@cm.co.za">david@cm.co.za</a>
  111. * @author Stefan Bodewig
  112. * @author Takashi Okamoto tokamoto@rd.nttdata.co.jp
  113. *
  114. * @since Ant 1.1
  115. *
  116. * @ant.task category="java"
  117. */
  118. public class Rmic extends MatchingTask {
  119. private static final String FAIL_MSG
  120. = "Rmic failed; see the compiler error output for details.";
  121. private File baseDir;
  122. private String classname;
  123. private File sourceBase;
  124. private String stubVersion;
  125. private Path compileClasspath;
  126. private Path extdirs;
  127. private boolean verify = false;
  128. private boolean filtering = false;
  129. private boolean iiop = false;
  130. private String iiopopts;
  131. private boolean idl = false;
  132. private String idlopts;
  133. private boolean debug = false;
  134. private boolean includeAntRuntime = true;
  135. private boolean includeJavaRuntime = false;
  136. private Vector compileList = new Vector();
  137. private ClassLoader loader = null;
  138. private FileUtils fileUtils = FileUtils.newFileUtils();
  139. private FacadeTaskHelper facade;
  140. public Rmic() {
  141. try {
  142. Class.forName("kaffe.rmi.rmic.RMIC");
  143. facade = new FacadeTaskHelper("kaffe");
  144. } catch (ClassNotFoundException cnfe) {
  145. facade = new FacadeTaskHelper("sun");
  146. }
  147. }
  148. /**
  149. * Sets the location to store the compiled files; required
  150. */
  151. public void setBase(File base) {
  152. this.baseDir = base;
  153. }
  154. /**
  155. * Gets the base directory to output generated class.
  156. */
  157. public File getBase() {
  158. return this.baseDir;
  159. }
  160. /**
  161. * Sets the the class to run <code>rmic</code> against;
  162. * optional
  163. */
  164. public void setClassname(String classname) {
  165. this.classname = classname;
  166. }
  167. /**
  168. * Gets the class name to compile.
  169. */
  170. public String getClassname() {
  171. return classname;
  172. }
  173. /**
  174. * optional directory to save generated source files to.
  175. */
  176. public void setSourceBase(File sourceBase) {
  177. this.sourceBase = sourceBase;
  178. }
  179. /**
  180. * Gets the source dirs to find the source java files.
  181. */
  182. public File getSourceBase() {
  183. return sourceBase;
  184. }
  185. /**
  186. * Specify the JDK version for the generated stub code.
  187. * Specify &quot;1.1&quot; to pass the &quot;-v1.1&quot; option to rmic.</td>
  188. */
  189. public void setStubVersion(String stubVersion) {
  190. this.stubVersion = stubVersion;
  191. }
  192. public String getStubVersion() {
  193. return stubVersion;
  194. }
  195. /**
  196. * indicates whether token filtering should take place;
  197. * optional, default=false
  198. */
  199. public void setFiltering(boolean filter) {
  200. filtering = filter;
  201. }
  202. public boolean getFiltering() {
  203. return filtering;
  204. }
  205. /**
  206. * generate debug info (passes -g to rmic);
  207. * optional, defaults to false
  208. */
  209. public void setDebug(boolean debug) {
  210. this.debug = debug;
  211. }
  212. /**
  213. * Gets the debug flag.
  214. */
  215. public boolean getDebug() {
  216. return debug;
  217. }
  218. /**
  219. * Set the classpath to be used for this compilation.
  220. */
  221. public void setClasspath(Path classpath) {
  222. if (compileClasspath == null) {
  223. compileClasspath = classpath;
  224. } else {
  225. compileClasspath.append(classpath);
  226. }
  227. }
  228. /**
  229. * Creates a nested classpath element.
  230. */
  231. public Path createClasspath() {
  232. if (compileClasspath == null) {
  233. compileClasspath = new Path(getProject());
  234. }
  235. return compileClasspath.createPath();
  236. }
  237. /**
  238. * Adds to the classpath a reference to
  239. * a &lt;path&gt; defined elsewhere.
  240. */
  241. public void setClasspathRef(Reference r) {
  242. createClasspath().setRefid(r);
  243. }
  244. /**
  245. * Gets the classpath.
  246. */
  247. public Path getClasspath() {
  248. return compileClasspath;
  249. }
  250. /**
  251. * Flag to enable verification so that the classes
  252. * found by the directory match are
  253. * checked to see if they implement java.rmi.Remote.
  254. * Optional; his defaults to false if not set.
  255. */
  256. public void setVerify(boolean verify) {
  257. this.verify = verify;
  258. }
  259. /** Get verify flag. */
  260. public boolean getVerify() {
  261. return verify;
  262. }
  263. /**
  264. * Indicates that IIOP compatible stubs should
  265. * be generated; optional, defaults to false
  266. * if not set.
  267. */
  268. public void setIiop(boolean iiop) {
  269. this.iiop = iiop;
  270. }
  271. /**
  272. * Gets iiop flags.
  273. */
  274. public boolean getIiop() {
  275. return iiop;
  276. }
  277. /**
  278. * Set additional arguments for iiop
  279. */
  280. public void setIiopopts(String iiopopts) {
  281. this.iiopopts = iiopopts;
  282. }
  283. /**
  284. * Gets additional arguments for iiop.
  285. */
  286. public String getIiopopts() {
  287. return iiopopts;
  288. }
  289. /**
  290. * Indicates that IDL output should be
  291. * generated. This defaults to false
  292. * if not set.
  293. */
  294. public void setIdl(boolean idl) {
  295. this.idl = idl;
  296. }
  297. /**
  298. * Gets IDL flags.
  299. */
  300. public boolean getIdl() {
  301. return idl;
  302. }
  303. /**
  304. * pass additional arguments for idl compile
  305. */
  306. public void setIdlopts(String idlopts) {
  307. this.idlopts = idlopts;
  308. }
  309. /**
  310. * Gets additional arguments for idl compile.
  311. */
  312. public String getIdlopts() {
  313. return idlopts;
  314. }
  315. /**
  316. * Gets file list to compile.
  317. */
  318. public Vector getFileList() {
  319. return compileList;
  320. }
  321. /**
  322. * Sets whether or not to include ant's own classpath in this task's
  323. * classpath.
  324. * Optional; default is <code>true</code>.
  325. */
  326. public void setIncludeantruntime(boolean include) {
  327. includeAntRuntime = include;
  328. }
  329. /**
  330. * Gets whether or not the ant classpath is to be included in the
  331. * task's classpath.
  332. */
  333. public boolean getIncludeantruntime() {
  334. return includeAntRuntime;
  335. }
  336. /**
  337. * task's classpath.
  338. * Enables or disables including the default run-time
  339. * libraries from the executing VM; optional,
  340. * defaults to false
  341. */
  342. public void setIncludejavaruntime(boolean include) {
  343. includeJavaRuntime = include;
  344. }
  345. /**
  346. * Gets whether or not the java runtime should be included in this
  347. * task's classpath.
  348. */
  349. public boolean getIncludejavaruntime() {
  350. return includeJavaRuntime;
  351. }
  352. /**
  353. * Sets the extension directories that will be used during the
  354. * compilation; optional.
  355. */
  356. public void setExtdirs(Path extdirs) {
  357. if (this.extdirs == null) {
  358. this.extdirs = extdirs;
  359. } else {
  360. this.extdirs.append(extdirs);
  361. }
  362. }
  363. /**
  364. * Maybe creates a nested extdirs element.
  365. */
  366. public Path createExtdirs() {
  367. if (extdirs == null) {
  368. extdirs = new Path(getProject());
  369. }
  370. return extdirs.createPath();
  371. }
  372. /**
  373. * Gets the extension directories that will be used during the
  374. * compilation.
  375. */
  376. public Path getExtdirs() {
  377. return extdirs;
  378. }
  379. public Vector getCompileList() {
  380. return compileList;
  381. }
  382. /**
  383. * Sets the compiler implementation to use; optional,
  384. * defaults to the value of the <code>build.rmic</code> property,
  385. * or failing that, default compiler for the current VM
  386. * @since Ant 1.5
  387. */
  388. public void setCompiler(String compiler) {
  389. facade.setImplementation(compiler);
  390. }
  391. /**
  392. * get the name of the current compiler
  393. * @since Ant 1.5
  394. */
  395. public String getCompiler() {
  396. facade.setMagicValue(getProject().getProperty("build.rmic"));
  397. return facade.getImplementation();
  398. }
  399. /**
  400. * Adds an implementation specific command line argument.
  401. * @since Ant 1.5
  402. */
  403. public ImplementationSpecificArgument createCompilerArg() {
  404. ImplementationSpecificArgument arg =
  405. new ImplementationSpecificArgument();
  406. facade.addImplementationArgument(arg);
  407. return arg;
  408. }
  409. /**
  410. * Get the additional implementation specific command line arguments.
  411. * @return array of command line arguments, guaranteed to be non-null.
  412. * @since Ant 1.5
  413. */
  414. public String[] getCurrentCompilerArgs() {
  415. getCompiler();
  416. return facade.getArgs();
  417. }
  418. /**
  419. * execute by creating an instance of an implementation
  420. * class and getting to do the work
  421. */
  422. public void execute() throws BuildException {
  423. if (baseDir == null) {
  424. throw new BuildException("base attribute must be set!", getLocation());
  425. }
  426. if (!baseDir.exists()) {
  427. throw new BuildException("base does not exist!", getLocation());
  428. }
  429. if (verify) {
  430. log("Verify has been turned on.", Project.MSG_VERBOSE);
  431. }
  432. RmicAdapter adapter = RmicAdapterFactory.getRmic(getCompiler(), this);
  433. // now we need to populate the compiler adapter
  434. adapter.setRmic(this);
  435. Path classpath = adapter.getClasspath();
  436. loader = getProject().createClassLoader(classpath);
  437. try {
  438. // scan base dirs to build up compile lists only if a
  439. // specific classname is not given
  440. if (classname == null) {
  441. DirectoryScanner ds = this.getDirectoryScanner(baseDir);
  442. String[] files = ds.getIncludedFiles();
  443. scanDir(baseDir, files, adapter.getMapper());
  444. } else {
  445. // otherwise perform a timestamp comparison - at least
  446. scanDir(baseDir,
  447. new String[] {classname.replace('.',
  448. File.separatorChar)
  449. + ".class"},
  450. adapter.getMapper());
  451. }
  452. int fileCount = compileList.size();
  453. if (fileCount > 0) {
  454. log("RMI Compiling " + fileCount +
  455. " class" + (fileCount > 1 ? "es" : "") + " to " + baseDir,
  456. Project.MSG_INFO);
  457. // finally, lets execute the compiler!!
  458. if (!adapter.execute()) {
  459. throw new BuildException(FAIL_MSG, getLocation());
  460. }
  461. }
  462. /*
  463. * Move the generated source file to the base directory. If
  464. * base directory and sourcebase are the same, the generated
  465. * sources are already in place.
  466. */
  467. if (null != sourceBase && !baseDir.equals(sourceBase)
  468. && fileCount > 0) {
  469. if (idl) {
  470. log("Cannot determine sourcefiles in idl mode, ",
  471. Project.MSG_WARN);
  472. log("sourcebase attribute will be ignored.",
  473. Project.MSG_WARN);
  474. } else {
  475. for (int j = 0; j < fileCount; j++) {
  476. moveGeneratedFile(baseDir, sourceBase,
  477. (String) compileList.elementAt(j),
  478. adapter);
  479. }
  480. }
  481. }
  482. } finally {
  483. compileList.removeAllElements();
  484. }
  485. }
  486. /**
  487. * Move the generated source file(s) to the base directory
  488. *
  489. * @throws org.apache.tools.ant.BuildException When error
  490. * copying/removing files.
  491. */
  492. private void moveGeneratedFile (File baseDir, File sourceBaseFile,
  493. String classname,
  494. RmicAdapter adapter)
  495. throws BuildException {
  496. String classFileName =
  497. classname.replace('.', File.separatorChar) + ".class";
  498. String[] generatedFiles =
  499. adapter.getMapper().mapFileName(classFileName);
  500. for (int i = 0; i < generatedFiles.length; i++) {
  501. final String generatedFile = generatedFiles[i];
  502. if (!generatedFile.endsWith(".class")) {
  503. // don't know how to handle that - a IDL file doesn't
  504. // have a corresponding Java source for example.
  505. continue;
  506. }
  507. final int pos = generatedFile.length() - ".class".length();
  508. String sourceFileName =
  509. generatedFile.substring(0, pos) + ".java";
  510. File oldFile = new File(baseDir, sourceFileName);
  511. if (!oldFile.exists()) {
  512. // no source file generated, nothing to move
  513. continue;
  514. }
  515. File newFile = new File(sourceBaseFile, sourceFileName);
  516. try {
  517. if (filtering) {
  518. fileUtils.copyFile(oldFile, newFile,
  519. new FilterSetCollection(getProject()
  520. .getGlobalFilterSet()));
  521. } else {
  522. fileUtils.copyFile(oldFile, newFile);
  523. }
  524. oldFile.delete();
  525. } catch (IOException ioe) {
  526. String msg = "Failed to copy " + oldFile + " to " +
  527. newFile + " due to " + ioe.getMessage();
  528. throw new BuildException(msg, ioe, getLocation());
  529. }
  530. }
  531. }
  532. /**
  533. * Scans the directory looking for class files to be compiled.
  534. * The result is returned in the class variable compileList.
  535. */
  536. protected void scanDir(File baseDir, String[] files,
  537. FileNameMapper mapper) {
  538. String[] newFiles = files;
  539. if (idl) {
  540. log("will leave uptodate test to rmic implementation in idl mode.",
  541. Project.MSG_VERBOSE);
  542. } else if (iiop
  543. && iiopopts != null && iiopopts.indexOf("-always") > -1) {
  544. log("no uptodate test as -always option has been specified",
  545. Project.MSG_VERBOSE);
  546. } else {
  547. SourceFileScanner sfs = new SourceFileScanner(this);
  548. newFiles = sfs.restrict(files, baseDir, baseDir, mapper);
  549. }
  550. for (int i = 0; i < newFiles.length; i++) {
  551. String classname = newFiles[i].replace(File.separatorChar, '.');
  552. classname = classname.substring(0, classname.lastIndexOf(".class"));
  553. compileList.addElement(classname);
  554. }
  555. }
  556. /**
  557. * Load named class and test whether it can be rmic'ed
  558. */
  559. public boolean isValidRmiRemote(String classname) {
  560. try {
  561. Class testClass = loader.loadClass(classname);
  562. // One cannot RMIC an interface for "classic" RMI (JRMP)
  563. if (testClass.isInterface() && !iiop && !idl) {
  564. return false;
  565. }
  566. return isValidRmiRemote(testClass);
  567. } catch (ClassNotFoundException e) {
  568. log("Unable to verify class " + classname +
  569. ". It could not be found.", Project.MSG_WARN);
  570. } catch (NoClassDefFoundError e) {
  571. log("Unable to verify class " + classname +
  572. ". It is not defined.", Project.MSG_WARN);
  573. } catch (Throwable t) {
  574. log("Unable to verify class " + classname +
  575. ". Loading caused Exception: " +
  576. t.getMessage(), Project.MSG_WARN);
  577. }
  578. // we only get here if an exception has been thrown
  579. return false;
  580. }
  581. /**
  582. * Returns the topmost interface that extends Remote for a given
  583. * class - if one exists.
  584. */
  585. public Class getRemoteInterface(Class testClass) {
  586. if (Remote.class.isAssignableFrom(testClass)) {
  587. Class [] interfaces = testClass.getInterfaces();
  588. if (interfaces != null) {
  589. for (int i = 0; i < interfaces.length; i++) {
  590. if (Remote.class.isAssignableFrom(interfaces[i])) {
  591. return interfaces[i];
  592. }
  593. }
  594. }
  595. }
  596. return null;
  597. }
  598. /**
  599. * Check to see if the class or (super)interfaces implement
  600. * java.rmi.Remote.
  601. */
  602. private boolean isValidRmiRemote (Class testClass) {
  603. return getRemoteInterface(testClass) != null;
  604. }
  605. /**
  606. * Classloader for the user-specified classpath.
  607. */
  608. public ClassLoader getLoader() {
  609. return loader;
  610. }
  611. /**
  612. * Adds an "compiler" attribute to Commandline$Attribute used to
  613. * filter command line attributes based on the current
  614. * implementation.
  615. */
  616. public class ImplementationSpecificArgument extends
  617. org.apache.tools.ant.util.facade.ImplementationSpecificArgument {
  618. /**
  619. * Only pass the specified argument if the
  620. * chosen compiler implementation matches the
  621. * value of this attribute. Legal values are
  622. * the same as those in the above list of
  623. * valid compilers.)
  624. */
  625. public void setCompiler(String impl) {
  626. super.setImplementation(impl);
  627. }
  628. }
  629. }