Module Project Properties Dailog Box: API Versioning

## Module Project Properties Dialog Box: API Versioning

See Also

You open the Module Project Properties dialog box by right-clicking a module project and choosing Properties.

The API Versioning page contains the following:

- Code Name Base: Displays the name that uniquely identifies the module. Sets `OpenIDE-Module` in the `MANIFEST.MF` file. This line in the `MANIFEST.MF` file identifies the JAR file as a module, and provides its code name. If you expose APIs, the code name is what other modules will use to refer to your module when they declare a dependency on it. The standard convention is for the name to match the package structure of the module.
- Major Release Version. Specifies the major release version in `MANIFEST.MF`; may be blank or a non-negative integer. For example, if your module is called `org.myorg.module`, the major release version will be displayed as a forward slash with a number in the `MANIFEST.MF` file: `org.myorg.module/1`. This is typically useful if your module exposes some APIs; modules can declare a dependency on a specific specification version of the module, so that the depending module will not be loaded if it requires version 2, but the version of your module that's installed is version 1. For modules with no API to expose, or which are trivial and unlikely ever to change, the major release version is not required.
- Specification Version. Sets `OpenIDE-Module-Specification-Version` in the `MANIFEST.MF` file. Typically when you add methods that are publicly available (part of the API of your module), you will increment this number by 0.1, so versions increment 1.0, 1.1, 1.2 and so forth. Thus other modules that need to use a method or class introducced in 1.1 can declare a dependency on 1.1, so they will not be loaded if that version is not present.
- Append Implementation Versions Automatically.
- Implementation Version. Sets `OpenIDE-Module-Implementation-Version` in the `MANIFEST.MF` file. Modules declare, in their `MANIFEST.MF` file, what packages they make available to other modules, in the `public-packages` section of the `nbproject/project.xml` file. If your module tries to use a class from another module which is public, but that class is not actually in one of the packages the other module declares as its "public packages", it will throw a `NoClassDefFoundException` at runtime.
- Module Type.
  - Regular. A module that is loaded when the platform starts up.
  - Autoload. A module that is loaded only when another module needs it. For example, a library wrapper module is only loaded when a module that depends on it needs it.
  - Eager. A module that is loaded if all its dependencies are satisfied. For example, the module that provides coloring for NetBeans files depends on the module that provides the editor. Therefore, when you disable the editor module, the IDE automatically disables the coloring module.
- Public Packages. Displays a list of all packages contained in the source directory plus any `class-path-extensions`. If checked, the package is included among `public-packages` section of the `nbproject/project.xml` file.
- Export Packages Only to Friends. Is checked if and only if there is at least one entry in the list below it. The list may include code name bases of other modules and is sorted. If not empty, packages are kept in `friend-packages` instead and the friends are listed in `nbproject/project.xml..`
- Provided Tokens. Sets `OpenIDE-Module-Provides` in the `MANIFEST.MF` file.

See Also
  About NetBeans Platform and Module Development
  About the NetBeans Platform

Legal Notices