Opendaylight Development with Eclipse and Toolkit

May 2, 2014 by opendaylight No Comments

This tutorial requires Opendaylight Toolkit – please ensure you have Toolkit set up and your controller running.Before proceeding, please ensure you have Eclipse 3.9. Though these steps work in Eclipse 3.8, there seem to be occasional errors with directory paths. Additionally, you will need the m2e plugin to let Eclipse read Maven projects.

Importing projects into Eclipse

In Eclipse, do File->Import ->Maven->Existing Maven Projects. Point it to the top-level of your toolkit folder, e.g., /home/ubuntu/toolkit.

Uncheck the top-level pom.xml, but choose everything else underneath. Say finish, and wait for a few minutes for Eclipse to finish importing and indexing everything.

Screenshot - 05042014 - 11:57:24 AM

If you’ve already built the controller, the dependencies will have been already pulled to ~/.m2/repository, so your projects should not show any errors.

Build the top-level controller

To build the top-level controller, open the main project (double-click), choose the pull-down from the run button, and click on opendaylight-assembleit-skiput. The “ut” stands for skip updates and tests.

skiput

If the run button is not enabled/present, you may need to open some Java file.

Build a submodule

Building the top-level controller does not build apps that you created yourself. To do this, choose your app folder, and choose the opendaylight-assembleit-fast target from the Run or Debug menus

fast

Running the Controller

Once the main controller and any apps are built, we can run it within Eclipse the opendaylight-controller target:

controller

 

Leave a Reply