在使用maven打包时,出现以下错误
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project flow-traffic-statistics: Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.apache.maven.surefire:surefire-junit-platform:jar:2.22.2: Failed to retrieve POM for org.apache.maven.surefire:surefire-junit-platform:jar:2.22.2: Could not transfer artifact org.apache.maven.surefire:surefire-junit-platform:pom:2.22.2 from/to central (https://repo.maven.apache.org/maven2): Remote host closed connection during handshake
解决办法如下,在pom.xml中build节点添加以下内容
在执行Maven打包过程中遇到Surefire插件的依赖解析失败,具体表现为无法从中央仓库下载surefire-junit-platform的POM文件,导致构建中断。解决方案是在pom.xml的build节点添加配置,以忽略特定网络问题。

被折叠的 条评论
为什么被折叠?



