美文网首页
maven编译时报错No plugin found for pr

maven编译时报错No plugin found for pr

作者: 葡小萄家的猫 | 来源:发表于2017-09-18 08:33 被阅读1618次

    使用maven编译时报错

    [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] 
    [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/NoPluginFoundForPrefixException
    
    Snip20170917_3.png

    更改方式在pom.xml加入maven的配置文件

    <build>     
        <plugins>           
            <!-- java编译插件 -->
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <!-- 指定端口 -->
                    <port>9101</port>
                    <!-- 请求路径 -->
                    <path>/</path>
                </configuration>                
            </plugin>
        </plugins>
    </build>

    相关文章

      网友评论

          本文标题:maven编译时报错No plugin found for pr

          本文链接:https://www.haomeiwen.com/subject/qkkmsxtx.html