记录:因为今天手贱一下,把junit包下4.10删除了,本来以为会自动下载回来的(因为我使用的maven工程)

 

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.pinyougou:pinyougou-content-service:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.tomcat.maven:tomcat7-maven-plugin is missing. @ com.pinyougou:pinyougou-content-service:[unknown-version], F:\pinyougouProject\pinyougou-parent\pinyougou-content-service\pom.xml, line 92, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] --------------< com.pinyougou:pinyougou-content-service >---------------
[INFO] Building pinyougou-content-service 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ pinyougou-content-service >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pinyougou-content-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ pinyougou-content-service ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ pinyougou-content-service <<<
[INFO] 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ pinyougou-content-service ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.448 s
[INFO] Finished at: 2019-10-03T16:47:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project pinyougou-content-service: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run failed: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.2 -> org.apache.tomcat.maven:common-tomcat-maven-plugin:jar:2.2 -> org.apache.maven:maven-project:jar:2.2.1 -> org.apache.maven:maven-settings:jar:2.2.1 -> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 -> junit:junit:jar:4.10: Failed to read artifact descriptor for junit:junit:jar:4.10: Could not transfer artifact junit:junit:pom:4.10 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): Cannot access http://maven.aliyun.com/nexus/content/groups/public/ with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access http://maven.aliyun.com/nexus/content/groups/public/ using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.wagon.Wagon
[ERROR]   roleHint: http
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
 

 

 

如果显示junit:junit:jar:4.10: Failed to read artifact descriptor for junit:junit:jar:4.10,到你maven创库中看看有没有

eclipse使用tomcat插件出现异常Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (de

记得进去看看是不是空文件夹(因为我这个是个空文件夹,本以为会自动下载好的)

eclipse使用tomcat插件出现异常Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (de

因为我的没有下载成功,从新下载一次

下载后

eclipse使用tomcat插件出现异常Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (de

重新运行项目

eclipse使用tomcat插件出现异常Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (de

eclipse使用tomcat插件出现异常Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (de

 

运行成功了,希望对你们有帮助

 

相关文章: