Error: Could not find artifact in default local

asked 2015-05-13 07:26:05 -0800

updated 2015-05-21 13:14:54 -0800

I am trying to deploy the application to the opendaylight by following the wiki page: https://wiki.opendaylight.org/view/GettingStarted:Pulling , Hacking,andPushingAlltheCodefromthe_CLI

I successfully build the opendaylight-integration project and wrote one sample application (stated in my previous question https://ask.opendaylight.org/question/3651/error-on-installing-feature-to-odl-karaf-sr3-distribution/ ).

Now I am trying to install sample application to the ODL but I am getting following error: eature:install odl-task-provider

opendaylight-user@root>feature:install odl-task-provider/1.0-SNAPSHOT
Error executing command: Can't install feature odl-task-provider/0.0.0:
Error resolving artifact com.example.yangapp:yang-demo-app-provider:xml:config:1.0-SNAPSHOT: Could not find artifact com.example.yangapp:yang-demo-app-provider:xml:config:1.0-SNAPSHOT in defaultlocal (file:/...../integration/distributions/karaf/target/assembly/system/)

Please let me know if I am missing something for the application deployment.

Update

I performed the following the changes in the integration project and build the source but still I am not able to include the sample feature to the ODL.

$ git diff
diff --git a/features/src/main/resources/features.xml b/features/src/main/resources/features.xml
index c0a0d1e..928500f 100644
--- a/features/src/main/resources/features.xml
+++ b/features/src/main/resources/features.xml
@@ -78,6 +78,7 @@
     <repository>mvn:org.opendaylight.tcpmd5/features-tcpmd5/${feature.tcpmd5.version}/xml/features</repository>
     <repository>mvn:org.opendaylight.ttp/features-ttp/${feature.ttp.version}/xml/features</repository>
     <repository>mvn:org.opendaylight.vtn/features-vtn-manager/${feature.vtn-manager.version}/xml/features</repository>
+    <repository>mvn:com.example.yangapp/features-yang-demo-app/1.0-SNAPSHOT/xml/features</repository>

     <!-- Please use alphabetical order to add a compbatible with all feature -->
     <feature name='odl-integration-compatible-with-all' version='${project.version}'>
@@ -107,6 +108,7 @@
         <feature version='${feature.ttp.version}'>odl-ttp-all</feature>
         <feature version='0.1.3-Helium'>odl-snmp4sdn-all</feature>
         <feature version='${feature.tcpmd5.version}'>odl-tcpmd5-all</feature>
+       <feature version='1.0-SNAPSHOT'>odl-task</feature>
     </feature>

     <!-- Please use aphabetical order for non-compatible features -->

Please let me know If I am missing anything.

update:

I copied the tar files to the system folder in the karaf, but I am still getting the same error.

$ cp features/target/features-yang-demo-app-1.0-SNAPSHOT.jar ~/.../integration/distributions/karaf/target/assembly/system/

opendaylight-user@root>repo-add mvn:com.example.yangapp/features-yang-demo-app/1.0-SNAPSHOT/xml/features
Adding feature url mvn:com.example.yangapp/features-yang-demo-app/1.0-SNAPSHOT/xml/features
Error executing command: Error resolving artifact com.example.yangapp:features-yang-demo-app:xml:features:1.0-SNAPSHOT: Could not find artifact com.example.yangapp:features-yang-demo-app:xml:features:1.0-SNAPSHOT in defaultlocal (file:/Users/../integration/distributions/karaf/target/assembly/system/)
edit retag flag offensive close merge delete

Comments

If you want your application to be included in distribution build (based on Helium), you have to edit /features/src/main/resources/features.xml in integration repository (branch stable/helium) to add your features and repository, otherwise it will not be picked to /system in the resulting archive.

vrpolak ( 2015-05-18 10:27:13 -0800 )edit

Thanks @vrpolak, I tried the as per you suggestion but still I am not able to include the feature to distribution. Please check the update in the question once.

subhash ( 2015-05-18 14:27:48 -0800 )edit

> mvn:com.example.yangapp Let just assume maven would find it somewhere in ~/.m2/repository/. Does "grep -r odl-task-provider" find it? Also, settings.xml may affect the results. https://wiki.opendaylight.org/view/GettingStarted:Development_Environment_Setup#Edit_your_.7E.2F.m2.2Fsettings.xml

vrpolak ( 2015-05-19 03:03:23 -0800 )edit

@vrpolak I am able to fine `~/.m2/repository/com/example/yangapp` folder (projects are present there). Also I checked the setting.xml file, it is according to the wiki.

subhash ( 2015-05-19 12:21:37 -0800 )edit

Ok. The next question: Is /com/example/yangapp/ present also in /system in the tar/zip built by integration?

vrpolak ( 2015-05-20 05:34:49 -0800 )edit