2011-08-23 3 views
0

내가 통합 테스트를위한 글래스 피쉬 용기에 내 응용 프로그램을 배포하는화물 받는다는 플러그인을 사용하고는 :배포가 실패 할 때 Cargo Maven Plugin이 Infos 또는 경고가 아닌 오류를 생성하도록 강제하는 방법은 무엇입니까?

 <plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 

      <executions> 
      <execution> 
       <id>pre-integration-test</id> 
       <phase>pre-integration-test</phase> 
       <goals> 
       <goal>redeploy</goal> 
       </goals> 
      </execution> 
      </executions> 

      <configuration> 
      <container> 
       <containerId>glassfish3x</containerId> 
       <home>${glassfish.home}</home>     
      </container> 

      <configuration> 
       <properties> 
       <cargo.servlet.port>8081</cargo.servlet.port> 
       <cargo.glassfish.adminPort>4849</cargo.glassfish.adminPort> 
       <cargo.remote.username>${domain.username}</cargo.remote.username> 
       <cargo.remote.password>${domain.password}</cargo.remote.password> 
       <cargo.glassfish.domain.name>domain1</cargo.glassfish.domain.name> 
       </properties> 
      </configuration> 

      <deployer> 
       <type>installed</type> 
       <deployables> 
       <deployable> 
        <groupId>de.rwth.swc.xam</groupId> 
        <artifactId>${project.artifactId}</artifactId> 
        <type>ear</type> 
       </deployable> 
       </deployables> 
      </deployer> 
      </configuration> 
     </plugin> 

통합 테스트는 허드슨에 의해 실행된다. 배포가 (이유에 관계없이) 실패하는 경우 는화물 플러그인은 다음과 같이 단지 경고를 생성합니다

[INFO] [talledLocalContainer] Deprecated syntax, instead use: 
[INFO] [talledLocalContainer] asadmin --interactive=false --port 4849 --user admin -passwordfile /opt/glassfishv3/.hudson/jobs/XAM Test.Setup.Application/workspace/target/cargo/configurations/glassfish3x/password.properties deploy [options] ... 
[WARNING] [talledLocalContainer] remote failure: Error occurred during deployment: Application with name de.rwth.swc.xam.tests.ear-0.0.1-SNAPSHOT is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name. Please see server.log for more details. 
[INFO] [talledLocalContainer] Command deploy failed. 

문제는,이 sucessfull되고, 따라서 다른 빌드 트리거 빌드 결과 있음.

배포 명령이 실패하면화물에 정보가 아닌 빌드 오류가 발생하도록 강제 할 수 있습니까?

답변

0

Maven 2 Plugin의 출처에 따르면, 다음과 같이 보이지 않습니다. 그러나 우리는 그것이 유용 할 수 있기 때문에 그것에 관한 문제를 제기해야한다고 생각합니다.

+0

개선 티켓을 만들었습니다. http://jira.codehaus.org/browse/CARGO-1032 – Matthias

관련 문제