我正在尝试通过eclipse设置maven项目,但它会抛出以下错误。
Multiple annotations found at this line:
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/
to central (https://repo.maven.apache.org/maven2): Connection refused: connect
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.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:3.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)
- Connection refused: connect
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile)
的pom.xml:
<project xmlns="maven.apache.org/POM/4.0.0"; xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/xsd/maven-4.0.0.xsd">; <modelVersion>4.0.0</modelVersion> <groupId>MavenRep</groupId> <artifactId>om.spring.learnings</artifactId> <version>0.0.1-SNAPSHOT</version> <name>SampleSpringBoot</name> </project>
以下是我的settings.xml
的settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host> myhostname</host>
<port>9080</port>
<username>xxx</username>
<password>xxxx</password>
<nonProxyHosts>80</nonProxyHosts>
</proxy>
</proxies>
</settings>