We maintain a project as part of the TextGridLab build that is used for the transformation from the Maven world to the Eclipse/p2 world – textgridlab-dependencies. This project is integrated in the TextGridLab integration build, and we're using a Jenkins build to deploy its result to a p2 update site from which the other TextGridLab components fetch their dependencies.
- Add the maven coordinates of your dependency to the
dependenciessection of textgridlab-dependencies' root POM. Please use a property for the version number.
- Add a feature submodule. We'd suggest you copy an existing feature submodule and adjust its names, don't forget to add a
modulesentry to the root pom.xml. You can also add your dependency to a suitable existing feature.
- You SHOULD either use a -SNAPSHOT (pom.xml) / .qualifier (feature.xml) version or you must explicitly increase your feature's version number every time you upgrade the included libraries.
pluginentry for your library to your feature.xml:
Code Block language xml title feature.xml excerpt linenumbers true
<plugin id="info.textgrid.utils.linkrewriter.core" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
The ID ② is the
Bundle-Symbolic-Nameof the OSGi bundle, it is typically generated by the maven-bundle-plugin using a sensible heuristic. You should use
install-size④ as these will by calculated on build. We also recommend to insert
0.0.0as version ⑤ – this will be replaced by the actual version used on build (and specified by you in the root
- Commit and push your changes and watch the integration build.
Upgrading an existing dependency
- Make sure your library’s version has been increased, see the note on versions above.
- Update your library’s version number in textgridlab-dependencies' root pom.xml
- You might also want to update the feature version.
Using a new or updated dependency in TextGridLab development
- Make sure the build of the textgridlab-dependencies project including your update has run.
- In Eclipse, open your target platform configuration (Window → Preferences → Plug-in development → Target platform, select your platform, Edit). If your TP already includes the dependencies update site, select it, Update and apply the changes. Otherwise, Add a new Software Site, enter the URL of the textgridlab-dependencies project’s update site (find it on the build page).
- If your library feature is new, include it into an existing TextGridLab feature or add it as a dependency and include it in the product.
- In your TextGridLab plugin, add your library’s packages to the
Import-Packagesstatement or to the
Required-Bundlesstatement (both can be found in the bundle manifest editor). You should specify version dependencies. If you intend to use new features after an upgrade of your library, you must use version dependencies to make this explicit.