报错信息:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project Spider: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.21.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.21.0 -> org.apache.maven.surefire:maven-surefire-common:jar:2.21.0 -> org.apache.maven:maven-core:jar:2.2.1 -> org.apache.maven.reporting:maven-reporting-api:jar:3.0: Failed to read artifact descriptor for org.apache.maven.reporting:maven-reporting-api:jar:3.0: Could not transfer artifact org.apache.maven.reporting:maven-reporting-api:pom:3.0 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public): Failed to transfer file: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.pom. Return code is: 504 , ReasonPhrase:Gateway Timeout. -> [Help 1]
错误原因:
.classpath配置文件错误
解决办法:
在项目上右键->properties->java build path->source->删掉里面的src/main/java和src/test/java配置, 然后点右侧的add folder重新添加
如图所示: