<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>smpp-extensions-parent</artifactId>
		<groupId>io.bitbucket.supportomateinc.smpp</groupId>
		<version>7.2.0</version>
		<relativePath>../../pom.xml</relativePath>
	</parent>

	<artifactId>ui-management</artifactId>

	<name>RestComm SMPP Server :: Management :: UI :: ${project.artifactId}</name>
	<packaging>war</packaging>

	<properties>
	</properties>

	<build>
		<finalName>smpp-management</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>deploy-module-jboss5</id>
			<build>
				<finalName>smpp-management</finalName>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>deploy</id>
								<phase>install</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<echo>
											${jboss.home}server/default/deploy
										</echo>
										<copy file="${project.build.directory}/smpp-management.war" todir="${jboss.home}/server/${node}/deploy" />
									</tasks>
								</configuration>
							</execution>
							<execution>
								<id>undeploy</id>
								<phase>clean</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<delete failonerror="false" file="${jboss.home}/server/${node}/deploy/smpp-management.war" />
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy-module-wildfly</id>
			<build>
				<finalName>smpp-management</finalName>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>deploy</id>
								<phase>install</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<echo>
											${jboss.home}server/default/deploy
										</echo>
										<copy file="${project.build.directory}/smpp-management.war" todir="${jboss.home}/standalone/deployments" />
									</tasks>
								</configuration>
							</execution>
							<execution>
								<id>undeploy</id>
								<phase>clean</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<delete failonerror="false" file="${jboss.home}/standalone/deployments/smpp-management.war" />
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
