2011-04-14 6 views
0

tomcat 7.10 이상을 사용하기 위해 기존 maven 애플리케이션을 업그레이드하려고합니다.cargo-maven2-plugin에서 사용할 core.cargo.version을 지정하는 방법

7.8에서 cargo-maven2-plugin을 사용하여 tomcat 컨테이너를 시작하고 webapp를 배포하면 정상적으로 작동합니다. 7.10에이 위

오류와 함께 실패합니다

[WARNING] [talledLocalContainer] 14/04/2011 12:21:43 PM org.apache.tomcat.util.digester.Digester startElement 
[WARNING] [talledLocalContainer] SEVERE: Begin event threw exception 
[WARNING] [talledLocalContainer] java.lang.ClassNotFoundException: org.apache.catalina.mbeans.ServerLifecycleListener 

이이 라이브러리가 7.9에서 바람둥이에서 제거되었다는 사실하지만 난 여전히이 라이브러리를 지정하는 것입니다 사용하고화물의 버전 때문이다 그것은 server.xml 구성입니다.

버그

은 내가 사용해야 받는다는화물 (또는 더 구체적으로화물 maven2-플러그인)의 버전을 강제하는 방법을 해결하려고 노력하고화물 1.1.0 ( http://jira.codehaus.org/browse/CARGO-923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel)

에서 수정되었습니다.

내 pom.xml 파일의 관련 부분은 다음과 같습니다

<plugin> 
    <groupId>org.codehaus.cargo</groupId> 
    <artifactId>cargo-maven2-plugin</artifactId> 
    <version>1.0.6</version> 
    <configuration> 
     <container> 
      <containerId>tomcat7x</containerId> 
      <zipUrlInstaller> 
       <url>http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.12/bin/apache-tomcat-7.0.12.zip</url> 
       <installDir>${user.home}/java/cargo/</installDir> 
      </zipUrlInstaller> 
     </container> 
     <configuration> 
      <properties> 
       <cargo.logging>low</cargo.logging> 
       <cargo.servlet.port>8280</cargo.servlet.port> 
      </properties> 
     </configuration> 
    </configuration> 
    <executions> 
     <execution> 
      <phase>install</phase> 
      <goals> 
       <goal>start</goal> 
      </goals> 
     </execution> 
    </executions> 
</plugin> 

문제는이 항상화물 maven2-플러그인 버전 번호를 통해화물 1.6을 사용하는 것입니다. mvnrepository를 확인하면 사용 가능한 최신 버전입니다 (그리고 고장났습니다).

configuration-> properties 섹션에서 core.cargo.version을 지정하려고해도 아무런 차이가없는 것 같습니다.

아이디어가 있으십니까?

+0

하지 않는 것 같습니다 수 릴리스보다는 야간 스냅 샷을 사용하므로 문제를 해결할 수 있습니다. –

+0

더 업데이트하려면 위의 지침을 사용하여이 구성을 작동 시켰습니다. (동일한 문제가있는 다른 사람을 위해) 주목할 가치가있는 변경 사항은 " true"블록을 "plugin-> configuration"블록에 넣어야합니다. 그걸 시작한 후에는 즉시 바람둥이를 폐쇄하지 않는다는 것입니다. –

답변

1

나는이 티켓이 낡았지만 대답은 그것을 여는 다른 누군가에게 유용 할 수 있음을 알고 있습니다.

pom.xml의 플러그인 정의에 직접 종속성을 지정하여 다음 샘플 에서처럼 플러그인 종속성의 버전을 대체 할 수 있습니다. cargo-maven2-plugin의 버전은 1.4.10이며 대신 1.4.11을 사용하기 위해 일부 종속성의 버전을 대체합니다. 여기의 지침을 사용하여이 작업을 얻을 "종류"(http://cargo.codehaus.org/Maven2+Plugin+Installation)하지만 좋은 방법으로 같은 추가 검색에

<plugin> 
    <groupId>org.codehaus.cargo</groupId> 
    <artifactId>cargo-maven2-plugin</artifactId> 
    <version>1.4.10</version> 
    <configuration> 
     <container> 
      <containerId>tomcat7x</containerId> 
     </container> 
    </configuration> 
    <executions> 
     <execution> 
      <id>run</id> 
      <goals> 
       <goal>start</goal> 
      </goals> 
      <phase>pre-integration-test</phase> 
     </execution> 
     <execution> 
      <id>finish</id> 
      <goals> 
       <goal>stop</goal> 
      </goals> 
      <phase>post-integration-test</phase> 
     </execution> 
    </executions> 
    <dependencies> 
     <dependency> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-core-api-generic</artifactId> 
      <version>1.4.11</version> 
     </dependency> 
     <dependency> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-documentation</artifactId> 
      <version>1.4.11</version> 
     </dependency> 
     <dependency> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-daemon-client</artifactId> 
      <version>1.4.11</version> 
     </dependency> 
     <dependency> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-core-api-container</artifactId> 
      <type>test-jar</type> 
      <version>1.4.11</version> 
     </dependency> 
    </dependencies> 
</plugin> 
관련 문제