Table of Contents |
---|
Introduction
In this tutorial we will show you how to generate an ONOS component bundle template. This makes it easy for you to add either an ONOS service or application. We will be using maven archetypes to generate our template, therefore this link could be handy if you would like to know more about this process.
Generate your ONOS application project
Let's now generate an ONOS project which will be fully compilable and ready to be deployed. Although, you will still have to code up your application, we haven't yet figured out how to generate code that does exactly what you would like it to do . So let's start by running the following:
...
This has now generated a new project for you. Let's move on to building it and loading it into ONOS.
Loading your generated component into ONOS
If you want to designated the newly created project as an ONOS application, rather than just an OSGi bundle, enter the directory of your generated component and edit the pom.xml
file within.
...
Code Block | ||
---|---|---|
| ||
onos> app activate org.foo.app onos> apps -s ... * 29 org.foo.app 1.0.SNAPSHOT ONOS OSGi bundle archetype |
Happy coding
Finally your application is loaded and running withing ONOS. Also, the generation process has generated an entire project which can be loaded into your favourite JAVA editor.
...