SDN Controller Programming Guide
112
A POM file can be created to automatically produce the application package or zip file. Under
the application app folder (hm-app) create the application packaging pom.xml file using the
template from the HP VAN SDN Controller SDK. The following list shows an example for the
sample application.
Sample Application Packaging POM File:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.hp.hm</groupId>
<artifactId>hm-root</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../hm-root/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>hm-app</artifactId>
<packaging>pom</packaging>
<name>hm-app</name>
<description>Health Monitor - application packaging module</description>
<dependencies>
<!— Add a dependency for each app module except rs and ui -->
<dependency>
<groupId>com.hp.hm</groupId>
<artifactId>hm-model</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>package-app</id>
<phase>package</phase>
<configuration>
<tasks>
<mkdir dir="target/bundles" />
<copy todir="target/bundles/" flatten="true">
<fileset
dir="${user.home}/.m2/repository/com/hp/hm/">