<?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>

    <!-- ====================================================================== -->
    <!-- P A R E N T  P R O J E C T  D E S C R I P T I O N                      -->
    <!-- ====================================================================== -->
    <parent>
        <groupId>com.avionos.aem.modellist</groupId>
        <artifactId>aem-model-list</artifactId>
        <version>0.1.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <!-- ====================================================================== -->
    <!-- P R O J E C T  D E S C R I P T I O N                                   -->
    <!-- ====================================================================== -->
    <artifactId>aem-model-list.ui.apps</artifactId>
    <packaging>content-package</packaging>
    <name>aem-model-list - UI apps</name>
    <description>UI apps package for aem-model-list</description>

    <!-- <scm>
        <connection></connection>
        <developerConnection></developerConnection>
        <url></url>
        <tag>HEAD</tag>
    </scm-->

    <!-- ====================================================================== -->
    <!-- B U I L D   D E F I N I T I O N                                        -->
    <!-- ====================================================================== -->
    <build>
        <sourceDirectory>src/main/content/jcr_root</sourceDirectory>
        <resources>
            <!-- define the resources that will go into the package -->
            <resource>
                <directory>${basedir}/src/main/content/jcr_root</directory>
                <excludes>
                    <!-- exclude .vlt control files in the package -->
                    <exclude>**/.vlt</exclude>
                    <exclude>**/.vltignore</exclude>
                    <exclude>**/.gitignore</exclude>
                    <exclude>**/*.iml</exclude>
                    <exclude>**/.classpath</exclude>
                    <exclude>**/.project</exclude>
                    <exclude>**/.settings</exclude>
                    <exclude>**/.DS_Store</exclude>
                    <exclude>**/target/**</exclude>
                    <exclude>**/pom.xml</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <!--
                we want to keep some of the META-INF files and not configure
                everything in the plugin (mainly the filters).

                copy the resource explicitly instead of attaching it to the default resources
            -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <!-- ensure that the empty directories are copied -->
                <configuration>
                    <includeEmptyDirs>true</includeEmptyDirs>
                </configuration>
            </plugin>

            <!-- ====================================================================== -->
            <!-- V A U L T   P A C K A G E   P L U G I N                                -->
            <!-- ====================================================================== -->
            <plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
                    <verbose>true</verbose>
                    <failOnError>true</failOnError>
                    <group>aem-model-list</group>
                    <embeddeds>
                        <embedded>
                            <groupId>com.avionos.aem.modellist</groupId>
                            <artifactId>aem-model-list.api</artifactId>
                            <target>/apps/aem-model-list/install</target>
                        </embedded>
                    </embeddeds>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>htl-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!-- ====================================================================== -->
    <!-- D E P E N D E N C I E S                                                -->
    <!-- ====================================================================== -->
    <dependencies>
        <dependency>
            <groupId>com.avionos.aem.modellist</groupId>
            <artifactId>aem-model-list.api</artifactId>
            <version>0.1.0</version>
        </dependency>

        <dependency>
            <groupId>com.adobe.aem</groupId>
            <artifactId>uber-jar</artifactId>
            <classifier>apis</classifier>
        </dependency>

        <dependency>
            <groupId>javax.jcr</groupId>
            <artifactId>jcr</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.day.cq.wcm</groupId>
            <artifactId>cq-wcm-taglib</artifactId>
        </dependency>
    </dependencies>
</project>
