Building a Plug-In Package from the Project Template
Last Updated December 16, 2024

You build an HTML plug-in from the plug-in project template by using the automation scripts provided with the SDK.
To build a plug-in package from the project template, run the
build-plugin-package.bat
or the
build-plugin-package.sh
script depending on your operating system. You can locate these scripts in the
plugin_name
-ui
folder of the project template.
After you run the script, you see the
plugin_name
folder that contains the
plugin-package.xml
manifest file and the
plugins
folder with the WAR and JAR files generated for the UI and service components.
Plug-In Package Manifest File
The following example shows the contents of the
plugin-package.xml
manifest file that is generated for the template HTML plug-in.
<pluginPackage id="com.mycompany.myplugin" version="1.0.0"
      type="html" name="myplugin"
      description="Add plugin description" vendor="Add vendor"
   <dependencies>
      <pluginPackage id="com.vmware.vsphere.client" version="6.5.0" />
      <pluginPackage id="com.vmware.vsphere.client.html" version="6.5.0" />
   </dependencies>
   <bundlesOrder>
      <!-- Include a 3rd-party library (for example gson) -->
      <bundle id="com.google.gson" />
      <!-- Include my plug-in modules -->
      <!-- These are example IDs; prefix should match the package ID -->
      <bundle id="com.mycompany.myplugin.myplugin-service" />
      <bundle id="com.mycompany.myplugin.myplugin-ui" />
   </bundlesOrder>
</pluginPackage>
Follow these recommendations for the
plugin-package.xml
file to ensure that your plug-in can be deployed on the
vSphere Client
:
  • Specify a unique plug-in package ID for the
    id
    attribute of the
    pluginPackage
    XML element.
  • Add the
    type="html"
    attribute to the
    pluginPackage
    elements. This attribute is required if you want your plug-in to be deployed on the
    vSphere Client
    .
  • Specify that your plug-in depends on the
    com.vmware.vsphere.client
    package and the
    com.vmware.vsphere.client.html
    package, version
    6.5.0
    . This dependency ensures that your plug-in can be deployed on the
    vSphere Client
    6.5.
  • To specify an Update release as the minimum version supported by your plug-in, you need to use a special numbering system. For example, to specify that your plug-in supports only 6.5 Update 2 or above, use the version
    6.5.0.20000
    for the dependency.