简体   繁体   English

Eclipse:转换为Maven-未知包装:eclipse-plugin

[英]Eclipse: Convert to Maven - unknown packaging: eclipse-plugin

I am trying to convert my Eclipse RCP 3 Product into a Maven Project. 我正在尝试将Eclipse RCP 3产品转换为Maven项目。 This is the pom.xml it created: 这是它创建的pom.xml:

<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>de.dspace.qpm.admintool.coreplugin</groupId>
   <artifactId>de.dspace.qpm.admintool.coreplugin</artifactId>
   <version>1.4.0.qualifier</version>
   <packaging>eclipse-plugin</packaging>
</project>

The error message "Project Build Error: Unknown packaging: eclipse-plugin" comes up. 出现错误消息“项目生成错误:未知的包装:eclipse-plugin”。 I don't know how to fix that. 我不知道该如何解决。

You need to tell Maven to enable the Tycho extension (which registers Tycho's packaging types): 您需要告诉Maven 启用 Tycho 扩展 (注册Tycho的包装类型):

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

See the Tycho Reference Card for details. 有关详细信息,请参见Tycho参考卡

You should also get in the habit of defining a tychoVersion property, as Tycho will complain if you mix multiple versions of the various Tycho plugins in your build. 您还应该养成定义tychoVersion属性的习惯,因为如果在构建中混合使用各种Tycho插件的多个版本,Tycho会抱怨。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM