2010-07-13 6 views
2

J'essaie cargo maven2-plugin, mais je ne déploie pas dans jboss5x I pom.xml estComment utiliser cargo-maven2-plugin pour déployer jboss as5?

<plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 
      <version>1.0.2</version> 
      <configuration> 
       <container> 
        <containerId>jboss51x</containerId> 
        <home>E:\JavaWorkingTools\JBoss\jboss-5.1.0.GA</home> 
        <log>${basedir}/target/jboss5.1.x.logs/cargo.log</log> 
        <timeout>300000</timeout> <!-- 5 minutes --> 
        <systemProperties> 
         <jboss.server.log.threshold>INFO</jboss.server.log.threshold> 
        </systemProperties> 
       </container> 
       <configuration> 
        <type>existing</type> 
        <home>${project.build.directory}/target/jboss51x</home> 
        <properties> 
         <cargo.jvmargs>-XX:PermSize=512m -XX:MaxPermSize=1024 
          -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled 
          -XX:+CMSClassUnloadingEnabled</cargo.jvmargs> 
        </properties> 
       </configuration> 
       <deployer> 
        <type>installed</type> 
        <deployables> 
         <deployable> 
          <groupId>${project.groupId}</groupId> 
          <artifactId>${project.artifactId}</artifactId> 
          <type>war</type> 

          <!-- 
           <pingURL>http://localhost:8080/${artifactId}</pingURL> 
           <pingTimeout>300000</pingTimeout> 
          --> 
          <pingURL>http://localhost:8080/${project.artifactId}/index.jsp</pingURL> 
          <properties> 
           <context>/${project.artifactId}</context> 
          </properties> 
         </deployable> 
        </deployables> 
       </deployer> 
      </configuration> 
      <executions> 
       <execution> 
        <id>start-container</id> 
        <phase>pre-integration-test</phase> 
        <goals> 
         <goal>start</goal> 
        </goals> 
       </execution> 
       <execution> 
        <id>stop-container</id> 
        <phase>post-integration-test</phase> 
        <goals> 
         <goal>stop</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 

Je dirige une cargaison: deployer démarrage ou cargodeployer-Deploy est une erreur

cargaison: deployer démarrage message d'erreur:

Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.2:deployer-start (default-cli) on project SSH2Maven: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.0.2:deployer-start failed: Not supported -> [Help 1] 

et cargodeployer déployer

The Deployable state is thus unknown. -> 

J'ai lu un Deploying to a running container mais je ne sais pas comment depoly webapp dans jboss5 :(

Répondre

2

Il y a quelque chose d'étrange avec votre configuration. Puisque vous utilisez un conteneur existant installé, je m'attendrais à voir le chemin vers sa maison, pas vers un répertoire sous la cible. Voici une configuration que je utilise:

<plugin> 
    <groupId>org.codehaus.cargo</groupId> 
    <artifactId>cargo-maven2-plugin</artifactId> 
    <version>1.0.2</version> 
    <configuration> 
     <container> 
     <containerId>jboss51x</containerId> 
     <append>false</append> 
     <log>${project.build.directory}/logs/jboss51x.log</log> 
     <output>${project.build.directory}/logs/jboss51x.out</output> 
     <timeout>300000</timeout><!-- 5 minutes --> 
     </container> 
     <configuration> 
     <type>existing</type> 
     <home>/path/to/jboss-5.1.0.GA</home> 
     <properties> 
      <cargo.servlet.port>8080</cargo.servlet.port> 
      <cargo.jboss.configuration>default</cargo.jboss.configuration> 
      <cargo.rmi.port>1099</cargo.rmi.port> 
      <cargo.logging>high</cargo.logging> 
     </properties> 
     <deployables> 
      <!-- application to deploy --> 
      <deployable> 
      <groupId>${project.groupId}</groupId> 
      <artifactId>myapp</artifactId> 
      <type>war</type> 
      <!-- 
      <properties> 
       <context>acontext</context> 
      </properties> 
      --> 
      </deployable> 
     </deployables> 
     </configuration> 
    </configuration> 
    </plugin> 
+0

si la première exécution cargaison: démarrage conteneur en cours d'exécution et la deuxième cargaison d'exécution: deployer déployer le déploiement WebApp dans Jboss et adresse dernière entrée http: // localhost: 8080/myapp/index.jsp, vous pouvez visiter? J'ai suivi les étapes ci-dessus, le navigateur apparaît 404 – EdwardLau

+0

chemin d'accès J'utilise le chemin absolu – EdwardLau

Questions connexes