gpt4 book ai didi

maven-2 - 未找到 m2e 生命周期映射

转载 作者:行者123 更新时间:2023-12-03 05:45:09 27 4
gpt4 key购买 nike

我正在尝试使用解决方案 described here当我放置以下插件时,解决烦人的“生命周期配置未涵盖插件执行:org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source(执行:默认,阶段:生成源)”在我的 pom.xml 上:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>src/bootstrap/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

但是当我运行 mvn clean install 时,我得到了这个:

原因:在存储库中找不到 POM 'org.eclipse.m2e:lifecycle-mapping':无法从任何存储库下载 Artifact

有人知道如何让 m2e 和 Maven 满意吗?

最佳答案

org.eclipse.m2e:lifecycle-mapping插件实际上并不存在。它应该从 <build><pluginManagement> 使用您的pom.xml部分。这样,它就不会被 Maven 解析,但可以被 m2e 读取。

但是解决您的问题的更实用的解决方案是在 eclipse 中安装 m2e build-helper 连接器。您可以从 Window 安装它> Preferences > Maven > Discovery > Open Catalog 。那样build-helper-maven-plugin:add-sources将在 Eclipse 中调用,而无需您更改 pom.xml .

关于maven-2 - 未找到 m2e 生命周期映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7409823/

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