Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


Application Development Tutorial - Archetype Version

asked 2016-09-08 10:40:42 -0700

marcosvgmfilho gravatar image

I am trying to follow the Application Development Tutorial, here:

The project was created after the opendaylight-startup-archetype, as described in the tutorial:

mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller \
-DarchetypeArtifactId=opendaylight-startup-archetype \
-DarchetypeVersion=1.2.0-SNAPSHOT \
-DarchetypeRepository= \

The HelloProvider class (at impl/src/main/java/org/opendaylight/hello/impl/, however, doesn't correspond to what is described in the tutorial.

The tutorial version, for example, has:

    public void onSessionInitiated(ProviderContext session) {"HelloProvider Session Initiated");

While mine has:

  * Method called when the blueprint container is created.
  public void init() {"HelloProvider Session Initiated");

Aside for other differences. I checked the archetype source code here and it really doesn't match what's described at the tutorial.

Am I missing anything, or did the 1.2.0-SNAPSHOT version of the archetype really changed? According to the answer for this question, it seems that it has something to do to OpenDaylight using Blueprint, and that I should use a different version of the archetype. What are the implicantions of this change?

Thanks in advance.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2016-09-08 23:18:19 -0700

karthik330 gravatar image

Hi friend , Hope you know ODL is having many branches (He, Hydrogen,Lithium,Be,.etc) .So they keep on improving/changing/Removing the source.Clear?. At Boron also they changed the folder structures and following Blue Print kind of model. I guess no wiki page to guide developers in Boron.However it is not much complex if you understood the previous ODL branches . In your case, you are using 1.2.0-Snap ;If you get any build error(like could not find 1.2.0) means they removed that version in the repository, To confirm it just go to that error-link,there you may not find the specified version.

i recommend you to see this Link Archetype-doubt
You will get more clarity. If you are beginner, start learning stable/berylium with the guide of wiki page .

Thanks, Karthik

edit flag offensive delete publish link more


Yes, I noticed that. Actually, I didn't run into any building issues with version 1.2.0-SNAPSHOT. My question is just to understand if I was missing anything, or if the archetype really changed. I was under the impression that the SNAPSHOT version wouldn't be subject to further modifications. Tks!

marcosvgmfilho ( 2016-09-09 04:04:48 -0700 )edit

So few things:
- the SNAPSHOT gets delete periodically, every 3 weeks, there is no more 1.2.0-SNAPSHOT for the archetype.
- The Hello World wiki page was updated as per as the shift to blueprint.
- You're right, things has changed in Boron.
If you need further details, please ask :)

adetalhouet ( 2016-10-21 09:47:14 -0700 )edit

answered 2016-11-23 08:39:37 -0700

jgray gravatar image

I have the same problem, where init() is called and onSessionInitiated() is not. The problem is that init() does not receive the session, so I can't call session.addRPCImplementaion(). Any idea how to get onSessionInitiated() to run or how to retrieve the session in init()?


edit flag offensive delete publish link more

answered 2017-06-06 18:38:04 -0700

they have a new page to address this issue here.

edit flag offensive delete publish link more
Login/Signup to Answer


Asked: 2016-09-08 10:40:42 -0700

Seen: 308 times

Last updated: Jun 06 '17