提问者:小点点

未知包装:日食目标定义


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

[ERROR] Unknown packaging: eclipse-target-definition

我的项目的模块架构改编自Eclipse Con 2013 Tycho Demo,以及目标模块:

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

我使用的是tycho 0.18.1,生成错误的< code > my bundle . my project . target 模块中的< code>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>
  <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个答案

匿名用户

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

[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]

…与之前成功查找第谷包装类型之一的输出:

[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.父