<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>async</artifactId>
        <groupId>org.glassfish.javaeetutorial</groupId>
        <version>7.0.6</version>
    </parent>

    <groupId>org.glassfish.javaeetutorial</groupId>
    <artifactId>async-war</artifactId>
    <packaging>war</packaging>
    <name>${project.artifactId}</name>
    <description>Session bean asynchronous method invocation example.</description>
    
    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>false</skip>
                    <executable>${glassfish.home}/bin/asadmin${glassfish.executables.suffix}</executable>
                    <successCodes>
                        <successCode>0</successCode>
                        <successCode>1</successCode>
                    </successCodes>
                    <arguments>
                        <argument>create-javamail-resource</argument>
                        <argument>--mailhost=localhost</argument>
                        <argument>--mailuser=jack</argument>
                        <argument>--fromaddress=jack@localhost</argument>
                        <argument>mail/myExampleSession</argument>
                    </arguments>
                </configuration>
            </plugin> 
        </plugins>
    </build>
</project>
