maven-bundle-plugin:定义的工件不是原型

发布于 2024-11-30 18:58:33 字数 562 浏览 0 评论 0原文

我将 Apache Felix 中的“maven-bundle-plugin”配置为 Eclipse 中的 Maven 原型(因为它丢失了),但是当我尝试用它创建一个新的 Maven 项目时,出现错误:

Unable to create project from archetype [org.apache.felix:
maven-bundle-plugin:2.3.5 -> ]
The defined artifact is not an archetype

然后我尝试了相同的过程与ops4j Pax(在Eclipse中预先配置),这似乎是类似的东西,并且它有效,所以我认为我做得对,问题出在“maven-bundle-plugin”。

错误消息是什么意思,我能做些什么来修复它,或者我是否以某种方式弄错了?

[编辑] 虽然我可以使用 ops4j Pax 创建项目,但我随后得到:

Project build error: Unknown packaging: bundle

这显然已在 2009 年修复!所以这显然也行不通。

I configured the "maven-bundle-plugin" from Apache Felix as a Maven Archetype in Eclipse (since it was missing), but when I try to create a new Maven project with it, I get as error:

Unable to create project from archetype [org.apache.felix:
maven-bundle-plugin:2.3.5 -> ]
The defined artifact is not an archetype

I then tried the same procedure with ops4j Pax (which is pre-configured in Eclipse), which seems to be something similar, and it worked, so I think I'm doing it right and the problem is with "maven-bundle-plugin".

What does the error message mean, and what can I do to fix it, or am I somehow getting this all wrong?

[EDIT] While I can create the project with ops4j Pax, I afterward get:

Project build error: Unknown packaging: bundle

which as apparently been fixed in 2009! So this obviously doesn't work either.

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

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

发布评论

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

评论(1

无风消散 2024-12-07 18:58:33

我终于成功地完成了以下过程:

cd workspace
mvn org.ops4j:maven-pax-plugin:create-bundle -Dpackage=demo.service
   -DbundleGroupId=demo.service -DbundleName=demo.service-bundle
   -Dversion=0.1
cd demo.service-bundle
mvn org.ops4j:maven-pax-plugin:eclipse
# Import project as Eclipse project
# (I haven't try to import it as maven project)

顺便说一句,我花了很长时间才弄清楚为什么这在 Windows 批处理文件中不起作用:那是因为 mvn 本身就是一个批处理文件,所以你必须使用“call ”。

I finally had success with the following procedure:

cd workspace
mvn org.ops4j:maven-pax-plugin:create-bundle -Dpackage=demo.service
   -DbundleGroupId=demo.service -DbundleName=demo.service-bundle
   -Dversion=0.1
cd demo.service-bundle
mvn org.ops4j:maven-pax-plugin:eclipse
# Import project as Eclipse project
# (I haven't try to import it as maven project)

And btw, it took me about ages to work out why this doesn't work in a Windows batch file: that is because mvn is itself a batch file, and so you have to use "call".

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