简体   繁体   English

在Eclipse中解决Virgo的工作区依赖关系

[英]Resolving workspace dependencies for Virgo in Eclipse

I'm looking to get started with Eclipse Virgo, so I grabbed the required plugins for Eclipse based on the Programmer Guide. 我希望开始使用Eclipse Virgo,因此我根据《程序员指南》获取了Eclipse所需的插件。

Next, I started two new projects in my Eclipse workspace, both configured as Virgo bundles (call these A and B). 接下来,我在Eclipse工作区中启动了两个新项目,两个项目均配置为Virgo捆绑包(称为A和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. 然后,我在捆绑软件B中创建了一个新类com.foo.Bar 。我修改了捆绑软件B的清单以导出保存的com.foo Last, I imported com.foo in bundle A. 最后,我在包A中导入了com.foo

Bundle A's manifest has an error: 捆绑软件A的清单中有错误:

Import-Package: com.foo [0.0.0, oo) could not be resolved 导入包:com.foo [0.0.0,oo)无法解析

What do I need to do to configure Eclipse to resolve dependencies using the projects in my workspace? 我需要做什么来配置Eclipse以使用工作空间中的项目来解决依赖关系?

I've already tried adding bundle B to the build path of bundle A, but this makes no difference. 我已经尝试过将捆绑软件B添加到捆绑软件A的构建路径中,但这没有什么区别。 (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.) (值得注意的是,将捆绑软件B添加到捆绑软件A的构建路径中,即使它已经起作用,也不是一个合适的解决方案,因为依赖管理需要以不同的方式进行。)

Details of note: 注意事项:

  • Virgo: 2.1 处女座:2.1
  • Eclipse: 3.6 月食:3.6

我通过使用STS(Spring工具套件)和Spring dm Server工具并将其与virgo运行时相关联来使其工作。

Given that: 鉴于:

  1. MANIFEST.MF must be located in src/META-INF/MANIFEST.MF MANIFEST.MF 必须位于src / META-INF / MANIFEST.MF中
  2. "EclipseRT OSGi Bundle" is one of the project facets “ EclipseRT OSGi Bundle”是项目的一个方面
  3. A Virgo Web Server Runtime must also be specified (use the Runtimes tab in the Project Facets window) 还必须指定Virgo Web Server运行时(使用“项目构面”窗口中的“运行时”选项卡)

Steps to resolve dependencies: 解决依赖关系的步骤:

  1. Open properties on bundle B (right click -> Properties) 打开捆绑软件B上的属性(右键单击->属性)
  2. Choose "Project References" 选择“项目参考”
  3. Check the checkbox next to bundle A 选中捆绑商品A旁边的复选框

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM