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

0

MD -SAL - Learning Switch Application

asked 2015-03-14 21:43:35 -0800

anonymous user

Anonymous

updated 2015-03-15 08:51:18 -0800

Hi ,

I'm following below link to set up Learning switch application in Opendaylight controller.

https://wiki.opendaylight.org/view/OpenDaylightController:MD-SAL:MD-SALAppTutorial#SampleApplication:TheLearning_Switch

But build is failing and getting this error message.

[INFO] l2switch [INFO]
[INFO] ------------------------------------------------------------------------ [INFO] Building l2switch-parent 0.2.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ l2switch-parent --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven) @ l2switch-parent --- [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message: Detected Maven Version: 3.0.5 is not in the allowed range 3.1.1.

[INFO] distribution-karaf ................................ SKIPPED [INFO] l2switch .......................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27.027s [INFO] Finished at: Sun Mar 15 00:30:27 EDT 2015 [INFO] Final Memory: 20M/176M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-maven) on project l2switch-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Solution : Updated maven version from 3.0.5 to 3.2.5 as per Faizan's suggestion.

Problem 2:

Unable to install bundle in controller. Could some one please help me and provide me the correct installation steps to deploy this application on Helium controller.

ERROR :

osgi> ss learn "Framework is launched."

id State Bundle 195 INSTALLED org.opendaylight.openflowplugin.learning-switch0.1.0.SNAPSHOT osgi> start 195 gogo: BundleException: The bundle "org.opendaylight.openflowplugin.learning-switch0.1.0.SNAPSHOT [195]" could not be resolved. Reason: Missing Constraint: Import-Package: com.google.common.collect; version="[18.0.0,19.0.0)" osgi>

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2015-03-14 21:49:32 -0800

faizan gravatar image

updated 2015-03-14 21:49:56 -0800

This is so hard to read,but one error i am ableto see is "Detected Maven Version: 3.0.5 is not in the allowed range 3.1.1". You need to updte your maven version.

Regards, Faizan

edit flag offensive delete publish link more

Comments

Thanks Faizan, after updating maven to 3.2.5, build was successful but i'm having trouble in installing the bundle.

praneethmadhav ( 2015-03-15 00:42:46 -0800 )edit

@praneethmadhav, You should not entirely EDIT the Question into a new one, as it will difficult for others to refer same problems for there solutions. Regards, Faizan

faizan ( 2015-03-15 01:26:53 -0800 )edit

@faizan, I have formated the earlier error log that was posted initially. Could you please help me with problem 2. Thanks!

praneethmadhav ( 2015-03-15 08:54:03 -0800 )edit

@praneethmadhav, In Problem 2, it seems like "com.google.common" jar is missing from your local repo. Which should be downloaded by the project itself. It is a dependency error. Regards, Faizan

faizan ( 2015-03-15 22:42:16 -0800 )edit
0

answered 2015-06-08 04:57:53 -0800

You can update maven by following commands

1 sudo -H gedit /etc/apt/sources.list 2 Add the following line the sources.list file: deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main deb-src http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main

3 sudo apt-get update && sudo apt-get install maven3

4 sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn

edit flag offensive delete publish link more

Comments

Thanks for the steps. Small improvement - Step 4 doesn't replace the existing /usr/bin/mvn file. It says ln: failed to create symbolic link ‘/usr/bin/mvn’: File exists ( in case mvn is already installed ). Just need to remove using "sudo rm -r /usr/bin/mvn" and the step 4 works. Thanks for the steps again.

saisujithreddy ( 2015-10-07 14:21:12 -0800 )edit

Many thanks. Instead of manual ln use in Step 4 update-alternatives could be helpful: sudo update-alternatives --install /usr/bin/mvn mvn /usr/share/maven3/bin/mvn 1

palik ( 2016-04-27 08:16:02 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
2 followers

Stats

Asked: 2015-03-14 21:43:35 -0800

Seen: 677 times

Last updated: Jun 08 '15