Open Day Light – Toaster Tutorial App

Few of my contacts were finding it difficult to get going on with the Open Day Light tutorial app.

Reported that they were not able to cross the first step of creating a simple ‘Example’ project using Maven and an archetype called ‘opendaylight-startup-archetype’.

Tried the following and it worked.

Installed JDK and updated JAVA_HOME environment path variable.
Installed Maven and update MAVEN_HOME and M2_HOME environment variable. Updated PATH environment variable to include Maven bin path.

In home folder created .m2 folder and created settings.xml with the following contents

<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=2 tabstop=2: -->
<!--
 Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.

This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<profiles>
 <profile>
 <id>opendaylight-release</id>
 <repositories>
 <repository>
 <id>opendaylight-mirror</id>
 <name>opendaylight-mirror</name>
 <url>https://nexus.opendaylight.org/content/repositories/public/</url>
 <releases>
 <enabled>true</enabled>
 <updatePolicy>never</updatePolicy>
 </releases>
 <snapshots>
 <enabled>false</enabled>
 </snapshots>
 </repository>
 </repositories>
 <pluginRepositories>
 <pluginRepository>
 <id>opendaylight-mirror</id>
 <name>opendaylight-mirror</name>
 <url>https://nexus.opendaylight.org/content/repositories/public/</url>
 <releases>
 <enabled>true</enabled>
 <updatePolicy>never</updatePolicy>
 </releases>
 <snapshots>
 <enabled>false</enabled>
 </snapshots>
 </pluginRepository>
 </pluginRepositories>
 </profile>

<profile>
 <id>opendaylight-release</id>
 <repositories>
 <repository>
 <id>opendaylight-release</id>
 <name>opendaylight-release</name>
 <url>https://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
 <releases>
 <enabled>true</enabled>
 </releases>
 <snapshots>
 <enabled>false</enabled>
 </snapshots>
 </repository>
 </repositories>
 <pluginRepositories>
 <pluginRepository>
 <id>opendaylight-release</id>
 <name>opendaylight-release</name>
 <url>https://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
 <releases>
 <enabled>true</enabled>
 </releases>
 <snapshots>
 <enabled>false</enabled>
 </snapshots>
 </pluginRepository>
 </pluginRepositories>
 </profile>
 </profiles>

<activeProfiles>
 <activeProfile>opendaylight-release</activeProfile>
 </activeProfiles>
</settings>

Created sample project using Maven as follows

mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeCatalog=remote -DarchetypeVersion=1.2.3-Boron-SR3

For selecting the archetypeVersion – access the following link in browser and picked one which had the startup-archetype as artificat Id.

https://nexus.opendaylight.org/content/repositories/opendaylight.release/archetype-catalog.xml