在下载Maven依赖项时,出现以下错误
Plugin org.springframework.boot:spring-boot-maven-plugin:2.1.7.RELEASE or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:2.1.7.RELEASE:
Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:2.1.7.RELEASE from/to mdcm
(https://nexuscimgmt.sgp.dbs.com:8443/nexus/repository/MDCM): unexpected end of stream on Connection
{nexuscimgmt.sgp.dbs.com:8443, proxy=HTTP @ bcproxy.sgp.dbs.com/10.5.1.26:8080 hostAddress=10.5.1.26 cipherSuite=none protocol=http/1.1}
(recycle count=0): \n not found: size=0 content=... -> [Help 1]
[ERROR]
我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.7.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.dbs</groupId>
<artifactId>credit-card</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>credit-card</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>mdcm</id>
<url>https://nexuscimgmt.sgp.dbs.com:8443/nexus/repository/MDCM</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>central</id>
<url>https://nexuscimgmt.sgp.dbs.com:8443/nexus/content/repositories/dbsrepo</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>mirror</id>
<url>https://nexuscimgmt.sgp.dbs.com:8443/nexus/repository/TDIN_RMT</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mdcm</id>
<url>https://nexuscimgmt.sgp.dbs.com:8443/nexus/repository/MDCM</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
答案 0 :(得分:0)
如果您的nexus服务器已连接到Internet,请确保正确配置了Maven Central的代理。有关如何设置代理的文档,请参见this页。
如果nexus服务器未连接到Internet,则必须在项目中使用所有工件之前,将所有工件手动上传到nexus存储库。