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


MD -SAL - Learning Switch Application

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

anonymous user


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

Hi ,

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

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]

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.


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:; version="[18.0.0,19.0.0)" osgi>

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

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

faizan gravatar image

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

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


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 -0700 )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 -0700 )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 -0700 )edit

@praneethmadhav, In Problem 2, it seems like "" 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 -0700 )edit

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

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 precise main deb-src 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


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 -0700 )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 -0700 )edit
Login/Signup to Answer

Question Tools



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

Seen: 740 times

Last updated: Jun 08 '15