1

我看到我想从 HEAD 构建的一个功能(以获得错误修复的好处)在 git.eclipse.org 中。从源代码构建一些 Eclipse 特性过去有点棘手,但现在有了 Tycho,它应该更容易,因为它使用 Maven。幸运的是,我看到这个功能已经设置为使用 Tycho 和 Maven。

但是如何将 Tycho 用作最终用户并不十分明显——我曾尝试以“全新安装”为目标运行 Maven 构建,但失败了。

请提供有关如何运行 Tycho 构建的完整分步说明,从要构建的项目的源代码检查开始,包括安装任何必要的软件,最后运行具有所需功能的 Eclipse。

另外,如果我想在 Eclipse 中更改插件的源代码,那是否意味着我应该使用不同的方式来构建它?


仅供参考,这是导致上述一般问题的具体问题:我尝试构建功能org.eclipse.linuxtools/systemtap/org.eclipse.linuxtools.systemtap-feature,并且我systemtap在同级目录中签出了插件(因为它们是同一个 git 存储库的一部分,所以我免费获得它们) .

错误是:

[ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-source-feature-
plugin:0.14.0:source-feature (source-feature) on project org.eclipse.linuxtools.systemtap: Could not generate source feature for project MavenProject: org.eclipse.linuxtools.systemtap:org.eclipse.linuxtools.systemtap:1.2.0-SNAPSHOT @ /home/greenrd/git/org.eclipse.linuxtools/systemtap/org.eclipse.linuxtools.systemtap-feature/pom.xml
[ERROR] Missing sources for plugins [org.eclipse.linuxtools.systemtap.ui.consolelog_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.editor_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.graphingapi.ui_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.logging_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.structures_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.graphing_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.systemtapgui_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.ide_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.dashboard_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.dashboardextension_0.3.0.201203201951, org.eclipse.linuxtools.systemtap.ui.graphicalrun_0.3.0.201203201951]
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
4

2 回答 2

0

mvn package通常会使用 Tycho 构建打包插件和功能。也许您的失败与使用有关,mvn install其中还涉及在该verify阶段运行集成测试。

如果mvn package不起作用,请添加您正在构建的项目和您遇到的错误。

于 2012-03-31T13:37:34.117 回答
0

使用 Tycho 的项目应该像任何其他 Maven 项目一样构建,即您应该能够通过调用项目的根目录来构建项目并运行其测试。mvn clean verify(如果pom.xml根目录中没有,请查找名为“父”的项目或向该项目询问其构建入口点。)

就像在 Maven 中一样,您通常不能签出项目并直接构建它的一部分,例如通过调用mvneclipse-feature 子项目。为此,您首先需要构建整个项目一次,mvn clean install然后您还可以重新构建项目的一部分。

如果您进行源代码修改,我建议您再次进行完整构建。可以只构建更改的子项目,但您还需要手动确保重新构建所有聚合项目类型(即“eclipse-feature”和“eclipse-repository”),这可能不值得付出努力. (不幸的是, Tycho 目前不支持Maven 选项--also-make-dependents。)

为了从本地构建结果安装,您需要找到将项目的二进制文件组装为 p2 存储库的子项目:查找target/repository(或可能target/site)目录并检查features/plugins子文件夹。存储库或站点文件夹可用作 Eclipse 中更新机制的“本地”源。


免责声明:上述步骤不适用于所有使用 Tycho 的项目。如果出现问题,您应该查看项目的文档以获取运行构建的特殊说明,或询问项目的开发人员。

于 2012-08-24T20:07:31.240 回答