1

this is my first Maven plugin project and I am following this guide http://wiki.eclipse.org/OM2M/one/Developer

yet , I am having similar issue with this thread Convert java plugin into maven project with eclipse-plugin packaging

he said "Edit 3 : I managed to remove the error by setting the main pom.xml as a parent but now when i try to build i have the following error :", I do want to know how he did that

here is my pom

<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>org.eclipse.om2m.sample.ipe</groupId>
 <artifactId>org.eclipse.om2m.sample.ipe</artifactId>
 <version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>

build properties

source.. = src/main/java
output.. = bin/
bin.includes = META-INF/,\

Location:

C:\Users\Ahmad\workspace\org.eclipse.om2m.sample.ipe
           .

Path: /org.eclipse.om2m.sample.ipe

the error is on POM eclipse-plugin

it says Unknown packaging

thanks

Community
  • 1
  • 1
HoneyDipper
  • 63
  • 12

1 Answers1

1

Take a look at this question. The most voted answer states that:

The packaging type eclipse-plugin is defined by a Maven build extension called Tycho.

In order to use Tycho's packaging types, you need to configure Tycho as a build extension:

<build>
  <plugins>
    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>tycho-maven-plugin</artifactId>
      <version>${tycho-version}</version>
      <extensions>true</extensions>
    </plugin>
  </plugins>
</build>

You might also want to take a look at this post in the Eclipse Community Forum. The user Francois Assoui states that:

The "eclipse-plugin" packaging is not available in the standard set of maven packaging. It is provided by the Maven plugin Tycho made for handling OSGi plugins compilation and creation of sites (project that gather a set of plugins for a specific configuration).

At the state where you have to enter the packaging, the IDE can not give you the right choice as it does not know that we are going to use Tycho. You have to type it manually and you will have an error at that time. But you just have to make the link to the parent project in the next step to solve this error. In fact, the parent project imports the Tycho plugin.

Community
  • 1
  • 1
marcelovca90
  • 2,673
  • 3
  • 27
  • 34
  • thanks Marc, however where that "build extension" is? – HoneyDipper Nov 03 '16 at 21:16
  • Note that the provided code contains both `` and `` tags, so that's how you tell Maven to use build extension(s). For more detailed information, please refer to [this topic](https://maven.apache.org/pom.html#Extensions) in the documentation. – marcelovca90 Nov 03 '16 at 22:02