“Unknown packaging: eclipse-plugin” in Maven

后端 未结 1 1457
野的像风
野的像风 2020-12-10 11:38

I want to build a project in Maven using eclipse-plugin packaging, but I get the following error for my POM:

[ERROR] Unknown packaging: eclipse-         


        
相关标签:
1条回答
  • 2020-12-10 12:32

    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>
    

    Also, Tycho requires additional metadata files to be present, e.g. an OSGi manifest for eclipse-plugin modules. Another major difference of a Tycho project compared to a regular Maven project is that you have to configure the so-called target platform, e.g. by defining a repository with layout=p2, in case your project references any external artifacts. To get started, you may have a look at this example project.

    For more information, you can also check out Tycho's documentation wiki, e.g. the reference card page.

    0 讨论(0)
提交回复
热议问题