<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>example-internal-rls-parent</artifactId>
		<groupId>org.mobicents.servers.sippresence</groupId>
		<version>1.0.0.CR1</version>
	</parent>

	<artifactId>example-internal-rls-du</artifactId>

	<dependencies>
		<dependency>
			<artifactId>example-internal-rls-sbb</artifactId>
			<groupId>${pom.groupId}</groupId>
			<version>${pom.version}</version>
		</dependency>
	</dependencies>

	<!-- we will restrict the example du build and install to a non maven-release 
		profile, to not install it when doing a release -->

	<profiles>
		<profile>
			<id>maven-release</id>
			<!-- empty profile -->
		</profile>
		<profile>
			<id>not-maven-release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.mobicents.tools</groupId>
						<artifactId>maven-du-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>copy-dependencies</goal>
									<goal>generate-descriptor</goal>
									<goal>generate-ant-management-script</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>deploy-DU</id>
								<phase>install</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<copy overwrite="true" file="target/${project.build.finalName}.jar" todir="${jboss.home}/server/${node}/deploy" />
									</tasks>
								</configuration>
							</execution>
							<execution>
								<id>undeploy-DU</id>
								<phase>clean</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<delete file="${jboss.home}/server/${node}/deploy/${project.build.finalName}.jar" />
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>