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

时间:2017-11-13 16:54:13

标签: java maven spring-boot m2eclipse

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

evaluator

当我尝试"自动修复"错误我看到了这个:

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

enter image description here

这是我的POM:

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

Eclipse中的错误

enter image description here

1 个答案:

答案 0 :(得分:2)

尝试

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

选择两个阶段:compile& test-compile如果来自Markers列表。在弹出窗口中,快速修复仅显示标题为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.-->
      ...

只是强调读取块中的注释:它不会影响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>