开发者

maven-bundle-plugin: The defined artifact is not an archetype

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), whic开发者_如何学Goh 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.


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".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜