Fork me on GitHub

Plugin Documentation

Goals available for this plugin:

Goal Description
device-package:check-manifest Ensures the project manifest has an empty line at the end, otherwise certain versions of the maven-jar-plugin may think the file is corrupt.
device-package:combine-sdu Combines one or more Single Deployable Unit (SDU) files built by other projects into a single SDU. When invoked on a project with 2 or more SDU files listed as dependencies, will combine them into a consolidated SDU file. This goal will automatically remove older versions if multiple versions of the same artifact are present across the various SDU files. This goal requires all project dependencies to be downloaded, and is advised to be configured in a stand-alone project with only SDU dependencies for the best build performance. The resulting SDU file will be attached to the project using the SDU classifier/extension.
device-package:configure Configures project POM's with this plugin declared as a build plugin.
  • For Device Profile, Network Feature, and XDE Projects, this plugin will be configured under the <build><plugins> section, without
  • For an aggregator POM, this plugin will be configured to to create an aggregated SDU of all device package related artifacts listed as downstream <modules>.
  • This plugin will determine the root-most Parent POM's where the version of the plugin to execute will be centrally managed.

The exact project configuration applied can be tweaked through the various goal parameters.
device-package:create-sdu Packages the project and its dependencies into a Single Deployable Unit (SDU) for consumption by suitable platforms.
device-package:help Display help information on device-package-maven-plugin.
Call mvn device-package:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
device-package:package Default package goal for Device Package projects (Device Profiles, Network Features, and XDE projects), to package the project contents into a JAR file with the project appropriate file extension expected by suitable platforms.

This plugin executes the maven-jar-plugin directly to handle the bulk of the project packaging, with special configuration to handle using the existing Project Manifest if one is found, instead of having the maven-jar-plugin generate its own:

<configuration>
  <archive>
    <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
  </archive>
<configuration>
If you experience a problem with the way the maven-jar-plugin is packaging the project contents, you can override the version is invoked using the mavenJarPluginVersion property. If you have a very special use case, you can explicitly configure the maven-jar-plugin to execute in your POM's <build><plugins> configuration. If this plugin already sees a main project artifact attached, it will skip execution of the maven-jar-plugin altogether.
device-package:validate Validates Device Package project types (Device Profile, Network Feature, or XDE projects) to ensure the project contents will work in suitable platforms.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.2
JDK 1.8
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.cisco.maven.plugins</groupId>
          <artifactId>device-package-maven-plugin</artifactId>
          <version>1.0.0</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>com.cisco.maven.plugins</groupId>
        <artifactId>device-package-maven-plugin</artifactId>
        <version>1.0.0</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"