nbm:nbm

Full name:

org.codehaus.mojo:nbm-maven-plugin:3.14:nbm

Description:

Create the NetBeans module artifact (nbm file), part of "nbm" lifecycle/packaging.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
cluster String - NetBeans module's cluster. Replaces the cluster element in module descriptor.
Default value is: extra.

Optional Parameters

Name Type Since Description
author String 3.8 Author of the module. Shown in the Module manager UI.
Default value is: ${project.organization.name}.
codeNameBase String 3.8 codename base of the module, uniquely identifying the module within the NetBeans runtime. usually the package name equivalent. Can include the major release version. See NetBeans Module system docs
Default value is: ${project.groupId}.${project.artifactId}.
descriptor File - Deprecated. all content from the module descriptor can be defined as plugin configuration now, will be removed in 4.0 entirely
Default value is: ${basedir}/src/main/nbm/module.xml.
distributionUrl String - Distribution base URL for the NBM at runtime deployment time. Note: Usefulness of the parameter is questionable, it doesn't allow for mirrors and usually when downloading the nbm, one already knows the location anyway. Please note that the netbeans.org Ant scripts put a dummy url here. The actual correct value used when constructing update site is explicitly set there. The general assumption there is that all modules from one update center come from one base URL. Also see distBase parameter in auto-update mojo. The value is either a direct http protocol based URL that points to the location under which nbm file will be located, or it allows to create an update site based on maven repository content. The later created autoupdate site document can use this information and compose the application from one or multiple maven repositories.
Format: id::layout::url same as in maven-deploy-plugin
with the 'default' and 'legacy' layouts. (maven2 vs maven1 layout)
If the value doesn't contain :: characters, it's assumed to be the flat structure and the value is just the URL.
User property is: maven.nbm.distributionURL.
encoding String 3.2 The character encoding scheme to be applied when filtering nbm resources.
Default value is: ${project.build.sourceEncoding}.
User property is: encoding.
externals List 3.8 list of groupId:artifactId pairs describing libraries that go into the nbm file and will only include the .external reference in the nbm instead of the actual binary. See NetBeans issue #195041 for details. Please note that the scheme will only work for artifacts present in central repository but no effort is made at build time to enforce that. Additionally at runtime when installing the module, the user has to be online and be capable of reaching central using maven. You have been warned.
finalName String - Name of the jar packaged by the jar:jar plugin
User property is: project.build.finalName.
homePageUrl String 3.8 Get homepage URL of the module. Is accessible from NetBeans UI upon installation, should point to place with additional information about the functionality.
Default value is: ${project.url}.
keystore String - keystore location for signing the nbm file
User property is: keystore.
keystorealias String - keystore alias
User property is: keystorealias.
keystorepassword String - keystore password
User property is: keystorepass.
licenseFile File 3.8 path to the license agreement file that will be shown when installing the module. When defined, licenseName needs to be defined as well.
licenseName String 3.8 name of the license applicable to the NBM. The value should be equal across modules with the same license. If the user already agreed to the same license before, he/she won't be asked again to agree and for multiple one installed at the same time, just one license agreement is shown. When defined, licenseFile needs to be defined as well.
moduleType String 3.8 Deployment type of the module, allowed values are normal,eager,autoload, disabled.

autoload - Such a module is automatically enabled when some other module requires it and automatically disabled otherwise.

eager - This module type gets automatically enabled when all it's dependencies are satisfied. Disabled otherwise.

normal - This is the default value. This kind of module is enabled/disabled manually by the user. It installs enabled.

disabled - This kind of module is enabled/disabled manually by the user. It installs disabled. Since 3.11

For details, see Netbeans Module system docs Since 3.14, for autoload and eager modules, we automatically set AutoUpdate-Show-In-Client manifest entry to false, if not defined already otherwise in the manifest. See issue MNBMODULE-194
Default value is: normal.
nbmBuildDir File - NetBeans module assembly build directory. directory where the the NetBeans jar and nbm file get constructed.
Default value is: ${project.build.directory}/nbm.
User property is: maven.nbm.buildDir.
nbmJavahelpSource File 2.7 Deprecated. Obsolete as of NetBeans 7.0 with @HelpSetRegistration.
Default value is: ${basedir}/src/main/javahelp.
nbmResources Resource[] 3.2 A list of additional resources to include in the NBM file. (Not in the module JAR; see InstalledFileLocator for retrieval.) Supersedes similarly-named configuration in the module descriptor file.

For example, to include native libraries:

<nbmResource>
  <directory>src/main/libs</directory>
  <targetPath>modules/lib</targetPath>
  <includes>
    <include>*.dll</include>
    <include>*.so</include>
  </includes>
</nbmResource>

requiresRestart boolean 3.8 if true, upon installing the NBM the platform app/IDE restart is requested. Not necessary in most cases.
Default value is: false.
skipNbm boolean 3.0 Boolean parameter denoting if creation of NBM file shall be skipped or not. If skipped, just the expanded directory for cluster is created
Default value is: false.
User property is: maven.nbm.skip.

Parameter Details

author:

Author of the module. Shown in the Module manager UI.
  • Type: java.lang.String
  • Since: 3.8
  • Required: No
  • Default: ${project.organization.name}

cluster:

NetBeans module's cluster. Replaces the cluster element in module descriptor.
  • Type: java.lang.String
  • Required: Yes
  • Default: extra

codeNameBase:

codename base of the module, uniquely identifying the module within the NetBeans runtime. usually the package name equivalent. Can include the major release version. See NetBeans Module system docs
  • Type: java.lang.String
  • Since: 3.8
  • Required: No
  • Default: ${project.groupId}.${project.artifactId}

descriptor:

Deprecated. all content from the module descriptor can be defined as plugin configuration now, will be removed in 4.0 entirely
a NetBeans module descriptor containing dependency information and more..
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/src/main/nbm/module.xml

distributionUrl:

Distribution base URL for the NBM at runtime deployment time. Note: Usefulness of the parameter is questionable, it doesn't allow for mirrors and usually when downloading the nbm, one already knows the location anyway. Please note that the netbeans.org Ant scripts put a dummy url here. The actual correct value used when constructing update site is explicitly set there. The general assumption there is that all modules from one update center come from one base URL. Also see distBase parameter in auto-update mojo. The value is either a direct http protocol based URL that points to the location under which nbm file will be located, or it allows to create an update site based on maven repository content. The later created autoupdate site document can use this information and compose the application from one or multiple maven repositories.
Format: id::layout::url same as in maven-deploy-plugin
with the 'default' and 'legacy' layouts. (maven2 vs maven1 layout)
If the value doesn't contain :: characters, it's assumed to be the flat structure and the value is just the URL.
  • Type: java.lang.String
  • Required: No
  • User Property: maven.nbm.distributionURL

encoding:

The character encoding scheme to be applied when filtering nbm resources.
  • Type: java.lang.String
  • Since: 3.2
  • Required: No
  • User Property: encoding
  • Default: ${project.build.sourceEncoding}

externals:

list of groupId:artifactId pairs describing libraries that go into the nbm file and will only include the .external reference in the nbm instead of the actual binary. See NetBeans issue #195041 for details. Please note that the scheme will only work for artifacts present in central repository but no effort is made at build time to enforce that. Additionally at runtime when installing the module, the user has to be online and be capable of reaching central using maven. You have been warned.
  • Type: java.util.List
  • Since: 3.8
  • Required: No

finalName:

Name of the jar packaged by the jar:jar plugin
  • Type: java.lang.String
  • Required: No
  • User Property: project.build.finalName

homePageUrl:

Get homepage URL of the module. Is accessible from NetBeans UI upon installation, should point to place with additional information about the functionality.
  • Type: java.lang.String
  • Since: 3.8
  • Required: No
  • Default: ${project.url}

keystore:

keystore location for signing the nbm file
  • Type: java.lang.String
  • Required: No
  • User Property: keystore

keystorealias:

keystore alias
  • Type: java.lang.String
  • Required: No
  • User Property: keystorealias

keystorepassword:

keystore password
  • Type: java.lang.String
  • Required: No
  • User Property: keystorepass

licenseFile:

path to the license agreement file that will be shown when installing the module. When defined, licenseName needs to be defined as well.
  • Type: java.io.File
  • Since: 3.8
  • Required: No

licenseName:

name of the license applicable to the NBM. The value should be equal across modules with the same license. If the user already agreed to the same license before, he/she won't be asked again to agree and for multiple one installed at the same time, just one license agreement is shown. When defined, licenseFile needs to be defined as well.
  • Type: java.lang.String
  • Since: 3.8
  • Required: No

moduleType:

Deployment type of the module, allowed values are normal,eager,autoload, disabled.

autoload - Such a module is automatically enabled when some other module requires it and automatically disabled otherwise.

eager - This module type gets automatically enabled when all it's dependencies are satisfied. Disabled otherwise.

normal - This is the default value. This kind of module is enabled/disabled manually by the user. It installs enabled.

disabled - This kind of module is enabled/disabled manually by the user. It installs disabled. Since 3.11

For details, see Netbeans Module system docs Since 3.14, for autoload and eager modules, we automatically set AutoUpdate-Show-In-Client manifest entry to false, if not defined already otherwise in the manifest. See issue MNBMODULE-194
  • Type: java.lang.String
  • Since: 3.8
  • Required: No
  • Default: normal

nbmBuildDir:

NetBeans module assembly build directory. directory where the the NetBeans jar and nbm file get constructed.
  • Type: java.io.File
  • Required: No
  • User Property: maven.nbm.buildDir
  • Default: ${project.build.directory}/nbm

nbmJavahelpSource:

Deprecated. Obsolete as of NetBeans 7.0 with @HelpSetRegistration.
The location of JavaHelp sources for the project. The documentation itself is expected to be in the directory structure based on codenamebase of the module. eg. if your codenamebase is "org.netbeans.modules.apisupport", then the actual docs files shall go to ${basedir}/src/main/javahelp/org/netbeans/modules/apisupport/docs.
  • Type: java.io.File
  • Since: 2.7
  • Required: No
  • Default: ${basedir}/src/main/javahelp

nbmResources:

A list of additional resources to include in the NBM file. (Not in the module JAR; see InstalledFileLocator for retrieval.) Supersedes similarly-named configuration in the module descriptor file.

For example, to include native libraries:

<nbmResource>
  <directory>src/main/libs</directory>
  <targetPath>modules/lib</targetPath>
  <includes>
    <include>*.dll</include>
    <include>*.so</include>
  </includes>
</nbmResource>
  • Type: org.apache.maven.model.Resource[]
  • Since: 3.2
  • Required: No

requiresRestart:

if true, upon installing the NBM the platform app/IDE restart is requested. Not necessary in most cases.
  • Type: boolean
  • Since: 3.8
  • Required: No
  • Default: false

skipNbm:

Boolean parameter denoting if creation of NBM file shall be skipped or not. If skipped, just the expanded directory for cluster is created
  • Type: boolean
  • Since: 3.0
  • Required: No
  • User Property: maven.nbm.skip
  • Default: false