Versions Compared

Key

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

...

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:

Git/Gerrit Setup

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

Code Block
languagetext
git config --global user.name "firstname lastname"
git config --global user.email "email@domain.com"

To streamline the code review process, it is highly recommended that contributors set up git-review, which integrates code submission with git. Refer to this link for instructions for setting up git-review.

Java and Maven

Build failures may occur if multiple Java versions are installed, and Maven is pointed to the incorrect version.

If not set automatically during the Java 8 installation process, The JAVA_HOME environment variable should be set to the JRE installation location for Java 8. The process for verifying/setting the proper version varies with platform.

On OS X

Code Block
languagetext
$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

To set the version, either run or add the following to the shell profile:

Code Block
languagetext
$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

On Ubuntu

Code Block
languagetext
$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-8-oracle/jre/bin/java          1072      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
* 2            /usr/lib/jvm/java-8-oracle/jre/bin/java          1072      manual mode

Press enter to keep the current choice[*], or type selection number: 

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. 

Running  onos-build-docs from any location generates HTML pages under ONOS_ROOT/docs/, and can be accessed by pointing a browser to ONOS_ROOT/docs/target/site/apidocs/index.html

The generated documentation is also wrapped into a gzipped tar archive and placed under /tmp with the naming convention onos-apidocs-<onos-version>.<user>.tar.gz.

Test Environment Setup

Testing a distributed platform like ONOS can become a cumbersome task. ONOS, being an SDN controller authored in Java, can run on a variety of platforms. However, in the interest of focus, the project engages primarily in testing on Ubuntu server distributions, specifically Ubuntu Server 14.04* LTS 64-bit, using the Oracle Java 8 JRE.

...

Custom cell definition files may be added to ONOS_ROOT/tools/test/cells/, which enables them to be loaded and listed with cell and cells.

Git/Gerrit Setup

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

Code Block
languagetext
git config --global user.name "firstname lastname"
git config --global user.email "email@domain.com"

To streamline the code review process, it is highly recommended that contributors set up git-review, which integrates code submission with git. Refer to this link for instructions for setting up git-review.

Java and Maven

Build failures may occur if multiple Java versions are installed, and Maven is pointed to the incorrect version. If not set automatically during the Java 8 installation process, The JAVA_HOME environment variable should be set to the JRE installation location for Java 8. The process for verifying/setting the proper version varies with platform.

On OS X

Code Block
languagetext
$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

To set the version, either run or add the following to the shell profile:

Code Block
languagetext
$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

 

On Ubuntu

...

languagetext

...

.

...