Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make M2E eclipse plugin understand Bundle packaging

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 ()

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

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

So I don't know how to get M2E understand bundle packaging ?

like image 927
Nguyen Manh Cuong AtomIX Avatar asked Mar 16 '12 04:03

Nguyen Manh Cuong AtomIX


1 Answers

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

like image 115
ebelanger Avatar answered Oct 11 '22 19:10

ebelanger