2

I want build a App based on Nitrogen SR1 version, my steps are:

  1. Build a maven project with command: mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.release -DarchetypeCatalog=remote -DarchetypeVersion=1.4.1 enter image description here

  2. groupId: org.opendaylight.hni artifactId: hni enter image description here

  3. After build success ,I build this “hni app” with command: Mvn clean install -DskipTests enter image description here

  4. After build success. I start this “hni app”’s Karaf, and feature
    install hni. Then I went to see log , my two features: Features-hni & odl-hni-api They are both installed. enter image description here enter image description here

  5. But there should be “HniProvider Session Initiated” in this log file. Cuz my code: HniProvider.init() should print these words.
    However,they aren’t be printed in log file. enter image description here

So I want ask Why? When I build a app based on Carbon version, I follow these steps ,too. But the “HniProvider Session Initiated” is be printed in log in Carbon version.

What are the diffences between the Carbon and Nitrogen,when building apps ??? Thx very much .

Yang Han
  • 23
  • 2
  • Yang Han, I don't see anything immediately wrong in your steps above. Instead of supporting you here, can I suggest that you subscribe to and ask this on an OpenDaylight mailing list, see https://lists.opendaylight.org/mailman/listinfo? For example https://lists.opendaylight.org/mailman/listinfo/controller-dev or https://lists.opendaylight.org/mailman/listinfo/dev – vorburger Jan 12 '18 at 11:28
  • thank you very much – Yang Han Jan 12 '18 at 11:31

1 Answers1

1

The problem is that only the generated odl-X-api feature (odl-hni-api in your case) is installed - so the implementation code that logs that output isn't installed. This is because the features-X pom only lists the odl-X-api feature as a dependency - it needs to also list the odl-X feature which has the implementation bundle, and the odl-X-cli and odl-X-rest features (if you want those). This is fixed in https://git.opendaylight.org/gerrit/#/c/66545/.

Tom Pantelis
  • 1,349
  • 1
  • 7
  • 6
  • Tom, just FYI: Yang Han's Q here is for Nitrogen, whereas c/66545 is for Oxygen. Yang Han: Do you want to make a contribution to OpenDaylight by cherry-picking c/66545 from Oxygen master back to Nitrogen? – vorburger Jan 12 '18 at 23:33
  • yeah - I was actually planning to cherry-pick it to Nitrogen once it's merged in master. I should've mentioned that as a workaround right now those other features (or at least odl-X) can simply be added as dependencies to the features-X pom. After rebuilding the features and karaf, the odl-X feature (odl-hni in Yang Han's case) should be available to install. – Tom Pantelis Jan 13 '18 at 02:52