Skip to main content
Jump to: navigation, search

Difference between revisions of "Building I-Card Manager Application"

('''Build I-Card Manager application''')
('''Asant and Ant''')
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
==='''Asant and Ant'''===
+
==='''Exporting I-Card Manager application as a Web Archive (WAR) file'''===
We use script ''asant'', which is located in the J2EE 1.4 SDK bin directory, to build the source code of this application. ''asant'' is a wrapper around [http://jakarta.apache.org/ant/index.html Ant] which is a Java-based build tool like make, which has been developed under the auspices of the [http://www.apache.org/ Apache Software Foundation]. Ant version 1.5.3 and 1.6 beta 1 may also be used to build and deploy the applications.
+
A Web archive (WAR) file is a packaged Web application that can be exported to test, publish, and deploy the resources developed within a Web project.
----
+
'''Note:''' The I-Card Manager application bundle comes with pre-built binaries. To deploy these binaries and avoid building the application, consult the [[I-Card Manager installation instructions]].
+
----
+
==='''Build I-Card Manager application'''===
+
This section explains how to build the application binaries for the I-Card Manager application. Building all the application binaries and performing other tasks with Ant involves invoking asant from <tt><higgins_broker.home>/apps/icard</tt> directory of the Higgins Broker installation.
+
  
Before building the application, you need to configure the <tt><higgins_broker.home>/build.properties</tt> file to match your enviroment. You need to set the following properties:
+
To export a WAR file from a Web project, do the following:
{| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0" 
+
*Right click on a Web project folder and select Export from the pop-up menu. Then select WAR file in the Export window and then select Next.  
|-style="background:#d6dee9; color:black" 
+
*Specify the Web project you want to export (this field is primed if you used the pop-up menu to open the wizard), and specify a location for the new WAR file
! width="10%" border="1" align="left" valign="top" | Property Name 
+
*Optional: Optionally, supply WAR export Options, such as whether or not to include Java™ source files in the WAR, and whether to overwrite any existing resources during the export process. Source files are not usually included in a WAR file, because they are not necessary for the server to run the web application.  
! width="45%" border="1" align="left" valign="top" | Description 
+
*Click Finish.
! width="45%" border="1" align="left" valign="top" | Examples
+
|-
+
|j2ee.home
+
|The absolute path to the directory where J2EE SDK is installed.
+
|c:\j2sdkee1.4 (on Windows) or /home/mydir/j2sdkee1.4 (on Unix)
+
|}
+
 
----
 
----
'''Note:''' On Windows, while writing the paths in the build.properties files, you need to escape the "\" properly by using "\\" instead. For example, to set j2ee.home to c:\j2sdkee1.4, the entry in the properties file is j2ee.home=c:\\j2sdkee1.4.
+
'''Note:''' The Eclipse Web Tools Platform should be installed. [http://www.eclipse.org/webtools/main.php More about WTP].
 
----
 
----
To build the application binaries on Unix, open a shell prompt and enter these commands:
 
 
{| class="wikitable" style="text-align:left; border="0" cellpadding="0" cellspacing="0"
 
|-
 
|<tt>cd <higgins_broker.home>/apps/icard</tt>
 
|-
 
|<tt>asant [argument]</tt>
 
|}
 
 
 
To build the application binaries on Windows, open a shell prompt and enter these commands:
 
 
{| class="wikitable" style="text-align:left; border="0" cellpadding="0" cellspacing="0"
 
|-
 
|<tt>cd <higgins_broker.home>\apps\icard</tt>
 
|-
 
|<tt>asant [argument]</tt>
 
|}
 
 
 
For the above command to work, your PATH environment variable must have been set as explained in the [[I-Card Manager installation instructions]] and the ANT_HOME environment variable, if any, should not point to any other version of ant that migh be on your system. When asant is invoked without any arguments, all the application binaries are built. The binaries are placed in the following folders:
 
 
<tt><higgins_broker.home>/apps/icard/build/icard.ear</tt>
 
 
The following table lists possible arguments when invoking asant :
 
{| class="wikitable" style="text-align:left; border="1" cellpadding="5" cellspacing="0" 
 
|-style="background:#d6dee9; color:black" 
 
! width="10%" border="1" align="left" valign="top" | Option
 
! width="20%" border="1" align="left" valign="top" | Purpose 
 
|-
 
|core
 
|Builds everything. (This is the default build target.)
 
|-
 
|clean
 
|Cleans out the build output directories.
 
|-
 
|deploy-apps
 
|Deploys the application binaries.
 
|}
 

Latest revision as of 03:53, 28 March 2007

Exporting I-Card Manager application as a Web Archive (WAR) file

A Web archive (WAR) file is a packaged Web application that can be exported to test, publish, and deploy the resources developed within a Web project.

To export a WAR file from a Web project, do the following:

  • Right click on a Web project folder and select Export from the pop-up menu. Then select WAR file in the Export window and then select Next.
  • Specify the Web project you want to export (this field is primed if you used the pop-up menu to open the wizard), and specify a location for the new WAR file
  • Optional: Optionally, supply WAR export Options, such as whether or not to include Java™ source files in the WAR, and whether to overwrite any existing resources during the export process. Source files are not usually included in a WAR file, because they are not necessary for the server to run the web application.
  • Click Finish.

Note: The Eclipse Web Tools Platform should be installed. More about WTP.


Back to the top