Basic Properties

Property Optional Description
maven.nbm.manifest

Optional.

File containing Netbeans-specific manifest entries. The plugin automatically generates some of the entries:

OpenIDE-Module-Implementation-Version: ${pom.currentVersion}
OpenIDE-Module: ${maven.nbm.modulename}
OpenIDE-Module-Specification-Version: normalized version of ${pom.currentVersion}
            
            

etc.etc.

If you define any of the entries in your manifest file, it overrides anything that gets automatically generated.

maven.nbm.modulename

Since 0.6

Optional. Default value is ${pom.package}.

Module name.

Used when generating the manifest entries and module jar file names.

maven.nbm.autoload

Optional. Default value is false.

Determines if the module is an autoload module or not.

A module cannot be both eager and autoload.

maven.nbm.eager

Optional. Default value is false.

Determines if the module is an eager module or not.

A module cannot be both eager and autoload.

maven.nbm.requiresrestart

Optional. Default value is false.

In version 0.1 the default was true, incompatible change.

If true, the application restarts after installation of the module. Required generally only when the nbm includes files in netbeans/lib subfolder. (AFAIK)

maven.nbm.license

Optional. Default value is ${maven.license.licenseFile}.

Location of the license file to be included with the nbm.

maven.nbm.license.name

Since 0.3

Optional. Default value is License for ${pom.name}.

Name of the license file to be included with the nbm. Eg. Apache License, Version 2.0

maven.nbm.cluster.name

Since 0.3

Optional. Default value is ${pom.groupId}.

The name of the cluster that the module belongs to.

maven.nbm.build.dir

Since 0.6

Optional. Default value is ${maven.build.dir}/nbm.

The output directory of the nbm plugin. The modified project's artifact is placed here. Later also the nbm file for the project.

The plugin will create a netbeans/${maven.nbm.cluster.name} subdirectory in here where all the files are placed that are later put into the nbm. Regular Netbeans directory/file layout applies.

You might want to make use of this property when you want to merge multiple projects belonging to one cluster and create an installation for it.

maven.nbm.distributionURL

Since 0.6

Optional. Default value is ${pom.url}/${maven.final.name}.nbm.

The URL of the nbm once deployed on the server. Is used when creating the xml description of the autoupdate server.

Dependency Properties

Property Optional Description
netbeans.module.ext

OPTIONAL. Allowed value true

A property of dependency in the POM, if set to true, the plugin includes the dependency jar in the ext subdirectory. Such a dependency will become part of the Netbeans module. Please note that if 2+ interdependant modules reference the same library, only one of them is allowed to add it to the Class-Path. Usually it's the module that the others depend on. So the property should be set only in one of the projects.

For example:

       <dependency>
           <groupId>forehead</groupId>
           <artifactId>forehead</artifactId>
           <version>1.0-beta-5</version>
           <url>http://forehead.werken.com/</url>
           <properties>
            	<netbeans.module.ext>true</netbeans.module.ext>
            </properties>
        </dependency>
                        

In case you didn't define the Class-Path manifest attribute, it will be added for you automatically.

netbeans.module.dep

OPTIONAL. Allowed types are loose, spec, impl

If the property is set on the dependency, it is expected to be a Netbeans module dependency. When the project is built using the nbm:jar goal, it will build a OpenIDE-Module-Module-Dependencies manifest attribute. Again it will only be included in the jar, unless you define your own custom manifest attribute in the manifest file. These dependencies are expected to be present in the IDE when deploying. All of them should be Netbeans modules, not necessarily at build time, but definitely at runtime (installation).

For example:

       <dependency>
           <groupId>forehead</groupId>
           <artifactId>forehead</artifactId>
           <version>1.0-beta-5</version>
           <properties>
            	<netbeans.module.dep>impl</netbeans.module.dep>
            </properties>
        </dependency>
        
        <dependency>     
           <groupId>netbeans</groupId>
           <artifactId>org-netbeans-modules-projectuiapi</artifactId>
           <version>1.0-SNAPSHOT</version>
           <type>jar</type>
           <properties>
                <netbeans.module.dep>spec=org.netbeans.modules.projectuiapi/0 &gt; 1.0</netbeans.module.dep>
           </properties>
        </dependency>
        
                        

There are 3 types of allowed values:

loose creates a dependency in the format org.openide.execution It's very loosely coupled and it just expects some version of the dependency module to be present and enabled.

spec creates a dependency based on the specification number. In the module's manifest it looks like this: org.openide.execution > 1.0.1 The module will work with any subsequent version of the dependency module (unless that one breaks backward compatibility). The version number to can be explicitly specified as is shown in the example above or the plugin will try to guess it. The dependency jar is examined and if it is a netbeans module, its specification number and module name are used. The dependency version from the pom is used as fallback.

impl creates a dependency based on the implementation number. It looks like this: org.openide.execution = 1.0.1 It will require a specific version of the dependency module. Use only when you depend on a non-public feature or code that was changed in later versions or could be changed. The version number to can be explicitly specified or the plugin will try to guess it. The dependency jar is examined and if it is a netbeans module, its implementation version and module name are used. The dependency version from the pom is used as fallback.

NBM signing properties

These properties are related to the signing of the NBM. You should sign NBMs you release. Otherwise the user will be forced to accept a non-signed NBM.

See help for jarsigner and keystore executables located in the jdk's bin directory. These are used to generate the keys and signing the jars.

Property Optional Description
maven.nbm.sign.keystore

Optional. Since 0.2. Default value is ?.

Shall contain path the keystore file.

maven.nbm.sign.storepass

Optional. Since 0.2. Default value is ?.

Contains the password for the signing of the nbm, you probably want to include it in your $HOME/build.properties file.

maven.nbm.sign.alias

Optional. Since 0.2. Default value is ?.

Alias in the keystore for signing the nbm.

Autoupdate Properties

These properties are relevant only if you want to generate NBM autoupdate server content. (goals nbm:collect-nbms and nbm:autoupdate)

Property Optional Description
maven.nbm.autoupdate.name

Since 0.2

Optional, required for nbm:autoupdate goal. Default value is "NBM_AutoUpdate"

Name for the xml file describing the autoupdate server content information.

maven.nbm.build.release.dir

Since 0.2

Optional. Default value is ${maven.build.dir}/nbm_release

Output location of the autoupdate server content.

Temporary Properties

Property Optional Description
maven.nbm.autoupdate.distbase