Skip to content

Instantly share code, notes, and snippets.

@batmat
Created February 24, 2011 16:41
Show Gist options
  • Save batmat/842413 to your computer and use it in GitHub Desktop.
Save batmat/842413 to your computer and use it in GitHub Desktop.
For the record, here is a working pom for a dead-simple webapp I just created using the standard maven archetype. Managed to deploy onto a JBoss-as-6 (community) freshly downloaded.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.batmat</groupId>
<artifactId>testdeploywebapp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>testdeploywebapp Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<jboss.version>6.0.0.Alpha9</jboss.version>
<cargo.plugin.version>1.0.6</cargo.plugin.version>
</properties>
<build>
<finalName>testdeploywebapp</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${cargo.plugin.version}</version>
<configuration>
<container>
<containerId>jboss6x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.logging>high</cargo.logging>
<cargo.servlet.port>8080</cargo.servlet.port>
<cargo.hostname>localhost</cargo.hostname>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>admin</cargo.remote.password>
</properties>
</configuration>
<deployer>
<type>remote</type>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<context>/${project.build.finalName}</context>
</properties>
<pingURL>http://localhost:8080/${project.build.finalName}/index.jsp</pingURL>
<pingTimeout>5000</pingTimeout>
</deployable>
</deployables>
</deployer>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-core-tools-jboss-deployer-5.1-and-onwards</artifactId>
<version>${cargo.plugin.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-profileservice-client</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment