blob: 6ef824d24bd1d0bb3efdd82e5de84c9c3ecede34 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Building a .jar file for the plug-in</title>
</HEAD>
<BODY BGCOLOR="#ffffff">
<h3>Building a .jar file for the plug-in</h3>
<P CLASS="Para">Now we are ready to use the build.xml Ant buildfile that was created
in the last section:</P>
<ol>
<li>Select the build.xml file in one of the navigation views and choose <b>Run
&gt; External Tools </b> from the context menu.</li>
<li>In the dialog, the Targets tab should be visible. Make sure that 'build.jars'
is the only item in the list selected.</li>
<li>Switch to the <b>Refresh</b> tab. The options on this tab control if and
how the workspace looks for new, changed and deleted resources after the buildfile
finishes execution. Because refreshing can be an expensive operation, you
should refresh the smallest subset of the workspace necessary for your buildfile.</li>
<li>Check <b>Refresh resources upon completion</b>, then select <b>The project
containing the selected resource</b>.<br>
<img src="../images/Image606_refresh_tab.png" alt="Refresh tab in Run Ant dialog" border="0" >
</li>
<li>Click <b>Run</b>.</li>
<li>The Ant buildfile runs, executing the build.jars target. Output from the
buildfile is visible in the Console view.</li>
<li>When the buildfile finishes, notice that there is a new .jar file under
your project containing the two class files that comprise your plug-in. If
we had chosen not to refresh the project, the .jar file would still have been
created, but we would not see it in one of the navigation views.</li>
</ol>
<p>We've run the default target for the build.xml Ant buildfile, but there are many
other targets and options to be explored.</p>
</BODY>
</HTML>