如何使M2E eclipse插件了解捆绑包装 [英] How to make M2E eclipse plugin understand Bundle packaging

查看:79
本文介绍了如何使M2E eclipse插件了解捆绑包装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Osgi几乎是陌生的. 我正在使用Eclipse 3.6 Helios构建我的第一个Felix捆绑包,但发现M2E不了解捆绑包包装...

I'm almost new with Osgi. I'm using Eclipse 3.6 Helios for building my first Felix Bundle but find out that M2E don't understand bundle packaging...

Project build error: Unknown packaging: bundle

Project build error: Unresolveable build extension: 
Plugin org.apache.felix:maven-bundle-plugin:2.0.0 or one of its dependencies could not be resolved: 
Failed to collect dependencies for org.apache.felix:maven-bundle-plugin:jar:2.0.0 ()

当我完成Google搜索时,这是Maven 2中的错误,但在使用M2E的Maven 3中已修复.

As I done google searches, it was an error in Maven 2 but fixed in Maven 3 with M2E using.

此外,我使用的是Window XP,并且在代理下运行,我认为我应该对它进行配置,Eclipse中的其他连接也可以正常工作...

Also, I'm using Window XP and under a proxy, which I think I sussefully config it, other connections in Eclipse work fine...

所以我不知道如何使M2E了解捆绑包装?

推荐答案

使用这些设置,导入maven项目.如果缺少连接器(用于链接Maven目标和Eclipse插件),则应启用下一步"按钮.单击下一步"并自动解析连接器以安装tycho插件.从现在开始,您的项目将具有插件性质.

Using these settings, import the maven project. If there are missing connectors (which links maven goals and eclipse plugins), the 'Next' button should be enabled. Do Next and auto-resolve the connectors to install tycho plugins. From now on, your project will have a Plugin nature.

P.S确保在该项目中至少要编译一个类,否则maven-bundle-plugin会抱怨.

P.S Be sure to at least have one class to compile in the project or maven-bundle-plugin will complain.

<packaging>bundle</packaging>
<build>
<plugins>
    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
    </plugin>
</plugins>

这篇关于如何使M2E eclipse插件了解捆绑包装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆