2016-09-16 10 views
0

GitHub에서 오픈 소스 프로젝트를 배우려고합니다. github project link 다중 모듈 프로젝트와 그것에 대해 mvn clean install 성공적으로 실행할 수 있습니다. 그러나 문제는 mvn tomcat7:deploy을 사용하여 배포 할 때 오류가 발생합니다.이 유형의 프로젝트를 로컬로 설치하고 어떻게 성공적으로 배포 할 수 있는지 설명하십시오. 아래 --->mvn tomcat7 : deploy goal failed Tomcat manager를 호출 할 수 없습니다 : Connection refused

mvn tomcat7:deploy 
[INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------ 
[INFO] Reactor Build Order: 
[INFO] 
[INFO] com.zuoxiaolong.blog:everyone-java-blog 
[INFO] com.zuoxiaolong.blog:blog-common 
[INFO] com.zuoxiaolong.blog:blog-model 
[INFO] com.zuoxiaolong.blog:blog-dao 
[INFO] com.zuoxiaolong.blog:blog-service 
[INFO] com.zuoxiaolong.blog:blog-api 
[INFO] com.zuoxiaolong.blog:blog-sdk 
[INFO] com.zuoxiaolong.blog:blog-web 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building com.zuoxiaolong.blog:everyone-java-blog 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ everyone-java-blog >>> 
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ everyone-java-blog <<< 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ everyone-java-blog --- 
[INFO] Skipping non-war project 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building com.zuoxiaolong.blog:blog-common 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ blog-common >>> 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ blog-common --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/yogesh/Documents/everyone-java-blog-master/blog-common/src/main/resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ blog-common --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ blog-common --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/yogesh/Documents/everyone-java-blog-master/blog-common/src/test/resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ blog-common --- 
[INFO] No sources to compile 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ blog-common --- 
[INFO] No tests to run. 
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ blog-common --- 
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ blog-common <<< 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ blog-common --- 
[INFO] Skipping non-war project 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building com.zuoxiaolong.blog:blog-model 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ blog-model >>> 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ blog-model --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/yogesh/Documents/everyone-java-blog-master/blog-model/src/main/resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ blog-model --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ blog-model --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/yogesh/Documents/everyone-java-blog-master/blog-model/src/test/resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ blog-model --- 
[INFO] No sources to compile 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ blog-model --- 
[INFO] No tests to run. 
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ blog-model --- 
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ blog-model <<< 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ blog-model --- 
[INFO] Skipping non-war project 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building com.zuoxiaolong.blog:blog-dao 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ blog-dao >>> 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ blog-dao --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 12 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ blog-dao --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ blog-dao --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 2 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ blog-dao --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ blog-dao --- 
[INFO] Surefire report directory: /home/yogesh/Documents/everyone-java-blog-master/blog-dao/target/surefire-reports 

------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 

Results : 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ blog-dao --- 
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ blog-dao <<< 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ blog-dao --- 
[INFO] Skipping non-war project 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building com.zuoxiaolong.blog:blog-service 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ blog-service >>> 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ blog-service --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 2 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ blog-service --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ blog-service --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 1 resource 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ blog-service --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ blog-service --- 
[INFO] Surefire report directory: /home/yogesh/Documents/everyone-java-blog-master/blog-service/target/surefire-reports 

------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 

Results : 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ blog-service --- 
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ blog-service <<< 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ blog-service --- 
[INFO] Skipping non-war project 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building com.zuoxiaolong.blog:blog-api 1.0.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ blog-api >>> 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ blog-api --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] Copying 5 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ blog-api --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ blog-api --- 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory /home/yogesh/Documents/everyone-java-blog-master/blog-api/src/test/resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ blog-api --- 
[INFO] No sources to compile 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ blog-api --- 
[INFO] No tests to run. 
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ blog-api --- 
[INFO] Packaging webapp 
[INFO] Assembling webapp [blog-api] in [/home/yogesh/Documents/everyone-java-blog-master/blog-api/target/java-blog-api] 
[INFO] Processing war project 
[INFO] Copying webapp resources [/home/yogesh/Documents/everyone-java-blog-master/blog-api/src/main/webapp] 
[INFO] Webapp assembled in [45 msecs] 
[INFO] Building war: /home/yogesh/Documents/everyone-java-blog-master/blog-api/target/java-blog-api.war 
[INFO] WEB-INF/web.xml already added, skipping 
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ blog-api <<< 
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ blog-api --- 
[INFO] Deploying war to http://localhost:8080/java-blog-api 
[INFO] ------------------------------------------------------------------------ 
[INFO] Reactor Summary: 
[INFO] 
[INFO] com.zuoxiaolong.blog:everyone-java-blog ............ SUCCESS [ 0.334 s] 
[INFO] com.zuoxiaolong.blog:blog-common ................... SUCCESS [ 0.415 s] 
[INFO] com.zuoxiaolong.blog:blog-model .................... SUCCESS [ 0.032 s] 
[INFO] com.zuoxiaolong.blog:blog-dao ...................... SUCCESS [ 0.455 s] 
[INFO] com.zuoxiaolong.blog:blog-service .................. SUCCESS [ 0.178 s] 
[INFO] com.zuoxiaolong.blog:blog-api ...................... FAILURE [ 0.862 s] 
[INFO] com.zuoxiaolong.blog:blog-sdk ...................... SKIPPED 
[INFO] com.zuoxiaolong.blog:blog-web ...................... SKIPPED 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2.591 s 
[INFO] Finished at: 2016-09-16T10:36:13+05:30 
[INFO] Final Memory: 23M/264M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project blog-api: Cannot invoke Tomcat manager: Connection refused -> [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 
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command 
[ERROR] mvn <goals> -rf :blog-api 

답변

0

당신은 바람둥이 플러그인의 구성으로 보면 바람둥이 오류에 다음과 같은 속성이 설정됩니다. 같은 속성을 갖고 있습니까? 예를 들어 TOMCAT이 8081을 듣고 있습니까? 또는 다른 포트에 있습니다.

 <plugins> 
      <plugin> 
       <groupId>org.apache.tomcat.maven</groupId> 
       <artifactId>tomcat7-maven-plugin</artifactId> 
       <configuration> 
        <path>/</path> 
        <port>8081</port> 
        <uriEncoding>UTF-8</uriEncoding> 
        <contextReloadable>true</contextReloadable> 
       </configuration> 
      </plugin> 
     </plugins> 
+0

당신은 블로그-API에 모듈이 https://github.com/xiaolongzuo/everyone-java-blog/blob/master/blog-을 볼 수있는 구성이 8082 8082로 설정되어 볼 가면 api/pom.xml –

+0

프로젝트를 잘 분석하고 오류에서 어떻게 복구 할 수 있는지 알려주십시오. –