【发布时间】:2023-03-26 01:45:01
【问题描述】:
尝试构建 maven 项目时,我的 pom.xml 中出现错误。这个插件的错误在这里:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
这是 Eclipse 显示的错误:
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:
2.3.2:compile (execution: default-compile, phase: compile)
- CoreException: Could not get the value for parameter compilerId for plugin execution default-compile:
PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not
be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 ():
ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven:maven-toolchain:jar:1.0:
ArtifactResolutionException: Failure to transfer org.apache.maven:maven-toolchain:pom:1.0 from http://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:maven-toolchain:pom:1.0 from/to central (http://
repo.maven.apache.org/maven2): The operation was cancelled.
【问题讨论】:
-
问题取决于传输失败者
Failure to transfer org.apache.maven:maven-toolchain:pom:1.0 from http://repo.maven.apache.org/。您在通过代理或类似的东西时遇到问题。首先解决您的连接问题。之后,只需删除本地存储库的内容。