【问题标题】:Unknown packaging: eclipse-target-definition未知包装:eclipse-target-definition
【发布时间】:2013-09-07 10:30:47
【问题描述】:

我正在尝试构建一个基于 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,而来自mybundle.myproject.target 模块的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 版本。

【问题讨论】:

    标签: eclipse-rcp 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]
    

    ...带有先前成功查找 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

    【讨论】:

    • 我也有同样的问题,但我在 parant POM 插件管理中有 tycho-maven-plugin&lt;extensions&gt;true&lt;/extensions&gt;
    猜你喜欢
    • 2017-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-07
    • 1970-01-01
    • 2014-06-29
    • 1970-01-01
    相关资源
    最近更新 更多