Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
title"Plugin execution not covered ..." errors in Eclipse

If you're using Eclipse and see "Plugin execution not covered ..." errors about jacoco-maven-plugin and onos-maven-plugin after importing ONOS projects, follow these steps to eliminate those errors.

  1. Select one of "Plugin execution not covered..." error and select "Quick Fix"

    Expand

  2. Select "Mark the goal as ignored in Eclipse build in Eclipse preference" as the fix and "Finish" to apply the fix.

    Expand

  3. Select one of the ONOS related project to open the "Update Project" dialog, then "Select All" projects and update all the projects.

    Expand

    It may take a while for Eclipse to rebuild all the project after refreshing project configuration.

  4. By following the steps above, maven goal resolution errors for the same goal should disappear. (jacoco-maven-plugin). Repeat the same step for remaining goal error. (onos-maven-plugin)

    Expand

 

Code Formatting

The formatting followed by the project are:

...

The full guidelines are found in the Code Style Guidelines.

Prior to contributing code to ONOS, all developers should set-up their IDE to appropriately tag the code with the Apache 2 license header text. The bare text is checked in under tools/dev/header.txt, and the original can be found at: 

http://www.apache.org/licenses/LICENSE-2.0.html 

Example: Copyright setup on IntelliJ

First make sure that you have the Copyright plugin enabled. Then, under Preferences, select Copyright section and create a new Copyright profile, call it something like Apache 2, and prime it with the text above, without any decorations. Then configure your copyright formatting options as shown:

Example: Copyright setup on Eclipse

Configure the Comments for Files similar to the following. 
Remember to put a check on "Automatically add comments for new methods and types" to apply these templates on new files.  

...

You can double-check the URL on Gerrit by logging in, going to Projects -> List, then clicking on 'onos', On the grey bar, click 'SSH', then just underneath the grey bar will appear 'git clone ssh://...'. This is the URL you should set your remote to in your local git repository.

Configuring Gerrit

Ensure <username> is configured in Settings->Profile->Username; the Username is not populated for new accounts by default.

...

As shown above, email notifications are also configured from here by checking off the types of notifications to receive. 

Uploading SSH Public Keys

An SSH key should also be uploaded to the ONOS Gerrit server.

...

Info
A key must be uploaded per host if checking code out to multiple hosts with git.

Configuring git

Developers planning to contribute code should configure git with their username and email.

...

Tip
titlegit-review + Mac

If you're using a Mac, you may need to manually upgrade the git-review package dependency. (git-review bug#1337701)

$ sudo pip install --upgrade setuptools
$ sudo pip install --upgrade git-review

Building API Docs

To build a local set of the ONOS Java API documentation bundle, use the onos-build-docs utility, which uses Maven to generate both internal and external documentation. 

...