gpt4 book ai didi

maven - Tycho/Maven 的配置问题 : "Tycho build extension not configured"

转载 作者:行者123 更新时间:2023-12-02 00:42:13 39 4
gpt4 key购买 nike

我一直在关注 Vogella 的教程 ( http://www.vogella.com/articles/EclipseTycho/article.html ),使用 Tycho 为我的项目设置 Maven 构建环境。我的项目已经相当大了,有几个插件、功能和一个更新站点,但是我设法让 mvn cleanmvncompile 正常工作,并按照教程进行了所有操作直到mvn install。我现在面临的问题很困惑。我一直收到以下错误:

[INFO] --- tycho-p2-director-plugin:0.16.0:materialize-products (materialize-products) @ parent ---
[DEBUG] Configuring mojo org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products from plugin realm ClassRealm[plugin>org.eclipse.tycho:tycho-p2-director-plugin:0.16.0, parent: sun.misc.Launcher$AppClassLoader@35ce36]
[DEBUG] Configuring mojo 'org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products' with basic configurator -->
[DEBUG] (f) directorRuntime = internal
[DEBUG] (f) installFeatures = true
[DEBUG] (f) profile = DefaultProfile
[DEBUG] (f) project = MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHOT @ C:\Documents and Settings\Thomas Sylvester\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@1335332
[DEBUG] (f) source = targetPlatform
[DEBUG] -- end configuration --
[INFO] No product definitions found. Nothing to do.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent ............................................ FAILURE [0.201s]

从此堆栈跟踪中截取插件列表。他们都被跳过了。 parent 失败了。

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.735s
[INFO] Finished at: Thu Feb 21 06:42:47 PST 2013
[INFO] Final Memory: 65M/158M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products (materialize-products) on project parent: Execution materialize-products of goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products failed: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHOT @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products (materialize-products) on project parent: Execution materialize-products of goal org.eclipse.tycho:tycho-p2-director-plugin:0.16.0:materialize-products failed: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHOT @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution materialize-products of goal org.eclipse.tycho:tycho-p2-director-plug
in:0.16.0:materialize-products failed: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SNAPSHO
T @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalStateException: Tycho build extension not configured for MavenProject: com.micrium.configbuilder:parent:1.1.0-SN
APSHOT @ C:\Documents and Settings\Erika Redmark\git\plugin-suite\com.micrium.configbuilder.tycho.master\pom.xml
at org.eclipse.tycho.core.utils.TychoProjectUtils.getTargetPlatform(TychoProjectUtils.java:63)
at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.addTargetPlatformRepository(RepositoryReferenceTool.java:116)
at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.getVisibleRepositories(RepositoryReferenceTool.java:97)
at org.eclipse.tycho.plugins.p2.director.DirectorMojo.getTargetPlatformRepositories(DirectorMojo.java:167)
at org.eclipse.tycho.plugins.p2.director.DirectorMojo.getSourceRepositories(DirectorMojo.java:145)
at org.eclipse.tycho.plugins.p2.director.DirectorMojo.execute(DirectorMojo.java:93)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
[ERROR]
[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/PluginExecutionException

我发现原因的根源是目标平台在某种程度上未定义。但是当我在 Eclipse wiki ( http://wiki.eclipse.org/Tycho/Target_Platform ) 上查找目标平台时,它指出:

In order allow Tycho to resolve the project dependencies against anything from a specific p2 repository, add that repository in the section of the POM... In terms of the target platform, this means that the entire content of the p2 repositories specified in this way become part of the target platform.

我的 POM 中有该部分。事实上,这是我的父 POM 的完整内容(根据教程在单独的通用项目中定义)。我只省略了所有模块的声明:

<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.micrium.configbuilder</groupId>
<artifactId>parent</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
... bunch of modules ...
</modules>

<properties>
<tycho-version>0.16.0</tycho-version>
</properties>

<repositories>
<repository>
<id>helios</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/helios</url>
</repository>
</repositories>


<build>
<plugins>

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.16.0</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>0.16.0</version>
<executions>
<execution>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<execution>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

</build>

</project>

我是不是错过了什么?我似乎已经将文档所涉及的内容定义为目标平台。我是否看到了正确的问题?

最佳答案

问题是您正在尝试在父 POM 中执行 tycho-p2-director-plugin。这是行不通的——该插件只能在具有 eclipse-repository 打包类型的模块中执行。将配置 tycho-p2-director-plugin 配置移动到 eclipse-repository 模块中将解决此处描述的问题。

不幸的是,第谷在这种情况下没有给出好的错误消息。它指出“Tycho 构建扩展未配置”,但实际上它已配置,但只是未针对打包类型 pom 执行。

关于maven - Tycho/Maven 的配置问题 : "Tycho build extension not configured",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15006721/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com