无法从作为 Maven 依赖项加载的 jar 导入 plugin.xml 中的包?

发布于 2024-12-12 01:50:41 字数 376 浏览 0 评论 0原文

我想利用 Maven 提供的功能来管理项目中的依赖项。我对 Maven 工作原理的简单理解是,它将获取所需的 JAR,然后使用这些库构建项目。所以我已经在我的电脑上安装并配置了maven。我还在我的 eclipse helios 上安装了 me2eclipse 插件版本 0.12。

我已经创建了一个maven项目并配置了pom。我向 Maven 添加了一些依赖项,并且 Maven 正在检查 %userprofile%/.me2/repository 的依赖 jar。这很好用。但我想从位于我的plugin.xml 的maven 依赖项中的jar 文件导入一些包,这些包通过运行eclipse rcp 插件来使用。 Maven 依赖项也添加到我的类路径中。

不知道错误是什么?任何人都可以帮助我吗?谢谢。

I would like to take advantage of the features that Maven provides for managing dependencies in a project. My brief understanding of how Maven works is that it will aquire the JARs needed and then build the project with these libraries. So i have installed and configured maven on my computer. Also i have installed the me2eclipse plugin version 0.12 on my eclipse helios.

I have been created a maven project and configured the pom. I added some dependencies to maven and maven was checking out the dependend jars to %userprofile%/.me2/repository. This works fine. But i would like to import some packages from the jar files which are located at the maven dependencies at my plugin.xml which are used by running a eclipse rcp plugin. The maven dependencies are added to my classpath as well.

I don't know were the mistake is? Can any body help my. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

删除会话 2024-12-19 01:50:41

答案是,不可能从 eclipse rcp 插件依赖项或 MANIFEST 中作为 Maven 依赖项(存储在 Maven 本地存储库)加载的 jar 或捆绑包导入某些包。您只能从位于 eclipse 目标平台的 jar 导入捆绑包或包。因此,解决方案是将本地 Maven 存储库中的包也添加到目标平台。

The answer is, thats not possible to import some packages from jars or bundles which are loaded as maven dependency (stored at the maven local repositiry) at the eclipse rcp plugin dependency or MANIFEST. You can only import bundles or packages from jars which are located at the eclipse target platform. So the solution is to add the bundles which ar located at the local maven repository to the target platform as well.

情感失落者 2024-12-19 01:50:41

您应该深入了解 Maven-Felix 在这种建筑中为您提供支持。此外,我建议您更新到 Eclipse-Indigo 并使用集成的(市场)m2e 而不是旧的 m2eclipse 插件。

You should take a deep look at Maven-Felix which supports you in this kind of building. Furthermore i recommend you to update to Eclipse-Indigo and use the integrated (Marketplace) m2e instead of the old m2eclipse plugin.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文