Custom third-party dependencies (deprecated - not needed anymore) | Read-only mirror of https://github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.thirdparty.bundles — SBB. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-11-30 20:51:53 +00:00
.github chore(deps): update reviewdog/action-actionlint action to v1.69.0 2025-11-25 21:10:52 +00:00
.idea/codeStyles chore: Updated pre-commit hooks to match java-repo-template (#22) 2024-10-28 18:02:18 +01:00
.mvn chore: enhance GitHub workflows and improve Maven build process (#30) 2025-07-07 06:35:00 +00:00
bundles/org.apache.poi fix(deps): update dependency org.apache.poi:poi-ooxml to v5.5.1 2025-11-30 20:51:53 +00:00
LICENSES chore: enhance GitHub workflows and improve Maven build process (#30) 2025-07-07 06:35:00 +00:00
.gitignore chore: enhance GitHub workflows and improve Maven build process (#30) 2025-07-07 06:35:00 +00:00
.pre-commit-config.yaml chore(deps): update pre-commit hook grigoriev/pre-commit-check-git-user to v0.9.3 2025-11-30 14:11:20 +00:00
.yamlfix.toml chore: Updated pre-commit hooks to match java-repo-template (#22) 2024-10-28 18:02:18 +01:00
CHANGELOG.md chore(main): release 1.3.0 (#16) 2024-07-03 14:36:08 +02:00
CODING_STANDARDS.md Initial commit 2024-06-26 09:11:58 +02:00
CONTRIBUTING.md chore: enhance GitHub workflows and improve Maven build process (#30) 2025-07-07 06:35:00 +00:00
pom.xml chore(deps): update dependency org.apache.maven.plugins:maven-source-plugin to v3.4.0 2025-11-29 00:41:40 +00:00
README.md chore: Add "Quick Start" section to readme (#25) 2025-01-13 17:47:55 +01:00
RELEASE.md chore: enhance GitHub workflows and improve Maven build process (#30) 2025-07-07 06:35:00 +00:00
renovate.json Initial commit 2024-06-26 09:11:58 +02:00

Custom third-party dependencies

Use case and potential problems

Sometimes, third-party libraries, required to run custom extensions, are missing in Polarion platform or exist in old versions. In this cases developer can either:

  • package third-party dependencies in own extension bundle;
  • provide third-party dependencies in separate bundle

First approach can have the following problem: because own extension bundle uses Require-Bundle statement to import Polarion dependencies, it causes import all transitive dependencies of required bundles with high priority.

As a result, imported Polarion transitive dependencies will be used instead packaged into own extension bundle. This can cause versions mismatch and runtime errors. In such case second approach is preferred.

Solution

We have faced the such problem when tried to use Apache POI v5.2.4. This version uses Apache Commons IO v2.13.0, but Polarion has v2.11.0. As a result it leads to ClassNotFoundExceptions in some cases when Apache POI functionality is called. This project demonstrates how to solve this problem using the packaging of Apache POI dependency as a separate bundle.

Quick start

The latest version of the extension jars can be downloaded from the releases page and installed to Polarion instance without necessity to be compiled from the sources. The extension jars should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.thirdparty.bundles.<BUNDLE_FOLDER>/eclipse/plugins folder(s). For example jar file org.apache.poi-1.3.0.jar should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.thirdparty.bundles.org.apache.poi/eclipse/plugins folder. Changes will take effect after Polarion restart.

Important

Don't forget to clear <polarion_home>/data/workspace/.config folder after extension installation/update to make it work properly.

Build

All the extension artifacts can be produced using maven:

mvn clean package

Installation to Polarion

To install the extensions to Polarion they should be copied to <polarion_home>/polarion/extensions/ch.sbb.polarion.thirdparty.bundles.<extension_name>/eclipse/plugins It can be done manually or automated using maven build:

mvn clean install -P install-to-local-polarion

For automated installation with maven env variable POLARION_HOME should be defined and point to folder where Polarion is installed.

Changes only take effect after restart of Polarion.

How to use

To use Apache POI as an extension bundle the following changes are required:

  1. pom.xml should have a provided dependency
<dependency>
    <groupId>ch.sbb.polarion.thirdparty.bundles</groupId>
    <artifactId>org.apache.poi</artifactId>
    <version>1.3.0</version>
    <scope>provided</scope>
</dependency>
  1. MANIFEST.MF should contain Require-Bundle entry ch.sbb.polarion.thirdparty.bundles.org.apache.poi