在使用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进行项目打包时遇到的错误及其解决办法。错误表现为无法获取依赖信息并导致测试阶段失败。解决方案是在pom.xml文件的build节点下添加特定配置。
1900

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



