Reference Guide

Table Of Contents
Updating Project Dependencies
The command described in Creating Eclipse Projects on page 145 creates the Eclipse projects
resolving all dependencies defined in the POM files. Once the projects have been created and
imported into Eclipse, the same command may be used to maintain dependencies.
Execute the command when a dependency is added to the POM file or removed, and then just
refresh the projects within Eclipse.
Building the Application
In order to build the application, execute the following command from the application root
directory (~/dev/sdn-apps/health-monitor/hm-root for the sample application in Linux):
$ mvn clean install
Refer to Troubleshooting on page 251 in case of troubles building the application. When the
Maven’s build process is completed the application zip file (hm-*.zip) can be found under the
target directory of the application’s app module - /health-monitor/hm-app/target. Use the SDN
Controller GUI as described in Installing the Application on page 147 to directly upload the
application zip file.In order to property compile source projects they must have at least one Java
class.
NOTE
If using the Sample Application Generator to create an application the application modules already
contain source files so skip the rest of the section, see
Application Generator (Automatic Workspace
Creation) on page 144.
If the application workspace was created manually, the application modules are probably empty;
thus a class that acts as a seed has to be created on each application module. The class can be
as simple as the one shown in the following listing. However, even though the seed classes are
temporal and is later replaced by real code, it is convenient using the correct java packages;
Table 7 lists suggestions.
Application Module Seed Java Class:
package com.hp.hm.api;
/**
* Place holder to allow the module to be properly compiled and packaged.
* TODO: Remove this class when real code is added to the module.
*/
public class Seed {
}
Table 7 Suggested Java Packages
Module
Recommended Package
Example
146