<!--
 |  Copyright 2019 Adobe Systems Incorporated
 |
 |  Licensed under the Apache License, Version 2.0 (the "License");
 |  you may not use this file except in compliance with the License.
 |  You may obtain a copy of the License at
 |
 |      http://www.apache.org/licenses/LICENSE-2.0
 |
 |  Unless required by applicable law or agreed to in writing, software
 |  distributed under the License is distributed on an "AS IS" BASIS,
 |  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 |  See the License for the specific language governing permissions and
 |  limitations under the License.
-->
<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.adobe.aem</groupId>
        <artifactId>aem-modernize-tools</artifactId>
        <version>2.0.6</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-modernize-tools.all</artifactId>
    <packaging>content-package</packaging>
    <name>AEM Modernize Tools - All</name>
    <description>All content package for AEM Modernize Tools</description>

    <!-- ====================================================================== -->
    <!-- B U I L D   D E F I N I T I O N                                        -->
    <!-- ====================================================================== -->
    <build>
        <plugins>

            <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>
                <executions>
                    <execution>
                        <id>auto-clean</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
<!--expose rule for extension-->
<!--release-->
<!--video-->
<!--documentation links and release-->

    <!-- ====================================================================== -->
    <!-- P R O F I L E S                                                        -->
    <!-- ====================================================================== -->
    <profiles>
        <profile>
            <id>aemCloudService</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.jackrabbit</groupId>
                        <artifactId>filevault-package-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <group>com.adobe.aem</group>
                            <packageType>container</packageType>
                            <!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
                            <skipSubPackageValidation>true</skipSubPackageValidation>
                            <embeddeds>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.core</artifactId>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                            </embeddeds>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.adobe.aem</groupId>
                        <artifactId>aemanalyser-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>analyse-project</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>project-analyse</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.core</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                    <version>${project.version}</version>
                    <type>zip</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                    <version>${project.version}</version>
                    <type>zip</type>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>aem65</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.jackrabbit</groupId>
                        <artifactId>filevault-package-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <group>com.adobe.aem</group>
                            <packageType>container</packageType>
                            <!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
                            <skipSubPackageValidation>true</skipSubPackageValidation>
                            <classifier>aem65</classifier>
                            <embeddeds>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                                    <classifier>aem65</classifier>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.core</artifactId>
                                    <classifier>aem65</classifier>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                                    <classifier>aem65</classifier>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                            </embeddeds>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.day.jcr.vault</groupId>
                        <artifactId>content-package-maven-plugin</artifactId>
                        <configuration>
                            <packageFile>target/${project.artifactId}-${project.version}-aem65.zip</packageFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.core</artifactId>
                    <version>${project.version}</version>
                    <classifier>aem65</classifier>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                    <version>${project.version}</version>
                    <classifier>aem65</classifier>
                    <type>zip</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                    <version>${project.version}</version>
                    <classifier>aem65</classifier>
                    <type>zip</type>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>java8</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.jackrabbit</groupId>
                        <artifactId>filevault-package-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <group>com.adobe.aem</group>
                            <packageType>container</packageType>
                            <!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
                            <skipSubPackageValidation>true</skipSubPackageValidation>
                            <classifier>java8</classifier>
                            <embeddeds>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                                    <classifier>java8</classifier>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.core</artifactId>
                                    <classifier>java8</classifier>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                                    <classifier>java8</classifier>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                            </embeddeds>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.day.jcr.vault</groupId>
                        <artifactId>content-package-maven-plugin</artifactId>
                        <configuration>
                            <packageFile>target/${project.artifactId}-${project.version}-java8.zip</packageFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.core</artifactId>
                    <version>${project.version}</version>
                    <classifier>java8</classifier>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                    <version>${project.version}</version>
                    <classifier>java8</classifier>
                    <type>zip</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                    <version>${project.version}</version>
                    <classifier>java8</classifier>
                    <type>zip</type>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>java8aem65</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.jackrabbit</groupId>
                        <artifactId>filevault-package-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <group>com.adobe.aem</group>
                            <packageType>container</packageType>
                            <!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
                            <skipSubPackageValidation>true</skipSubPackageValidation>
                            <classifier>java8aem65</classifier>
                            <embeddeds>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                                    <classifier>java8aem65</classifier>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.core</artifactId>
                                    <classifier>java8aem65</classifier>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                                <embedded>
                                    <groupId>com.adobe.aem</groupId>
                                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                                    <classifier>java8aem65</classifier>
                                    <type>zip</type>
                                    <target>/apps/aem-modernize-packages/application/install</target>
                                </embedded>
                            </embeddeds>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.day.jcr.vault</groupId>
                        <artifactId>content-package-maven-plugin</artifactId>
                        <configuration>
                            <packageFile>target/${project.artifactId}-${project.version}-java8aem65.zip</packageFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.core</artifactId>
                    <version>${project.version}</version>
                    <classifier>java8aem65</classifier>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.apps</artifactId>
                    <version>${project.version}</version>
                    <classifier>java8aem65</classifier>
                    <type>zip</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.aem</groupId>
                    <artifactId>aem-modernize-tools.ui.config</artifactId>
                    <version>${project.version}</version>
                    <classifier>java8aem65</classifier>
                    <type>zip</type>
                </dependency>
            </dependencies>
        </profile>
        <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>

</project>
