<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>
		<artifactId>converged-demo-parent</artifactId>
		<groupId>org.mobicents.examples.converged</groupId>
		<version>2.2.0.FINAL</version>
	</parent>
	
	<artifactId>converged-demo-pojo-pu</artifactId>
	<name>Mobicents Servers Examples :: Converged :: ${pom.artifactId}</name>
	
	<dependencies>
		<dependency>
         	<groupId>org.hibernate</groupId>
         	<artifactId>hibernate-annotations</artifactId>
         </dependency>
         <dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-search</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.seam</groupId>
			<artifactId>jboss-seam</artifactId>
		</dependency>
	</dependencies>
	
	<build>
		<finalName>ShoppingDemo</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-dependency-jar</id>
						<phase>install</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>${pom.groupId}</groupId>
									<artifactId>converged-demo-pojo-pu</artifactId>
									<version>${pom.version}</version>
									<type>jar</type>
									<overWrite>true</overWrite>
									<outputDirectory>
										${project.build.directory}
									</outputDirectory>
									<destFileName>
										converged-demo-pojo-pu.jar
									</destFileName>
								</artifactItem>

							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>deploy-datasource</id>
						<phase>install</phase>
						<goals>
							<goal>run</goal>
						</goals>
						
						<configuration>
							<tasks>
								<copy overwrite="true" verbose="true" file="datasource/ShoppingDemo-dev-ds.xml" toDir="${jboss.home}/server/${node}/deploy" />
								<copy overwrite="true" file="${project.build.directory}/converged-demo-pojo-pu.jar" todir="${jboss.home}/server/${node}/deploy" />
							</tasks>
						</configuration>
					</execution>
					<execution>
						<id>undeploy-datasource</id>
						<phase>clean</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>							
								<delete file="${jboss.home}/server/${node}/deploy/converged-demo-pojo-pu.jar" />
								<delete file="${jboss.home}/server/${node}/deploy/ShoppingDemo-dev-ds.xml" />
							</tasks>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	
</project>