Resolving workspace dependencies for Virgo in Eclipse

こ雲淡風輕ζ 提交于 2019-12-11 15:28:24

问题


I'm looking to get started with Eclipse Virgo, so I grabbed the required plugins for Eclipse based on the Programmer Guide.

Next, I started two new projects in my Eclipse workspace, both configured as Virgo bundles (call these A and B). Then, I created a new class com.foo.Bar in bundle B. I modified the Manifest of bundle B to export com.foo, saved. Last, I imported com.foo in bundle A.

Bundle A's manifest has an error:

Import-Package: com.foo [0.0.0, oo) could not be resolved

What do I need to do to configure Eclipse to resolve dependencies using the projects in my workspace?

I've already tried adding bundle B to the build path of bundle A, but this makes no difference. (It's worth noting that adding bundle B to the build path of bundle A, even if it had worked, isn't a suitable solution because the dependency management needs to be done differently.)

Details of note:

  • Virgo: 2.1
  • Eclipse: 3.6

回答1:


I got it working by using STS (Spring Tool Suite) and the tooling for Spring dm Server and associating each bundle with virgo runtime.




回答2:


Given that:

  1. MANIFEST.MF must be located in src/META-INF/MANIFEST.MF
  2. "EclipseRT OSGi Bundle" is one of the project facets
  3. A Virgo Web Server Runtime must also be specified (use the Runtimes tab in the Project Facets window)

Steps to resolve dependencies:

  1. Open properties on bundle B (right click -> Properties)
  2. Choose "Project References"
  3. Check the checkbox next to bundle A


来源:https://stackoverflow.com/questions/6461902/resolving-workspace-dependencies-for-virgo-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!