<?xml version="1.0" encoding="UTF-8"?>
<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>
	<parent>
		<groupId>org.mobicents.servers.media</groupId>
		<artifactId>mms-controllers</artifactId>
		<version>2.0.0.BETA2</version>
	</parent>

	<artifactId>mms-controllers-mgcp</artifactId>
	<name>Mobicents Media Server MGCP Controller</name>

	<!-- properties>
		<maven.test.skip>true</maven.test.skip>
	</properties -->

	<dependencies>
		<dependency>
			<groupId>jain</groupId>
			<artifactId>jain-mgcp-ri</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.12</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>${pom.groupId}</groupId>
			<artifactId>mms-spi</artifactId>
			<version>${pom.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.mobicents.jain</groupId>
			<artifactId>mobicents-mgcp-impl</artifactId>
			<version>2.0.0.RC4</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.microcontainer</groupId>
			<artifactId>jboss-kernel</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss</groupId>
			<artifactId>jboss-test</artifactId>
			<version>1.0.5.GA</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<artifactId>mms-impl</artifactId>
			<groupId>${pom.groupId}</groupId>
			<version>${pom.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.java.stun4j</groupId>
			<artifactId>stun4j</artifactId>
			<version>1.0.MOBICENTS</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>mgcp-controller-service</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>
							src/main/assemble/descriptor.xml
						</descriptor>
					</descriptors>
					<appendAssemblyId>false</appendAssemblyId>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id><!-- this is used for inheritance merges -->
						<phase>package</phase><!-- append to the packaging phase. -->
						<goals>
							<goal>directory-inline</goal><!-- goals == mojos -->
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>deploy</id>
						<phase>install</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<condition property="jboss.dir" value="${jboss.home}" else="${env.JBOSS_HOME}">
									<isset property="jboss.home" />
								</condition>
								<copy todir="${jboss.home}/server/${node}/deploy/mobicents-media-server/${build.finalName}.sar">
									<fileset dir="target/${build.finalName}.dir/${build.finalName}">
									</fileset>
								</copy>
							</tasks>
						</configuration>
					</execution>
					<execution>
						<id>undeploy</id>
						<phase>clean</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<delete dir="${env.JBOSS_HOME}/server/${node}/deploy/mobicents-media-server/${build.finalName}.sar" />
							</tasks>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.4.2</version>
				<configuration>
					<forkMode>pertest</forkMode>
					<!-- So we dont have to juse xxxTest.java.bak "_" -->
					<!-- 
						<excludes>
						<exclude>**/TestCircle.java</exclude>
						<exclude>**/TestSquare.java</exclude>
						</excludes>
						<includes>
						<include>Sample.java</include>
						</includes>
					-->
				</configuration>

			</plugin>
		</plugins>
	</build>
</project>
