未知包装:eclipse-target-definition

时间:2013-09-04 03:36:33

标签: eclipse-rcp tycho

我正在尝试构建基于Eclipse 4 RCP平台并使用Tycho构建的应用程序。我按照文章http://blog.vogella.com/2013/01/03/tycho-advanced/使用了PDE目标定义,在构建项目时出现以下错误:

[ERROR] Unknown packaging: eclipse-target-definition

我的项目模块架构改编自the EclipseCon 2013 Tycho Demo,加上目标模块:

- mybundle.myproject.bundle
- mybundle.myproject.bundle.tests
- mybundle.myproject.feature
- mybundle.myproject.parent
- mybundle.myproject.target

我正在使用tycho 0.18.1,而产生错误的pom.xml模块中的mybundle.myproject.target是:

<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>
  <artifactId>mybundle.myproject.repository</artifactId>
  <packaging>eclipse-repository</packaging>
  <parent>
    <groupId>mybundle</groupId>
    <artifactId>mybundle.myproject.parent</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
</project>

有关详细信息,请参阅完整的调试日志:http://pastebin.com/dMEckvsH

有什么我想念的吗? eclipse-target-definition包装应该适用于此Tycho版本。

1 个答案:

答案 0 :(得分:7)

问题的原因在于您已链接的调试输出。比较失败前的输出......

[DEBUG] Extension realms for project mybundle:mybundle.myproject.target:eclipse-target-definition:0.0.1-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging eclipse-target-definition from ClassRealm[plexus.core, parent: null]

...以前成功查找Tycho的一种包装类型的输出:

[DEBUG] Extension realms for project mybundle:mybundle.myproject.repository:eclipse-repository:0.0.1-SNAPSHOT: [ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:0.18.1, parent: sun.misc.Launcher$AppClassLoader@affc70]]
[DEBUG] Looking up lifecyle mappings for packaging eclipse-repository from ClassRealm[project>mybundle:mybundle.myproject.parent:0.0.1-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]

以下是您可以从输出中读取的内容:项目mybundle.myproject.target没有配置任何构建扩展(即特别是Tycho构建扩展)。从调试输出的第二行开始,这似乎是因为项目没有像其他模块那样配置父mybundle.myproject.parent