This hook allows for the removal of unresolved comments from the document only. The example demonstrates the technique for registering a hook in a custom Polarion extension. In this case, the hook implementation should be registered as an OSGi service and will be discovered by the interceptor-manager. To register a hook as an OSGi service in any Polarion extension, follow these steps:
- Add the dependency org.osgi/org.osgi.framework in your Maven or Gradle build with the provided scope.
- Create a BundleActivator class that implements the org.osgi.framework.BundleActivator interface. This class must register the hook implementation as an OSGi service under the IActionHook interface. See HookBundleActivator.java for details.
- Add the following three entries to MANIFEST.MF:
Bundle-ActivationPolicy: lazy
Import-Package: org.osgi.framework