Reputation: 23
I want build a App based on Nitrogen SR1 version, my steps are:
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
groupId: org.opendaylight.hni artifactId: hni enter image description here
After build success ,I build this “hni app” with command: Mvn clean install -DskipTests enter image description here
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
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 .
Upvotes: 2
Views: 217
Reputation: 1349
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/.
Upvotes: 1