“Unknown packaging: eclipse-plugin” in Maven

后端 未结 1 1462
野的像风
野的像风 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:

    
      
        
          org.eclipse.tycho
          tycho-maven-plugin
          ${tycho-version}
          true
        
      
    
    

    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)
提交回复
热议问题