...
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 in a directory outside of $ONOS_ROOT:
Code Block | ||
---|---|---|
| ||
$ mvn archetype:generate -DarchetypeGroupId=org.onosproject -DarchetypeArtifactId=onos-bundle-archetype |
...
Alternatively, if you have the ONOS code checked out and available, you can use the onos-create-app
tool to accomplish the same thing. It's important to note that if your ONOS is a SNAPSHOT version and is built with Buck, you should change directory to $ONOS_ROOT/tools/package/archetypes and generate the onos-archetypes firstly:
Code Block | ||
---|---|---|
| ||
$ cd $ONOS_ROOT/tools/package/archetypes $ mvn clean install |
Then run in a directory outside of $ONOS_ROOT where you want to have your application:
Code Block |
---|
$ onos-create-app |
You will now be asked for several pieces of specific information about the bundle you would like to generate as you can see below. Make sure to enter parameters that are appropriate for you.
...