<?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>
    <artifactId>${project.parent.artifactId}-module</artifactId>
    <name>${project.parent.artifactId}-module</name>
    <packaging>ear</packaging>

    <parent>
        <groupId>fish.focus.uvms.plugins.rest.movement</groupId>
        <artifactId>flux-vesselposition-rest</artifactId>
        <version>1.8</version>
    </parent>

    <build>
        <finalName>${project.name}-${project.version}</finalName>
        <plugins>
            <!-- This configuration specifies what ends up in application.xml -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <modules>
                        <ejbModule>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.parent.artifactId}-service</artifactId>
                        </ejbModule>
                    </modules>
                    <skinnyWars>true</skinnyWars>
                    <archive>
                        <manifestEntries>
                            <Logging-Profile>flux-vesselposition-rest</Logging-Profile>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>  
            <artifactId>${project.parent.artifactId}-service</artifactId>
            <version>${project.version}</version>
            <type>ejb</type>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>wildfly-deploy</id>
            <build>
                <plugins>	
                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-flux-vesselposition-rest</artifactId>
                        <version>1.0-SNAPSHOT</version>
                        <configuration>
                            <filename>${project.build.finalName}.${project.packaging}</filename>
                            <targetDir>${project.build.directory}</targetDir>
                            <hostname>${hostname}</hostname>
                            <port>${port}</port>
                            <username>${username}</username>
                            <password>${password}</password>
                            <force>true</force>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>        
    </profiles>  

</project>
