...
Code Block |
---|
$ mkdir meow $ cd meow |
We also assume that your environment has sourced in the ONOS tools (scripts), as described here.
Application Set Up
The quickest way to get started is to use the maven archetypes to create the application source directory structure and fill it with template code. You can get more details here, but to summarize(More details can be found here). We are going to create a sample application, which we will call, unsurprisingly, "sample":
(0) Create a working directory
Code Block |
---|
$ mkdir customsample $ cd customsample |
(1) Create the main application
Code Block |
---|
$ onos-create-app app org.meowster.app.customsample meowster-customsample |
When asked for the version, accept the suggested default: 1.0-SNAPSHOT, and press enter.
...
Code Block | ||
---|---|---|
| ||
groupId: org.meowster.app.customsample artifactId: meowster-customsample version: 1.0-SNAPSHOT package: org.meowster.app.custom.sample |
This archetype has laid the base application code down, in a directory named meowster-sample. Next we will fold in UI components from an overlay archetype...
(2) Overlay the UI additional components
Note, the only difference between this command and the last is changing the "app" keyword to "ui"...
Code Block |
---|
$ onos-create-app ui org.meowster.app.customsample meowster-customsample |
When asked for the version, accept the suggested default: 1.0-SNAPSHOT, and press enter.
...
Code Block |
---|
<description>Meowster Sample ONOS Custom-View App</description> |
(3b) In the <properties> section (just below the description), change the app name and origin:
Code Block |
---|
<onos.app.name>org.meowster.app.custom<sample</onos.app.name> <onos.app.origin>Meowster, Inc.</onos.app.origin> |
...