Search code examples
maven-3maven-plugintycho

third party bundles dependencies in Maven/Tycho build


how to handle third party bundles dependencies in Maven/Tycho build ?


Solution

  • Create a P2 repository and then reference that repository. This is the recommended method.

    If you want to keep the build location-independent store the repository in a location that allows HTTP protocol access. e.g.

    • A web server with file-write access
    • A webdav store
    • An SVN version control system.

    To create the P2 repository

    1. create an eclipse target,
    2. install the required bundles into it, then
    3. create a feature, add the plugins
    4. export the P2 repository.
    5. Store the repository in a well-known location
    6. Reference the location from the Tycho build via one of these three choices
      1. eclipse target files in repository definition
      2. URLs in repository definition
      3. eclipse targets in package definition tycho modules.

    Alternatively, as a source

    • if the 3PDs are available in Eclipse Orbit, you can reference the Orbit P2 site directly
    • if the 3PDs are available in Maven Central, you can use Tycho POM first build. Please watch out for the limitation that this build can not produce other deliverables in the same reactor run, as described in the howto.