javamavenosgiapache-karafopendaylight

Opendaylight: Deploy changes to Netconf source code in Integration/Distribution Code


TL;DR -> How to integrate a local Opendaylight Karaf App in the Opendaylight integration/distribution project, for local use? I am not looking to publish my code to upstream to official opendaylight repositories.

I am trying to understand how to make changes to source code of certain features in Opendaylight to fulfill my custom use-cases.

For this, I downloaded the Netconf Source code from "https://git.opendaylight.org/gerrit/netconf" and the distribution source code from "https://git.opendaylight.org/gerrit/integration/distribution". I made certain modifications in the Netconf Code and built it using mvn clean install -Pq -Dcheckstyle.skip.

Now, how do I go about integrating these updates in the integration/distribution project?

FYI:

  1. I am working on ODL "release/oxygen-sr2". However, I realise that newer versions are available and I am open to shifting to them.
  2. Using Java 8 and Maven 3.6.0
  3. I had been suggested that I could just maven build the Netconf Project code and run Apache Karaf from there. Any other feature could then be installed via the Karaf CLI. But, my use case would require modifications on multiple existing features and even creating a new feature. Therefore, this solution also doesn't work for me as I would still need to integrate everything in one central project.

Solution

  • Actually, it's pretty simple, but maybe not obvious. Build all the projects you want locally, then build the integration/distribution project. Any artifacts it finds in the local m2 repo will be used for the final int/dist karaf that will get created.

    in other words, for every project you want to customize, pull that repo, make your changes, build it. Then as a last step, build the int/dist project.