<?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>
        <artifactId>http-servlet-parent</artifactId>
        <groupId>org.mobicents.resources</groupId>
        <version>2.8.85</version>
    </parent>
	
    <artifactId>http-servlet-war</artifactId>
    <packaging>war</packaging>
    <name>Restcomm :: Resources :: ${project.artifactId}</name>
	
    <build>
        <!-- this defines the name of the servlet to be deployed -->
        <finalName>${servlet-name}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>deploy-war</id>
                        <phase>install</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <copy overwrite="true" verbose="true" file="target/${project.build.finalName}.war" toDir="${jboss.home}/server/${node}/deploy" />
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>undeploy-war</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <delete file="${jboss.home}/server/${node}/deploy/${project.build.finalName}.war" />
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
	
</project>