gpt4 book ai didi

java - spring工具套件插件执行未覆盖错误

转载 作者:行者123 更新时间:2023-12-01 09:58:24 24 4
gpt4 key购买 nike

我创建了一个 spring mvc 项目。但是 eclipse sts 显示错误。我创建的每个项目都会显示此错误。 screenshot

pom.xml 的此标记中显示错误

 <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>

这是错误。 see image for clarify

Plugin execution not covered by lifecycle configuration: 
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile)

CoreException: Could not calculate build plan: Plugin

org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies
could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1:
ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-
-plugin:pom:2.5.1 from https://repo.maven.apache.org/maven2 was cached in the
local repository, resolution will not be reattempted until the update interval
of central has elapsed or updates are forced. Original error: Could not transfer
artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to
central (https://repo.maven.apache.org/maven2): Network is unreachable: connect

我对sts和maven都是新手。我不确定这与sts或maven相关。我尝试了一些so类似的问题,但这些问题与不同的事情有关。但是这个错误仍然会来。你能帮我解决这个错误

最佳答案

确保将插件标签放在构建标签之间,如下所示:

<build>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</build>

如果您这样说并且问题仍然存在,那么显然这是一个连接问题。确保您有互联网连接,或者如果您位于代理后面,请在 m2 目录中配置setting.xml,如下所示:

<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<username>user</username>
<password>password</password>
<host>200.55.156.179(for example)</host>
<port>3128(for example)</port>
</proxy>

</proxies>

关于java - spring工具套件插件执行未覆盖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37008034/

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