gpt4 book ai didi

maven - 修复 "Plugin execution not covered"build.plugins.plugin.version 后出现 "' 错误 tycho-packaging-plugin 警告 ' is missing"

转载 作者:行者123 更新时间:2023-12-04 16:52:41 29 4
gpt4 key购买 nike

我使用 tycho-packaging-plugin 来设置 jar 的输出文件夹。这是我的 pom 的缩短版本:

<properties>
<tycho-version>0.21.0</tycho-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<configuration>
<buildDirectory>${project.build.directory}/plugins</buildDirectory>
</configuration>
</plugin>
</plugins>
</build>

如果我执行 maven-install,我会收到警告:
[WARNING] Some problems were encountered while building the effective model for com.foo.bar.devtool:com.foo.bar.devtool:eclipse-plugin:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.eclipse.tycho:tycho-packaging-plugin is missing. @ line 44, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

我按照警告的建议修改了 pom:

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<buildDirectory>${project.build.directory}/plugins</buildDirectory>
</configuration>
</plugin>

然后在保存文件后出现错误:
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:${tycho.version}:build-qualifier (execution: default-build-qualifier, phase:
validate)
- Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:${tycho.version}:validate-version (execution: default-validate-version,
phase: validate)
- Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:${tycho.version}:validate-id (execution: default-validate-id, phase: validate)

如何解决问题并避免同时收到警告和错误?

最佳答案

您没有安装用于 m2e 的 Tycho Project Configorator,因此 m2e 不知道它是否应该将列出的目标作为 Eclipse 中增量构建的一部分来执行。

要安装连接器,触发错误的快速修复(例如从问题 View )并选择发现新的 m2e 连接器。

关于maven - 修复 "Plugin execution not covered"build.plugins.plugin.version 后出现 "' 错误 tycho-packaging-plugin 警告 ' is missing",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26231226/

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