Importing Maven projects in Eclipse

See Maven Eclipse Plugin

Editing Maven projects in Eclipse

See Maven Eclipse Intregration

Building Eclipse plugins in Maven

Instructions targeting Eclipse 3.2, which uses OSGi bundles as plugin format.

The important files to have into account:

Currently there are two integration points that overlap:

An OSGi bundle can be easily created with the Felix OSGi plugin. Integration between Maven and PDE is other story.

This is a configuration that works

<build>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <includes>
          <include>plugin.xml</include>
          <include>plugin.properties</include>
        </includes>
        <targetPath>/</targetPath>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <pde>true</pde>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix.plugins</groupId>
        <artifactId>maven-osgi-plugin</artifactId>
        <version>0.8.0-SNAPSHOT</version>
        <executions>
          <execution>
            <goals>
              <goal>osgi-bundle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <pluginRepositories>
    <pluginRepository>
      <id>apache.org</id>
      <name>Apache Snapshot Repository</name>
      <url>http://people.apache.org/repo/m2-snapshot-repository</url>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

Reading Eclipse Plugins / OSGi bundles for Maven

Lastest version of Maven Eclipse Plugin has a MakeArtifactsMojo that reads Eclipse Plugins, parses the manifest to generate the poms and installs them in the repository.

Building Eclipse with Maven

Several barriers have been identified that prevent Eclipse platform, equinox, RCP from building using Maven. For a discussion, see Barriers to Building Eclipse with Maven.

General Discussion on Building OSGi

I'm starting an area on the MAVENUSER confluence space to talk about how to build OSGi bundles (with Maven). I'd like to capture the current practices, whether using Ant or whatever, and use the space for reviewing possible design changes for Maven to accommodate these builds. That area will be found here:

Building OSGi Bundles