<!-- Copyright 2020 Across Systems GmbH -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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.elanion.aem.connector</groupId>
        <artifactId>com.elanion.aem.connector</artifactId>
        <version>2.0.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>com.elanion.aem.connector.all</artifactId>
    <packaging>content-package</packaging>
    <name>Elanion Translation Connector - All</name>
    <description>All content package for Elanion Translation Connector</description>

    <url>https://www.across.net/en/products/elanion</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Elanion Team</name>
            <email>greenwave@across.net</email>
            <organization>Across Systems GmbH</organization>
            <organizationUrl>https://www.across.net</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:local:https://Elanion@dev.azure.com/Elanion/Elanion/_git/JavaCmsConnector</connection>
        <developerConnection>scm:local:https://Elanion@dev.azure.com/Elanion/Elanion/_git/JavaCmsConnector</developerConnection>
        <url>https://dev.azure.com/Elanion/Elanion/_git/JavaCmsConnector</url>
    </scm>

    <!-- ====================================================================== -->
    <!-- B U I L D   D E F I N I T I O N                                        -->
    <!-- ====================================================================== -->
    <build>
        <plugins>
            <!-- ====================================================================== -->
            <!-- V A U L T   P A C K A G E   P L U G I N S                              -->
            <!-- ====================================================================== -->
            <plugin>
                <groupId>org.apache.jackrabbit</groupId>
                <artifactId>filevault-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <group>com.elanion.aem.connector</group>
                    <embeddeds>
                        <embedded>
                            <groupId>com.elanion.aem.connector</groupId>
                            <artifactId>com.elanion.aem.connector.ui.apps</artifactId>
                            <type>zip</type>
                            <target>/apps/elanion-translation-packages/application/install</target>
                        </embedded>
                        <embedded>
                            <groupId>com.elanion.aem.connector</groupId>
                            <artifactId>com.elanion.aem.connector.ui.content</artifactId>
                            <type>zip</type>
                            <target>/apps/elanion-translation-packages/content/install</target>
                        </embedded>
                    </embeddeds>
                    <subPackages>
                    </subPackages>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <verbose>true</verbose>
                    <failOnError>true</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <executions>
                    <execution>
                        <id>auto-clean</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- ====================================================================== -->
    <!-- P R O F I L E S                                                        -->
    <!-- ====================================================================== -->
    <profiles>
        <profile>
            <id>autoInstallSinglePackage</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.day.jcr.vault</groupId>
                        <artifactId>content-package-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-package</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
                                    <failOnError>true</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>autoInstallSinglePackagePublish</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.day.jcr.vault</groupId>
                        <artifactId>content-package-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>install-package-publish</id>
                                <goals>
                                    <goal>install</goal>
                                </goals>
                                <configuration>
                                    <targetURL>http://${aem.publish.host}:${aem.publish.port}/crx/packmgr/service.jsp
                                    </targetURL>
                                    <failOnError>true</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- ====================================================================== -->
    <!-- D E P E N D E N C I E S                                                -->
    <!-- ====================================================================== -->
    <dependencies>
        <dependency>
            <groupId>com.elanion.aem.connector</groupId>
            <artifactId>com.elanion.aem.connector.ui.apps</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>com.elanion.aem.connector</groupId>
            <artifactId>com.elanion.aem.connector.ui.content</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
    </dependencies>
</project>
