Extend the target platform

HALE 2.9+ (current development)

The target definition file (platform/target/hale-platform.target) specifies which bundles are available in the development environment. If for some reason you need additional libraries as dependencies, the preferred way is that you add an update site (p2 repository) that contains the needed libraries.
For local testing you can also add local folders containing OSGi bundles to the target definition.

When you want to contribute to the HALE repository and need additional dependencies (and they are compatible to HALE's license), you can add it to the build of the main HALE target platform on GitHub and file a pull request. Local testing you can do by building the update site locally and adding it to the target definition file instead of the version that is used there by default (make sure you remove the right one - there are a few update sites in the target definition).

We build our update sites with third party dependencies using bnd-platform - this could also be a viable option for you for creating an update site. Anyway, if you plan to extend the main HALE target platform, you should take a look at the documentation there on how to do it.

HALE 2.8 and older

The target definition file specifies which bundles are available in the development environment. If for some reason you need additional libraries as dependencies, you can add them by

  • adding a software update site and including the needed features in the target definition or
  • adding the jar-bundles of the libraries to a sub-folder of the target/ folder (and including that sub-folder in the target definition)

Add libraries to the target/ folder

Because the platform/target (hale/hale-platform/target on maintenance-2.1 branch) is included as a submodule in the repository, pushing the changes to the repository needs some configuration before it will work (the following steps assume you have set up the repository access with SSH):

With your git bash change to the target folder

cd platform/target

Install the hook that will add the Change-Id to you commits

scp -p -P 29418 svn.esdi-humboldt.eu:hooks/commit-msg .git/hooks/

In case .git is not a directory, you might need this command instead:

scp -p -P 29418 svn.esdi-humboldt.eu:hooks/commit-msg ../../.git/modules/platform/target/hooks/

Add the SSH-Repository of the submodule as a remote named gerrit (as the submodule is configured for anonymous HTTP access)

git remote add gerrit ssh://svn.esdi-humboldt.eu:29418/hale-target.git

When set up like this, you can create commits for your changes in the submodule and push them to Gerrit with this command:

git push gerrit HEAD:refs/for/master

After the change has been merged you should update the submodule to the latest commit

git pull --rebase

To update the reference to the submodule in the hale repository, change to the repository root and add, commit and push the changed submodule reference

cd ../..
git add platform/target
git commit
git push