2016-02-27 38 views
0

任何人都知道如何在自定義karaf發行版中安裝opendaylight restconf。我試圖添加其餘的conf功能回購,並試圖做功能安裝。但是,這會失敗,說odl-config-persister丟失。當你嘗試安裝odl-config-persister時會出現另一個錯誤。有沒有其他方法可以在karaf中安裝opendaylight restconf。如何安裝opendaylight restconf

+0

[在自定義karaf分發中安裝odl-restconf]的可能重複(http://stackoverflow.com/questions/35671915/install-odl-restconf-in-custom-karaf-distribution) –

回答

0

啓動Karaf和驗證,如果你有這樣的功能:在你建立你的項目

feature:install odl-restconf-all 
0

feature:list | grep 'restconf' 

如果是這樣,你可以安裝它,「功能:安裝功能名稱」 ,請確保karaf/pom.xml包含以下節依賴關係標記:

<dependency> 
     <groupId>org.opendaylight.l2switch</groupId> 
     <artifactId>features-l2switch</artifactId> 
     <version>0.7.0-SNAPSHOT</version> 
     <classifier>features</classifier> 
     <type>xml</type> 
     <scope>runtime</scope> 
</dependency> 

然後,生成項目:

[your_project_root]$ mvn clean install -DskipTests 

一旦構建完成,開始karaf並安裝ODL-l2switch開關

[your_project_root]$ cd karaf/target/assembly/bin/ 
[bin]$ ./karaf 
[email protected]>feature:install odl-l2switch-switch 
[email protected]> 

ODL-l2switch開關包括RESTCONF作爲依賴。