maven工程的pom.xml 
tomcat7配置:
 
生成的插件:
 
deploy启动报错:
 
详细报错信息:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.554 s
[INFO] Finished at: 2017-07-01T12:41:00+08:00
[INFO] Final Memory: 17M/176M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project shiro: Cannot invoke Tomcat manager: Connection refused: connect -> [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/MojoExecutionException
Process finished with exit code 1
附:项目的maven已经配置
另外用tomcat部署可以启动。插件启动就报错。
=========综上==========
求大神帮忙                     

解决方案 »

  1.   

    <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <path>/shiro</path>
                        <port>8080</port>
                        <uriEncoding>UTF-8</uriEncoding>
                        <url>http://localhost:8080/shiro</url>
                        <server>Tomcat7</server>
                    </configuration>
                </plugin>            <!-- 编译插件 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>
            </plugins>我一般都是这样写的,你试试
      

  2.   

    有没有解决?我也遇到同样的问题
    idea2019.1.3
    jdk1.8
    tomcat7
      

  3.   

    各位!!!!!!!注意了!!!!!
    你们复制pom.xml文件的时候,  <artifactId>这个地方没有修改</artifactId>上放这个地方没有修改,导致冲突,所以部署的不是文件名这个项目!
      

  4.   

    如果你想直接启动,直接通过tomcat:run命令即可启动;
    如果你需要在本地tomcat启动,需要先启动tomcat,并且配置相关权限