2010-07-28 2 views
2

this page에서 Cargo Maven 플러그인이 GlassFish 3.x에 핫 원격 배포를 지원하지 않는다는 것을 알고 있었습니까? 내가 틀렸다면 어떻게 그러한 유형의 작업을 지원하도록 구성 할 수 있습니까?cargo-maven2-plugin을 사용하여 GlassFish를 빠르게 배포하는 방법은 무엇입니까?

아마 다른 플러그인을 사용해야합니까? "핫"모드에서 HTTP를 통해 GlassFish 원격 설치에 배포하고 싶습니다.

<plugin> 
    <artifactId>maven-antrun-plugin</artifactId> 
    <version>1.4</version> 
    <executions> 
    <execution> 
     <phase>package</phase> 
     <configuration> 
     <tasks> 
      <tempfile property="ant.temp-ear" deleteonexit="true" destdir="/tmp" /> 
      <copy 
      file="${project.build.directory}/${project.build.finalName}.${project.packaging}" 
      tofile="${ant.temp-ear}" verbose="true" /> 
      <exec executable="${glassfish.home}/glassfish/bin/asadmin" 
      failonerror="true"> 
      <arg value="--user=${glassfish.username}"/> 
      <arg value="--passwordfile=${glassfish.passwordfile}"/> 
      <arg value="--interactive=false"/> 
      <arg value="--host=${glassfish.host}"/> 
      <arg value="--port=${glassfish.adminport}"/> 
      <arg value="deploy"/> 
      <arg value="--force"/> 
      <arg value="--name=${project.artifactId}"/> 
      <arg value="${ant.temp-ear}"/> 
      </exec> 
     </tasks> 
     </configuration> 
     <goals> 
     <goal>run</goal> 
     </goals> 
    </execution> 
    </executions> 
</plugin> 

작품 완벽하게,하지만 asadmin (전체 글래스 피쉬, 나는 가정) mvn이 실행되는 동일한 시스템에 설치되어 있어야합니다 :

+0

"핫"모드 란 정확히 무엇을 의미합니까? –

+0

GlassFish가 작동 중이며 도메인이 이미 시작되었으며 응용 프로그램이 이미 있습니다. 다시 보내면됩니다. 그리고 GlassFish가이를 재배포합니다. – yegor256

답변

0

이것은 내가 지금까지 한 일이다.

Cargo 플러그인을 사용하여 동일한 작업을 수행 할 수 있습니까?

0

귀하의 질문에 대한 답변이 있습니까?

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 
      <configuration> 
       <container> 
        <containerId>glassfish3x</containerId> 
        <type>remote</type> 
       </container> 
       <configuration> 
        <type>runtime</type> 
        <properties> 
         <cargo.hostname>dev-server-01</cargo.hostname> 
         <cargo.servlet.port>8080</cargo.servlet.port> 
         <cargo.remote.username>user</cargo.remote.username> 
         <cargo.remote.password>pass</cargo.remote.password> 
         <cargo.glassfish.domain.name>domain-name</cargo.glassfish.domain.name> 
         <cargo.glassfish.adminPort>4848</cargo.glassfish.adminPort> 
        </properties> 
       </configuration> 
       <deployables> 
        <deployable> 
         <groupId>${project.groupId}</groupId> 
         <artifactId>${project.artifactId}</artifactId> 
         <type>war</type> 
        </deployable> 
       </deployables> 
      </configuration> 
      <dependencies> 
       <dependency> 
        <groupId>org.glassfish.main.deployment</groupId> 
        <artifactId>deployment-client</artifactId> 
        <version>3.1.2.2</version> 
       </dependency> 
      </dependencies> 
     </plugin> 
    </plugins> 
</build> 
관련 문제