<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.servlet.sip.example</groupId>
		<artifactId>jslee-sips-interop-demo-sips-parent</artifactId>
		<version>1.2</version>
	</parent>
	<artifactId>jslee-sips-interop-demo-sips-ear</artifactId>
	<packaging>ear</packaging>
	<name>SIPS EAR of the JSLEE-SIPS Demo</name>
	<dependencies>
		<!-- j2ee dependencies -->
		<dependency>
			<groupId>org.jboss.seam</groupId>
			<artifactId>jboss-seam</artifactId>
			<version>${jboss-seam.version}</version>
			<exclusions>
				<exclusion>
					<groupId>jboss</groupId>
					<artifactId>javassist</artifactId>
				</exclusion>
				<exclusion>
					<groupId>dom4j</groupId>
					<artifactId>dom4j</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.jboss.el</groupId>
					<artifactId>jboss-el</artifactId>
				</exclusion>
			</exclusions>
			<type>ejb</type>
		</dependency>

		<dependency>
			<groupId>org.jboss.seam</groupId>
			<artifactId>jboss-el</artifactId>
			<version>${jboss-el.version}</version>
			<exclusions>
				<exclusion>
					<groupId>javax.el</groupId>
					<artifactId>el-api</artifactId>
				</exclusion>
			</exclusions>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.7.0</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>org.mobicents.servlet.sip.example</groupId>
			<artifactId>
				jslee-sips-interop-demo-sips-business
			</artifactId>
			<version>1.2-SNAPSHOT</version>
			<type>ejb</type>
		</dependency>
		<dependency>
			<groupId>org.mobicents.servlet.sip.example</groupId>
			<artifactId>jslee-sips-interop-demo-sips-web</artifactId>
			<version>1.2</version>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-commons-annotations</artifactId>
			<version>${hibernate-common-annotations.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.hibernate</groupId>
					<artifactId>hibernate</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.persistence</groupId>
					<artifactId>persistence-api</artifactId>
				</exclusion>
			</exclusions>
			<type>jar</type>
		</dependency>					
	</dependencies>
	<build>
		<finalName>jslee-sips</finalName>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-ear-plugin</artifactId>
				<configuration>
					<modules>						
						<jarModule>
							<groupId>org.hibernate</groupId>
							<artifactId>
								hibernate-commons-annotations
							</artifactId>
							<bundleDir>lib</bundleDir>
						</jarModule>
						<jarModule>
							<groupId>org.jboss.seam</groupId>
							<artifactId>jboss-el</artifactId>
							<bundleDir>lib</bundleDir>
						</jarModule>
						<jarModule>
							<groupId>commons-beanutils</groupId>
							<artifactId>commons-beanutils</artifactId>
							<bundleDir>lib</bundleDir>
						</jarModule>
						<webModule>
							<groupId>
								org.mobicents.servlet.sip.example
							</groupId>
							<artifactId>
								jslee-sips-interop-demo-sips-web
							</artifactId>
							<contextRoot>/jslee-sips</contextRoot>
						</webModule>
						<ejbModule>
							<groupId>
								org.mobicents.servlet.sip.example
							</groupId>
							<artifactId>
								jslee-sips-interop-demo-sips-business
							</artifactId>
						</ejbModule>
						<ejbModule>
							<groupId>org.jboss.seam</groupId>
							<artifactId>jboss-seam</artifactId>
						</ejbModule>
					</modules>
					<jboss>
						<version>4.2</version>
						<loader-repository>seam.jboss.org:loader=/jslee-sips</loader-repository>
						<module-order>implicit</module-order>
					</jboss>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<configuration>
							<tasks>
								<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${env.JBOSS_HOME}/server/default/deploy" />
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>	
		</plugins>
	</build>
</project>
