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.

VAJAntTool.html 24 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="Content-Language" content="en-us">
  6. <title>Visual Age for Java Tasks and Plugin User Manual</title>
  7. </head>
  8. <body>
  9. <H1>Visual Age for Java Tasks and Plugin User Manual</H1>
  10. <a name="authors"></A>by<UL>
  11. <LI>Wolf Siberski
  12. (<A href="mailto:wolf.siberski@tui.de">
  13. wolf.siberski@tui.de</A> )
  14. <LI>Christoph Wilhelms
  15. (<A href="mailto:christoph.wilhelms@tui.de">
  16. christoph.wilhelms@tui.de</A>)</LI></UL>
  17. Version 1.2 - 2001/06/14<br>
  18. <hr>
  19. <h2>Table of Contents</H2>
  20. <ul>
  21. <li><A href="#introduction">Introduction</A>
  22. <li><A href="#tasks">The Tasks</A><A href="#introduction"></A>
  23. <ul>
  24. <li><A href="#vajload">VAJLoad</A>&gt;
  25. <li><A href="#vajexport">VAJExport</A>&gt;
  26. <li><A href="#vajimport">VAJImport</A>&gt;</LI></UL>
  27. <li><A href="#sample_buildfile">A sample build file</A><br>
  28. <li><A href="#plugin">The Plugin</A>
  29. <ul>
  30. <li><A href="#installation">Installation</A>&gt;
  31. <li><A href="#usage">Usage</A> </LI></UL>
  32. <li><A href="#faq">Frequently Asked Questions</A>&gt;
  33. <li><A href="#va_versions">Visual Age Versions</A>&gt;
  34. <li><A href="#history">History</A><A href="#history"></A> </LI></UL>
  35. <hr>
  36. <h2><a name="introduction"></A>Introduction</H2>
  37. <P>Visual Age for Java is a great Java IDE, but it lacks
  38. decent build support; for creating deliveries. On the other hand, Ant supports
  39. the build process very good, but is (at least at the moment) command line based.
  40. So we decided to write some tasks to access the VAJ repository and a small
  41. visual Ant frontend to make running Ant from VAJ possible. We use the Tool API
  42. to integrate Ant in VisualAge for Java. In combination with the VAJ tasks
  43. (vajload, vajexport, vajimport) you can load defined&nbsp;versions of projects
  44. into your workspace, export the source code, compile it with an external
  45. compiler and build a jar without leaving the IDE. Of course compile messages are
  46. viewed in a logging window. Concluding: This tool provides decent deployment
  47. support VAJ has not (out of the box).</P>
  48. <H3>What's new</H3>
  49. <table cellpadding="2" cellspacing="2" border="0" width="500">
  50. <tr valign="top">
  51. <td valign="top">2001/06/14</TD>
  52. <td valign="top">
  53. <UL>
  54. <LI>Now all tasks can access VAJ via 'Remote Access
  55. To Tool API'. Therefore builds containing VAJ tasks can also be executed
  56. from the command line (Kudos to Glenn McAllister for describing the
  57. concept and providing source code at
  58. <A href="http://www7.software.ibm.com/vad.nsf/Data/Document4366">
  59. http://www7.software.ibm.com/vad.nsf/Data/Document4366</A>.&nbsp;
  60. <LI>It is possible to cancel a running&nbsp;build
  61. executed from the plugin
  62. <LI>Improved error handling in the plugin. Now all
  63. errors should show up either in the log window or in the
  64. console.</LI></UL></TD></TR></TABLE>
  65. <h2><a name="tasks"></A>The Tasks</H2>
  66. At the moment there are three tasks which help integrating the VAJ repository
  67. contents into an external build process:
  68. <table cellpadding="2" cellspacing="2" border="0" width="500">
  69. <tr valign="top">
  70. <td valign="top"><A href="#vajload">VAJLoad</A><br></TD>
  71. <td valign="top"> loads specified versions into the workspace<br></TD></TR>
  72. <tr valign="top">
  73. <td valign="top"><A href="#vajexport">VAJExport</A><br></TD>
  74. <td valign="top"> exports specified packages into the file system<br></TD></TR>
  75. <tr valign="top">
  76. <td valign="top"><A href="#vajimport">VAJImport</A><br></TD>
  77. <td valign="top"> imports specified files into the workspace<br></TD></TR></TABLE>
  78. <P>These tasks are described in detail below.</P>
  79. <hr>
  80. <P></P>
  81. <h2><a name="vajload"></A>VAJLoad</H2>
  82. <h3>Description:</H3>
  83. <p>Loads a specified VAJ project version into the
  84. workspace.</P>
  85. <h3>Parameters</H3>
  86. <table border="1" cellpadding="2" cellspacing="0">
  87. <tr>
  88. <td valign="top"><b>Attribute</B></TD>
  89. <td valign="top"><b>Description</B></TD>
  90. <td align="middle" valign="top"><b>Required</B></TD></TR>
  91. <tr>
  92. <td valign="top">remote</TD>
  93. <td valign="top">
  94. <P>name and port of a remote tool server. (format:
  95. &lt;servername&gt;:&lt;port no&gt;).<BR>If this
  96. attribute is set, the tasks will&nbsp;be executed on the specified tool
  97. server.&nbsp;</P></TD>
  98. <td valign="top" align="middle">no</TD></TR></TABLE>
  99. <h3>Parameters specified as nested elements</H3>
  100. <h4>vajproject</H4>
  101. <table border="1" cellpadding="2" cellspacing="0">
  102. <tr>
  103. <td valign="top"><b>Attribute</B></TD>
  104. <td valign="top"><b>Description</B></TD>
  105. <td align="middle" valign="top"><b>Required</B></TD></TR>
  106. <tr>
  107. <td valign="top">name</TD>
  108. <td valign="top">name of the VAJ project to load into
  109. the workspace</TD>
  110. <td valign="top" align="middle">yes</TD></TR>
  111. <tr>
  112. <td valign="top">version</TD>
  113. <td valign="top">name of the requested version</TD>
  114. <td valign="top" align="middle">yes</TD></TR>
  115. <tr>
  116. <td valign="top">remote</TD>
  117. <td valign="top">
  118. <P>name and port of a remote tool server. (format:
  119. &lt;servername&gt;:&lt;port no&gt;).<BR>If this
  120. attribute is set, the tasks will&nbsp;be executed on the specified tool
  121. server.&nbsp;</P></TD>
  122. <td valign="top" align="middle">no</TD></TR></TABLE>
  123. <h3>Example</H3>
  124. <pre>&lt;vajload remote="localhost:32767"&gt;
  125. &lt;vajproject name="My Testcases" version="1.7beta"/&gt;
  126. &lt;vajproject name="JUnit" version="3.2" /&gt;
  127. &lt;/vajload&gt;
  128. </PRE>
  129. <hr>
  130. <h2><a name="vajexport"></A>VAJExport</H2>
  131. <h3>Description:</H3>
  132. <p>Exports Java source files, class files and/or resources from the workspace
  133. to the file system. Exports can be specified by giving the VAJ project
  134. name and package name(s). This works very similar to <A href="index.html#fileset">
  135. FileSets</A>. </P>
  136. <h3>Parameters</H3>
  137. <table border="1" cellpadding="2" cellspacing="0">
  138. <tr>
  139. <td valign="top"><b>Attribute</B></TD>
  140. <td valign="top"><b>Description</B></TD>
  141. <td align="middle" valign="top"><b>Required</B></TD></TR>
  142. <tr>
  143. <td valign="top">destdir</TD>
  144. <td valign="top">location to store the exported
  145. files</TD>
  146. <td valign="top" align="middle">yes</TD></TR>
  147. <tr>
  148. <td valign="top">exportSources</TD>
  149. <td valign="top">export source files (default:
  150. "yes")</TD>
  151. <td valign="top" align="middle">no</TD></TR>
  152. <tr valign="top">
  153. <td valign="top">exportResources</TD>
  154. <td valign="top">export resource files (default:
  155. "yes")</TD>
  156. <td valign="top" align="middle">no</TD></TR>
  157. <tr valign="top">
  158. <td valign="top">exportClasses</TD>
  159. <td valign="top">export class files (default: "no")</TD>
  160. <td valign="top" align="middle">no</TD></TR>
  161. <tr valign="top">
  162. <td valign="top">exportDebugInfo</TD>
  163. <td valign="top">include debug info in exported class
  164. files (default: "no")</TD>
  165. <td valign="top" align="middle">no</TD></TR>
  166. <TR>
  167. <TD vAlign=top>defaultexcludes</TD>
  168. <TD vAlign=top>
  169. <P>use default excludes when exporting (default: "yes").<BR>Default excludes are:&nbsp;IBM*/**, Java
  170. class libraries/**, Sun class libraries*/**, JSP Page Compile Generated
  171. Code/**, VisualAge*/**&nbsp;</P></TD>
  172. <TD vAlign=top align="middle">no</TD></TR>
  173. <tr valign="top">
  174. <td valign="top">overwrite</TD>
  175. <td valign="top"> overwrite existing files (default:
  176. "yes")</TD>
  177. <td valign="top" align="middle">no</TD></TR>
  178. <tr>
  179. <td valign="top">remote</TD>
  180. <td valign="top">
  181. <P>name and port of a remote tool server. (format:
  182. &lt;servername&gt;:&lt;port no&gt;).<BR>If this
  183. attribute is set, the tasks will&nbsp;be executed on the specified tool
  184. server.&nbsp;</P></TD>
  185. <td valign="top" align="middle">no</TD></TR></TABLE>
  186. <h3>Parameters specified as nested elements</H3>
  187. <h4>include</H4>
  188. specifies the packages to include into the export
  189. <table border="1" cellpadding="2" cellspacing="0">
  190. <tr>
  191. <td valign="top"><b>Attribute</B></TD>
  192. <td valign="top"><b>Description</B></TD>
  193. <td align="middle" valign="top"><b>Required</B></TD></TR>
  194. <tr>
  195. <td valign="top">name</TD>
  196. <td valign="top">name of the VAJ project and package to export.<br>
  197. The first element of the name must be the project name, <br>
  198. then the package name elements
  199. separated by '/'.</TD>
  200. <td valign="top">yes</TD></TR></TABLE>
  201. <h4>exclude</H4>
  202. specifies the packages to exclude from the export<br>
  203. <table border="1" cellpadding="2" cellspacing="0">
  204. <tr>
  205. <td valign="top"><b>Attribute</B></TD>
  206. <td valign="top"><b>Description</B></TD>
  207. <td align="middle" valign="top"><b>Required</B></TD></TR>
  208. <tr>
  209. <td valign="top">name</TD>
  210. <td valign="top">name of the VAJ project/package not to
  211. export</TD>
  212. <td valign="top" align="middle">yes</TD></TR></TABLE>
  213. <h3>Example</H3>
  214. <pre>&lt;vajexport destdir="${src.dir}" exportResources="no"&gt;
  215. &lt;include name="MyProject/**"/&gt;
  216. &lt;exclude name="MyProject/test/**"/&gt;
  217. &lt;/vajexport&gt;
  218. </PRE>
  219. This example exports all packages in the VAJ project 'MyProject', except
  220. packages starting with 'test'.
  221. <h3>Default Excludes</H3>
  222. The default excludes are:<br>
  223. <pre> IBM*/**
  224. Java class libraries/**
  225. Sun class libraries*/**
  226. JSP Page Compile Generated Code/**
  227. VisualAge*/**
  228. </PRE>
  229. <hr>
  230. <h2><a name="vajimport"></A>VAJImport</H2>
  231. <h3>Description:</H3>
  232. <p>Imports Java source files, class files and/or resources
  233. from the file system into VAJ. These imports can be specified with a fileset.
  234. </P>
  235. <h3>Parameters</H3>
  236. <table border="1" cellpadding="2" cellspacing="0">
  237. <tr>
  238. <td valign="top"><b>Attribute</B></TD>
  239. <td valign="top"><b>Description</B></TD>
  240. <td align="middle" valign="top"><b>Required</B></TD></TR>
  241. <tr>
  242. <td valign="top">vajProject</TD>
  243. <td valign="top">imported files are added to this VAJ
  244. project</TD>
  245. <td valign="top" align="middle">yes</TD></TR>
  246. <tr>
  247. <td valign="top">importSources</TD>
  248. <td valign="top">export source files (default:
  249. "yes")</TD>
  250. <td valign="top" align="middle">no</TD></TR>
  251. <tr valign="top">
  252. <td valign="top">importResources</TD>
  253. <td valign="top">export resource files (default:
  254. "yes")</TD>
  255. <td valign="top" align="middle">no</TD></TR>
  256. <tr valign="top">
  257. <td valign="top">importClasses</TD>
  258. <td valign="top">export class files (default: "no")</TD>
  259. <td valign="top" align="middle">no</TD></TR>
  260. <tr>
  261. <td valign="top">remote</TD>
  262. <td valign="top">
  263. <P>name and port of a remote tool server. (format:
  264. &lt;servername&gt;:&lt;port no&gt;).<BR>If this
  265. attribute is set, the tasks will&nbsp;be executed on the specified tool
  266. server.&nbsp;</P></TD>
  267. <td valign="top" align="middle">no</TD></TR></TABLE>
  268. <h3>Parameters specified as nested elements</H3>
  269. <h4>fileset</H4>
  270. A <A href="index.html#fileset">FileSet</A> specifies the files to import.
  271. <h3>Example</H3>
  272. <pre>&lt;vajimport project="Test" importClasses="true"&gt;
  273. &lt;fileset dir="${import.dir}"&gt;
  274. &lt;include name="com/sample/**/*.class"/&gt;
  275. &lt;exclude name="com/sample/test/**"/&gt;
  276. &lt;/fileset&gt;
  277. &lt;/vajimport&gt;
  278. </PRE>
  279. This example imports all class files in the directory ${import.dir}/com/sample
  280. excluding those in the subdirectory test<br>
  281. <hr>
  282. <h2><a name="sample_buildfile"></A>The
  283. Plugin</H2>
  284. The tasks are usable within VAJ by running the
  285. org.apache.tools.ant.Main class, but this is
  286. quite inconvenient. Therefore a small GUI is
  287. provided which allows selecting a build file
  288. and executing its targets. This Plugin is accessible
  289. from the VAJ Tools menu (see <A href="#usage">Usage</A>).
  290. <hr>
  291. <h2><a name="installation"></A>Installation</H2>
  292. <p>At the moment the installation has it's rough edges. If something
  293. described below doesn't work for You, it's probably not Your fault
  294. but incomplete/wrong instructions. In this case, please contact one
  295. of the <A href="#authors">authors</A>.</P>
  296. <p>We assume <CODE>C:\IBMVJava</CODE> as VAJ
  297. install directory. If You have installed it elsewhere, adapt the pathes below.
  298. <h3>Plugin</H3>
  299. <ul>
  300. <li>install the Visual Age IDE Tools (via File-&gt;Quick
  301. Start-&gt; Add feature-&gt;'IBM IDE Utility class libraries'
  302. <li>import an appropriate XML parser to VAJ (we use Xerces
  303. 1.2.0 and are happy with it). Unfortunately the XML parser delivered with VAJ
  304. (in the project 'IBM XML Parser for Java') doesn't work with Ant. You have to
  305. remove that project (temporarily) from the workspace before importing another
  306. XML implementation.
  307. <li>import the Ant sources <STRONG>and </STRONG> resources into VAJ.
  308. <li>Create the directory <CODE>
  309. C:\IBMVJava\ide\tools\org-apache-tools-ant</CODE>.
  310. <li>export the Ant and XML parser class and resource files
  311. into this directory. Be sure to select class files <STRONG>and</STRONG>
  312. resources. Sources don't have to
  313. be exported. Some optional tasks have errors and can't be exported when You
  314. don't have the necessary packages in Your workspace (e.g. junit task, ejbc
  315. task). If You need this tasks either import these packages into VAJ, too, or
  316. copy the .class files directly from the binary distribution.
  317. <li>copy <CODE>default.ini</CODE> (in <CODE>
  318. jakarta-ant\src\...\taskdefs\optional\ide</CODE>) to <CODE>
  319. C:\IBMVJava\ide\tools\org-apache-tools-ant\default.ini</CODE>.
  320. <li>if you want to access this help from the Workbench, create the
  321. directory <CODE> C:\IBMVJava\ide\tools\org-apache-tools-ant\doc</CODE>
  322. and copy the files <CODE>VAJAntTool.html</CODE>,
  323. <CODE>toolmenu.gif</CODE> and <CODE>
  324. anttool1.gif</CODE> to it.
  325. <li>VAJ has to be restarted to recognize the new tool.
  326. <li>Now if You open the context menu of a project, You should see the entry
  327. 'Ant Build' in the Tools submenu (see <A href="#usage">Usage</A>).
  328. <li>Make sure the tool works as expected. Now You can
  329. remove Ant and the imported XML parser from Your workspace (and optionally add
  330. the IBM parser again). </LI></UL>
  331. <h3>Servlets for Remote Tool Access</H3>
  332. <UL>
  333. <LI>
  334. For
  335. a good introduction into the VAJ Remote Tool Access see the
  336. great introduction from Glenn McAllister at
  337. <A href="http://www7.software.ibm.com/vad.nsf/Data/Document4366">
  338. http://www7.software.ibm.com/vad.nsf/Data/Document4366</A>.&nbsp;It
  339. is highly recommended to read this article before doing the installation (to
  340. understand what you do :-) ).
  341. <LI>insert the following lines into
  342. <code>C:\IBMVJava\ide\tools\com-ibm-ivj-toolserver\servlets\servlet.properties</CODE>.
  343. Typically this file is empty. If not, be careful not to delete the other lines.
  344. <table cellpadding="0" cellspacing="0" border="0" width="500">
  345. <tr valign="top">
  346. <td valign="top">
  347. <PRE>servlet.vajload.code=org.apache.tools.ant.taskdefs.optional.ide.VAJLoadServlet
  348. servlet.vajexport.code=org.apache.tools.ant.taskdefs.optional.ide.VAJExportServlet
  349. servlet.vajimport.code=org.apache.tools.ant.taskdefs.optional.ide.VAJImportServletName<PRE> </PRE></PRE></TD></TR></TABLE>
  350. <LI>export the following classes from the package
  351. <CODE>org.apache.tools.ant</CODE>
  352. to <CODE>C:\IBMVJava\ide\tools\com-ibm-ivj-toolserver\servlets\</CODE>:<BR>
  353. <CODE>BuildException<BR>
  354. DirectoryScanner<BR>
  355. FileScanner<BR>
  356. Location</CODE>
  357. <LI>export the following classes from the package
  358. <CODE>org.apache.tools.ant.taksdefs.optional.ide</CODE>
  359. to <CODE>C:\IBMVJava\ide\tools\com-ibm-ivj-toolserver\servlets\</CODE>:<BR>
  360. <CODE>VAJUtil<BR>
  361. VAJExportServlet<BR>
  362. VAJImportServlet<BR>
  363. VAJLoadServlet<BR>
  364. VAJLocalUtil<BR>
  365. VAJProjectDescription<BR>
  366. VAJToolsServlet<BR>
  367. VAJWorkspaceScanner</CODE>
  368. <LI>configure the Remote Access (via
  369. Window-&gt;Options..., then choose 'Remote Access To Tool API') as shown in
  370. the following picture:</LI></UL>
  371. <P align=center><IMG height=645 alt="" src="remacc.gif"
  372. width=587 border=0 ></P>
  373. <P>Now you should be able to execute VAJ Tasks from the
  374. command line.</P>
  375. <hr>
  376. <h2><a name="usage"></A>Usage</H2>
  377. <H3>Plugin</H3>
  378. <P>
  379. When the tool is installed correctly and your Ant build
  380. file is configured, it is really easy to use.<br>
  381. Go to your Workbench, select the project you want to deploy and
  382. open its context menu. In the submenu <i>Tools</I> you should find
  383. the new entry <i>Ant Build</I>. Klick it to start the tool! </P>
  384. <center><IMG height=246 src="toolmenu.gif" width=393 border=0></CENTER>
  385. After a short time this frame should pop up:
  386. <center><IMG height=241 alt=""
  387. src="file://D:\javaext\jakarta-ant-1.4alpha\docs\manual\Integration\anttool1.gif"
  388. width=389 border=0></CENTER>
  389. This frame contains the following elements:
  390. <ul>
  391. <li>A menubar with some options described later
  392. <li>The name of your selected VAJ project
  393. <li>An entry field for the Ant XML buildfile with a browse
  394. [...] button. The full qualified filename, including the directory is needed
  395. here.
  396. <li>A list with tasks specified in the buildfile. Until your first save of
  397. the build info (described later), this list will be empty. When loading
  398. a build file by the ( <EM>Re)Load&nbsp;</EM> button, this list
  399. is filled with all tasks which have a description attribute. The
  400. task you select in this list will be executed when pressing the
  401. <EM>Execute&nbsp;</EM> button.
  402. <li>A pulldown box for specifying the log level.
  403. <li>Four buttons. Two of them I have already
  404. described. The other are the <EM>Stop</EM> button to cancel a running build
  405. and the third one is just the <EM>Close</EM> button to exit our small tool!
  406. <li>Note that the build is canceled on the next console
  407. output after pressing the <EM>Stop</EM> button, not
  408. directly after pressing it.</LI></UL>
  409. <P>
  410. After you have set up your buildprocess you might find it useful
  411. to save the data you've just entered, so we implemented an option to
  412. save it to the repository into your selected project. Make sure that you
  413. have an open edition of your project before selecting
  414. <i>Save
  415. BuildInfo To Repository</I> from the <i>File</I> menu.
  416. Now your information is saved to this edition of your project and will
  417. be loaded automatically the next time you start <i>Ant Build</I>.<br>
  418. If you have closed the log window accidentally, it can be reopened
  419. with the <i>Log</I> item in the <i>File</I> menu, and if you want to
  420. know who developed this, just select <i>About</I> in the <i>Help</I> menu. </P>
  421. <H3>Servlets for Remote Tool Access</H3>
  422. <P>With the servlets installed and the remote access
  423. running you can use Ant from the command line without any restrictions. Just
  424. make sure the remote attribute in your build file is set correctly.</P>
  425. <hr>
  426. <h2><a name="faq"></A>Frequently Asked
  427. Questions</H2>
  428. <P><STRONG>Q: If I try to load a build
  429. file, I get the error "Can't load default task list". Why?</STRONG><br>
  430. A: Ant not only contains class files, but also resource
  431. files. This messsage appears if the file
  432. <BR>.../org/apache/tools/ant/taskdefs/defaults.properties is
  433. missing. Make sure that you import/export not only java/class files, but also
  434. all resource files when importing/exporting Ant.</P>
  435. <P><STRONG>Q: I want to load, export
  436. and build more then one Visual Age project to one jar! How to?</STRONG><br>
  437. A: The VA tasks are able to load and export several
  438. Projects all at once. You can choose whatever project you like for storing the
  439. tool information, it doesn't really matter </P>
  440. <p><STRONG>Q: When I load my build
  441. file, the list of targets is empty. Why?</STRONG><br>
  442. A: You
  443. need to add the optional "description" parameter to the targets you want to come
  444. up in the list. Then reload the build file in the "ant build" tool. We chose to
  445. display only targets with description to allow the build file developer to
  446. distinguish between targets for end users and helper targets. </P>
  447. <p><STRONG>Q: Is there a sample build
  448. file available? </STRONG><br>
  449. A: Now you can find an <A href="#sample_buildfile">example</A> in this manual </P>
  450. <p><STRONG>Q: Why does it export my
  451. entire workspace when I've already implicitly selected a project when starting
  452. the Tool?</STRONG><br>
  453. A: This selection does not carry into
  454. the buildfile you are using. Set the Project name at the beginning of the
  455. "includes" parameter. </P>
  456. <p><STRONG>Q: When I import Ant into
  457. my Workspace, I get Problems reported. Can I ignore them?</STRONG><br>
  458. A: It depends on the problems reported, and what you want to do with Ant.
  459. Problems you can't ignore:
  460. <ul>
  461. <li>Classes from javax.xml.parser missing - install a compatible parser
  462. (see <A href="#installation">installation</A>)
  463. <li>Classes from com.ibm.ivj.util missing - install the Visual Age IDE
  464. Utility feature (see <A href="#installation">installation</A>).
  465. <li>Errors in optional tasks you use within your build
  466. file</LI></UL>
  467. <br>
  468. <p><STRONG>Q: I want to use the same
  469. buildfile both within Visual Age and from the command line using my regular Ant
  470. environment. What do I need to be aware of?</STRONG><br>
  471. A:
  472. You have to specifie a remote server via the 'remote' attribute. Otherwise the
  473. three Visual Age tasks won't work when executing Ant from the command line. </P>
  474. <p><STRONG>Q: I can export packages
  475. from project 'ABC', but not from project 'XYZ'! Why?</STRONG><br>
  476. A: Common reasons are:</P>
  477. <UL>
  478. <li>The project is excluded by the default excludes (see
  479. attribute 'defaultexcludes' of VAJExport)
  480. <li>When looking at the project in the workspace, it is
  481. often difficult to distinguish between project name and version name (e.g. as
  482. in 'My GUI Components Java 2 3.5'). Check if you have the right project name
  483. by switching off the version name display temporarilly.</LI></UL>
  484. <p><STRONG>Q: How do I control the
  485. import/export of sourcefiles, compiled files and project resources
  486. explicity?</STRONG><br>
  487. A: Via the Boolean values
  488. exportClasses (default false) exportSources (default true) and exportResources
  489. (default true). In some situations, Resources are not exported correctly without
  490. this being explicity set. VAJ doesn't export resources correctly if a package
  491. contains only resources (see below).</P>
  492. <hr>
  493. <h2><a name="known_problems"></A>Known
  494. Problems</H2>
  495. <ul>
  496. <li>Exporting a package containing just resources doesn't
  497. work. This is a VAJ Tool API bug. Workaround: create a dummy class and set
  498. 'exportSources' to false. </LI></UL>
  499. <hr>
  500. <h2><a name="va_versions"></A>VisualAge
  501. for Java Versions</H2>
  502. This tool integration has been tested with versions 3.02 and 3.5
  503. of VisualAge for Java. It should run with the 2.x Versions, too, but
  504. we didn't try. The graphical user interface is built with AWT so it is
  505. JDK independent by now.
  506. <hr>
  507. <h2><a name="history"></A>History</H2>
  508. <table cellpadding="2" cellspacing="2" border="1" width="400">
  509. <tr valign="top">
  510. <td valign="top">1.0</TD>
  511. <td valign="top">2000/09/11</TD>
  512. <td valign="top">Initial Version</TD></TR>
  513. <TR>
  514. <TD vAlign=top>1.1</TD>
  515. <TD vAlign=top>2001/02/14</TD>
  516. <TD vAlign=top>Added Task documentation and more FAQs
  517. (thanks to Richard Bourke for the FAQ additions) </TD></TR>
  518. <tr valign="top">
  519. <td valign="top">1.2</TD>
  520. <td valign="top">2001/07/02</TD>
  521. <td valign="top">
  522. <P>Added documentation of new remote feature.<BR>Minor corrections.</P></TD></TR></TABLE>
  523. <hr>
  524. <center>Copyright &amp;#copy 2001 Apache Software
  525. Foundation. All rights Reserved.</CENTER>
  526. </body>
  527. </html>