blob: 6a36ba4472057d0a1728f0dbf37eb430aaf4db38 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wtp.doc.user/common.css" />
<title>Extended Ant Support - overview</title>
</head>
<body id="tanthome"><a name="tanthome"><!-- --></a>
<h1 class="topictitle1">Extended Ant Support - overview</h1>
<div><p>You can use the Run ANT option to check your build environment
or use the command line batch file provided for repetitive builds.</p>
<div class="section"><p>In the root of the com.ibm.etools.j2ee.ant plugin is a sample
batch file called runANT.bat. This batch file runs a "headless" workspace,
and it runs a specified ANT script file (example.xml). The ANT script file
must be a fully qualified name.</p>
<p>Edit the runANT.bat file and change
the variables to the correct location for your WebSphere<sup>®</sup> Studio installation. This
file needs to be updated to run this plugin from the command line.</p>
<p>If
you do not specify a build file, runANT will prompt you when you execute the
file. You can then select ANT, list all projects, and quit. When you specify
the build file, it is relative to the project so you must enter project name\buildfile
name. Note that this is case sensitive.</p>
<p>After you list the projects
available, select the ANT option and type in your build filename. You then
need to quit manually when the script is finished or specify another project.
The projects must all be relative to the same workspace.</p>
<p>Also included
is an example.xml file which shows how to use some of the tasks provided through
ANT. Please refer to <samp class="codeph">example.xml</samp> and <samp class="codeph">runANT.bat</samp> for
more information. Note that the tasks themselves are case sensitive but the
parameters available on each task are not.</p>
<p><span class="uicontrol">Hints and Tips</span></p>
<ul><li>When creating an ANT Script, logical order is important. For example,
if you are exporting an Enterprise Application that contains enterprise beans,
you should generate deployment code for your EJB before exporting. Your XML
should look like this: <pre>&lt;!-- Run ejbDeploy on the EJB project in an EAR file --&gt;
&lt;ejbDeploy EJBProject="MinibankEJB" IgnoreErrors="true"/&gt;
&lt;!-- Export the Application project as an EAR file --&gt;
&lt;earExport EARProjectName="MinibankExample" EARExportFile="f:\temp\sample.ear"
ExportSource="true"/&gt;</pre>
</li>
<li>If you are using the <samp class="codeph">runAnt.bat</samp> file to do multiple builds,
make sure that change the name of the output in your XML file. If your current
build is incomplete or fails in any way, you still have the previous build
to work from.</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/tjant.html">Working with Ant</a></div>
</div>
</div></body>
</html>