gpt4 book ai didi

java - 生命周期配置未涵盖的插件执行 : org. jetbrains.kotlin :kotlin-maven-plugin:1. 1.51:test-compile

转载 作者:行者123 更新时间:2023-11-29 08:31:59 25 4
gpt4 key购买 nike

我克隆了 spring-boot将 Git 存储库放入 Eclipse,我收到以下错误。我没有进行任何代码更改。

Plugin execution not covered by lifecycle configuration: 
org.jetbrains.kotlin:kotlin-maven-plugin:1.1.51:test-compile (execution:
test-compile, phase: test-compile)

当我尝试“自动修复”错误时,我看到了这个:

No marketplace entries found to handle kotlin-maven-plugin:1.1.51:test-
compile in Eclipse. Please see Help for more information.

enter image description here

这是我的 POM:

<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/main/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/test/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
</plugin>

Eclipse 中的错误

enter image description here

最佳答案

尝试

Quick Fix -> Mark goal compile as ignore in pom.xml

如果来自标记列表,则选择两个阶段:compile & test-compile。在弹出窗口中,快速修复仅显示两行标题分别为 pom.xml 和行号,检查两者。

它会让你开始阻止:

   <pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only.
It has no influence on the Maven build itself.-->
...

只是为了强调阅读 block 中的评论:它不会影响 Maven 构建

如果快速修复失败,下面是我设法生成的整个插件管理部分。

<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<versionRange>[1.1.60,)</versionRange>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>

关于java - 生命周期配置未涵盖的插件执行 : org. jetbrains.kotlin :kotlin-maven-plugin:1. 1.51:test-compile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47269567/

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