Ask Your Question
0

How to use a method from another package?

asked 2016-05-03 19:44:56 -0700

ashvanth48 gravatar image

I'm tying to use the getPath method in NetworkGraphImpl.java from another package (main-impl : inventoryreader.java). How do I import this into this package? Should I modify in pom.xml??

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-05-04 00:03:07 -0700

karthik330 gravatar image

Hi , Yes . You should modify your pom. Add the dependency of loopremover in main-impl pom.xml . Hope it will work.

edit flag offensive delete publish link more

Comments

I'm able to use the method but the feature:install does not work it gives me an error.

ashvanth48 ( 2016-05-05 18:00:04 -0700 )edit
0

answered 2016-05-05 06:06:41 -0700

ashvanth48 gravatar image

updated 2016-05-05 17:16:34 -0700

Worked after adding it under the dependencies of pom.xml. But I'm getting this error while doing a feature:install

Error executing command: Can't install feature odl-l2switch-all/0.0.0:
Could not start bundle mvn:org.opendaylight.l2switch.main/main-impl/0.4.0-SNAPSHOT in feature(s) odl-l2switch-switch-0.4.0-SNAPSHOT: The bundle "org.opendaylight.l2switch.main.impl_0.4.0.SNAPSHOT [196]" could not be resolved. Reason: Missing Constraint: Import-Package: org.opendaylight.l2switch.loopremover.topology; version="0.0.0"

edit flag offensive delete publish link more

Comments

Which version of ODL ,L2switch are you using?.Versions should be same in both the projects.I suggest you to take Stable/Berylium of L2switch and do your modificaion. And install it in ODL-Berylium(Integration/distribution) .I believe you wont face issue in installing.bec I tried and its worked !

karthik330 ( 2016-05-08 22:27:25 -0700 )edit

How to import another class in berylium is it sufficient to just add it under dependencies in pom.xml?? May I know how you are importing the classes from other packages.

ashvanth48 ( 2016-05-09 05:04:02 -0700 )edit

Hi getting the same error. Could you please tell me what other changes to made apart from modifying pom.xml (added the loopremover-impl under dependency). Did you make any changes in features.xml?

ashvanth48 ( 2016-05-10 11:55:27 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-05-03 19:44:56 -0700

Seen: 46 times

Last updated: May 05 '16