一、前言
eclipse配置通过运行tomcat插件命令“tomcat:run -Dmaven.tomcat.port=8086 ”启动服务,直接报“[ERROR] No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/liuhaolai/library/repository_pinyougou), central (https://repo.maven.apache.org/maven2)] -> [Help 1]”错误异常。
[ERROR] No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/liuhaolai/library/repository_pinyougou), central (https://repo.maven.apache.org/maven2)] -> [Help 1]@b@[ERROR] @b@[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.@b@[ERROR] Re-run Maven using the -X switch to enable full debug logging.@b@[ERROR] @b@[ERROR] For more information about the errors and possible solutions, please read the following articles:@b@[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
二、解决方法
如下图,勾掉离线模式,运行自动下载插件依赖包后,可以正常运行服务
[INFO] Scanning for projects...@b@[INFO] @b@[INFO] ------------------------------------------------------------------------@b@[INFO] Building Unnamed - com.asc:xwood-gw:war:3.6.0-SNAPSHOT 3.6.0-SNAPSHOT@b@[INFO] ------------------------------------------------------------------------@b@[INFO] @b@[INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ xwood-gw ---@b@[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!@b@[INFO] Copying 3 resources@b@[INFO] @b@[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ xwood-gw ---@b@[INFO] Nothing to compile - all classes are up to date@b@[INFO] @b@[INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ xwood-gw ---@b@[INFO] Running war on http://localhost:8086/xwood-gw@b@[INFO] Creating Tomcat server configuration at D:\svnProject\xwood\xwood-gw\target\tomcat@b@十二月 11, 2023 11:47:08 下午 org.apache.catalina.startup.Embedded start@b@信息: Starting tomcat server@b@十二月 11, 2023 11:47:08 下午 org.apache.catalina.core.StandardEngine start@b@信息: Starting Servlet Engine: Apache Tomcat/6.0.29@b@log4j:ERROR Could not find value for key log4j.appender.@b@log4j:ERROR Could not instantiate appender named "".@b@十二月 11, 2023 11:47:08 下午 org.apache.coyote.http11.Http11Protocol init@b@信息: Initializing Coyote HTTP/1.1 on http-8086@b@十二月 11, 2023 11:47:08 下午 org.apache.coyote.http11.Http11Protocol start@b@信息: Starting Coyote HTTP/1.1 on http-8086