为了账号安全,请及时绑定邮箱和手机立即绑定

如何解决Spring数据Maven构建的“生命周期配置未涵盖的插件执行”问题

如何解决Spring数据Maven构建的“生命周期配置未涵盖的插件执行”问题

HUH函数 2019-06-05 16:36:34
如何解决Spring数据Maven构建的“生命周期配置未涵盖的插件执行”问题我想和你一起工作Spring数据与Neo4j..我一开始就是想跟着本指南链接到主站点。尤其是基于“你好,世界!”示例文件..下面是导致这些问题的插件的片段。<plugin><!-- Required to resolve aspectj-enhanced class features -->     <groupId>org.codehaus.mojo</groupId>     <artifactId>aspectj-maven-plugin</artifactId>     <version>1.0</version>     <configuration>         <outxml>true</outxml>         <aspectLibraries>             <aspectLibrary>                 <groupId>org.springframework</groupId>                 <artifactId>spring-aspects</artifactId>             </aspectLibrary>             <aspectLibrary>                 <groupId>org.springframework.data</groupId>                 <artifactId>spring-data-neo4j</artifactId>             </aspectLibrary>         </aspectLibraries>         <source>1.6</source>         <target>1.6</target>     </configuration>     <executions>         <!-- ERROR HERE IN ECLIPSE SEE BELOW FOR FULL MESSAGE -->         <execution>             <goals>                 <goal>compile</goal>                 <goal>test-compile</goal>             </goals>         </execution>     </executions>     <dependencies>         <dependency>             <groupId>org.aspectj</groupId>             <artifactId>aspectjrt</artifactId>             <version>${aspectj.version}</version>         </dependency>         <dependency>             <groupId>org.aspectj</groupId>             <artifactId>aspectjtools</artifactId>             <version>${aspectj.version}</version>         </dependency>     </dependencies></plugin>我看到的错误是: Multiple annotations found at this line:     - Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:     compile (execution: default, phase: process-classes)     - Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:     test-compile (execution: default, phase: process-classes)我正在运行Eclipse3.6.2和M2E0.13。我不是一个Maven专家,所以如果可能的话,请对你的答案做很好的解释。我也试过M2E 1.0.0通孔此更新站点仍然会犯同样的错误。
查看完整描述

3 回答

?
慕容森

TA贡献1853条经验 获得超18个赞

在我的例子中,类似的问题,而不是使用安德鲁的建议,修复,它只是在我介绍了简单的工作。<pluginManagement>标记到所讨论的put.xml。看起来这个错误是由于缺少了一个<pluginManagement>标记。因此,为了避免Eclipse中的异常,只需将所有插件标记封装在<pluginManagement>标签,就像这样:

<build>
    <pluginManagement>
        <plugins>
            <plugin> ... </plugin>
            <plugin> ... </plugin>
                  ....        </plugins>
    </pluginManagement></build>

一旦这个结构就位,错误就消失了。


查看完整回答
反对 回复 2019-06-05
?
扬帆大鱼

TA贡献1799条经验 获得超9个赞

建议的解决办法EclipseM2E文档:

  1. 使用快速修复中的误差柚木并选择Permanently mark goal run in pom.xml as ignored in Eclipse build-这将为您生成所需的样板代码。

  2. 若要指示Eclipse在构建过程中运行插件,只需替换<ignore/>带标签<execute/>在生成的配置中标记:

    <action>
        <execute/></action>

    或者,您也可以指示Eclipse在增量构建上运行插件:

    <action>
        <execute>
            <runOnIncremental>true</runOnIncremental>
        </execute ></action>


查看完整回答
反对 回复 2019-06-05
  • 3 回答
  • 0 关注
  • 829 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信