Versions Compared

Key

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

...

Before building the ONOS Sample Apps, you should make sure that you have installed Java, git, and Maven.

Info
titleMaven vs. Buck

Beware: ONOS and ONOS core applications are currently built using buck, but the sample apps are currently built using Maven mvn. This may change in the future! It is likely that we will move to a single build system for both ONOS and all of its applications.

...

This will download all of the required .jar files, including ONOS as well as other required libraries, and compile the Java source into .class files.

It will produce a lot of output, but should eventually succeed, printing something like:

Building the .oar files

To build the .oar filescompile each app all the way from Java into an .oar (ONOS app archive) file which can be installed into ONOS, you can run

Code Block
languagebash
mvn install

 

This will produce similar output to that produced by mvn compile, but will take slightly longer since it is creating the .oar files as well.

For example:

Code Block
languagebash
find . -name '*.oar'
./calendar/target/onos-app-calendar-1.9.0-SNAPSHOT.oar
./carrierethernet/target/onos-app-carrierethernet-1.8.0-SNAPSHOT.oar
./database-perf/target/onos-app-database-perf-1.9.0-SNAPSHOT.oar
./ecord/co/target/onos-app-ecord-co-1.9.0-SNAPSHOT.oar
./flowtest/target/onos-app-flowtest-1.9.0-SNAPSHOT.oar
./icona/app/target/onos-app-icona-1.9.0-SNAPSHOT.oar
./icona/domainmgr/target/onos-app-icona-domain-manager-1.9.0-SNAPSHOT.oar
./icona/domainprovider/target/onos-app-icona-domain-provider-1.9.0-SNAPSHOT.oar
./ifwd/target/onos-app-ifwd-1.9.0-SNAPSHOT.oar
./ipfix/target/onos-app-ipfix-1.9.0-SNAPSHOT.oar
./oneping/target/onos-app-oneping-1.9.0-SNAPSHOT.oar
./sdx-l2/target/onos-app-sdx-l2-1.9.0-SNAPSHOT.oar
./tvue/target/onos-app-tvue-1.9.0-SNAPSHOT.oar
./uiref/target/onos-app-uiref-1.9.0-SNAPSHOT.oar

The .oar files are suitable for installation into the appropriate version of ONOS that you specified in pom.xml.

Application installation and activation is discussed in Managing ONOS applications.