![]() ![]() ![]() |
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
In the Build machine, set up NMS 5 inclusive of the Eclipse Project. Say for example the Eclipse project can be placed under <Web NMS Home>/StudioTools/Studio/projects directory.
Proceed to <Web NMS Home>/ StudioTools/Studio directory to edit the file setCommonEnv.bat/sh to set up required classpath. Please note that the plugin jar com.adventnet.nms.EMSDevelopment_1.0.0.jar is required in the classpath for CommandLine Packager.
Create two directories - classes and clientClasses under <Eclipse Project> directory. This is mandatory. Compile the server classes and put them under <Eclipse Project>/classes directory and compile the client side java files and put them under <Eclipse Project>/ clientClasses directory.
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.
![]() ![]() ![]() |