4.4.3 Integrating Command Line Packager with Build Script

 

Overview

 

The following section will guide you to package your Eclipse Project in command line mode. The final output is a NAR of the Project. The NAR file can be installed over WebNMS using the Installer Tool of the Deployment Wizard.

 

 

To Start

 

Follow the steps given below to integrate command line Packager with the scripts for Build at Build time

Step 1

 

For CommandLinePackager, you need a Packager.xml file. This file is generated by eclipse when the project is packaged from the GUI using the Package Project. In order to generate the packager.xml , you have to package the project using Package Project wizard atleast once. The Package Project wizard will create packager.xml file and place it in <Eclipse Project>.This xml fle has to be given as a command line parameter for the CommandLinePackager script.

 

Step 2

 

To modify values of the properties of the Project before creating the NAR, edit the Packager.xml file located in <Eclipse Project> directory.

 

For example for the Project "myproject" the existing Entry is as follows

outputDir=C:/projects/NARDestination

 

The above can be changed to

 

outputDir=./newNARDest

 

If the directory "newNARDest" does not exist a new directory will be created in the same name.

In the Packager.xml file the path of other files can also be made relative to the project home to facilitate commandLinePackaging.

 

Step 3

 

To create a NAR run the java.com.adventnet.studio.framework.CommandLinePackager  with arguments -conf and provide the path to the configuration file Packager.xml.

 

java.com.adventnet.studio.framework.CommandLinePackager  -conf ./projects/eBon/Packager.xml

 

In case of using the absolute path for the configuration file, all path entries in the Packager.xml configuration file must be absolute or relative to the working directory of the commandlinePackager.

 

The NAR file for the Project will be available in the output directory specified in the Packager.xml file.

 

 

 



Copyright © 2010, ZOHO Corp. All Rights Reserved.