<?xml version="1.0" encoding="UTF-8"?>
<!--

    ==========================================================================================
    =                   JAHIA'S DUAL LICENSING - IMPORTANT INFORMATION                       =
    ==========================================================================================

                                    http://www.jahia.com

        Copyright (C) 2002-2022 Jahia Solutions Group SA. All rights reserved.

        THIS FILE IS AVAILABLE UNDER TWO DIFFERENT LICENSES:
        1/Apache2 OR 2/JSEL

        1/ Apache2
        ==================================================================================

        Copyright (C) 2002-2022 Jahia Solutions Group SA. All rights reserved.

        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.


        2/ JSEL - Commercial and Supported Versions of the program
        ===================================================================================

        IF YOU DECIDE TO CHOOSE THE JSEL LICENSE, YOU MUST COMPLY WITH THE FOLLOWING TERMS:

        Alternatively, commercial and supported versions of the program - also known as
        Enterprise Distributions - must be used in accordance with the terms and conditions
        contained in a separate written agreement between you and Jahia Solutions Group SA.

        If you are unsure which license is appropriate for your use,
        please contact the sales department at sales@jahia.com.

-->
<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">
    <parent>
        <groupId>org.jahia.server</groupId>
        <artifactId>jahia-root</artifactId>
        <version>8.1.3.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jahia.modules</groupId>
    <artifactId>jahia-modules</artifactId>
    <name>Jahia Modules</name>
    <packaging>pom</packaging>

    <properties>
        <jahia-depends>default</jahia-depends>
        <jahia-depends-skip-require-capability />
        <jahia-module-type>module</jahia-module-type>
        <jahia-static-resources>/css,/icons,/images,/img,/javascript</jahia-static-resources>
        <skip.git.commit.info>false</skip.git.commit.info>
        <embed-dependency>*; scope=compile|runtime; type=!pom; inline=false</embed-dependency>
        <require-capability />
        <jahia-key />
        <sourcesRoot>${project.basedir}</sourcesRoot>
        <dockerSourcesRoot>/data/digital-factory-data/sources/</dockerSourcesRoot>
    </properties>

    <repositories>
        <repository>
            <id>jahia-public</id>
            <name>Jahia Public Repository</name>
            <url>https://devtools.jahia.com/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <!--Cross project dependencies-->
        <dependency>
            <groupId>org.jahia.server</groupId>
            <artifactId>jahia-impl</artifactId>
            <version>8.1.3.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jahia.server</groupId>
            <artifactId>jahia-taglib</artifactId>
            <version>8.1.3.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
            <version>3.0.1</version>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>eclipse-integration</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-eclipse-plugin</artifactId>
                        <version>${eclipse.plugin.version}</version>
                        <configuration>
                            <wtpversion>1.5</wtpversion>
                            <additionalProjectnatures>
                                <projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
                                <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
                                <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature>
                            </additionalProjectnatures>
                            <additionalBuildcommands>
                                <buildCommand>
                                    <name>org.eclipse.wst.common.project.facet.core.builder</name>
                                    <arguments />
                                </buildCommand>
                                <buildCommand>
                                    <name>org.eclipse.wst.validation.validationbuilder</name>
                                    <arguments />
                                </buildCommand>
                            </additionalBuildcommands>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>all-templates-docs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>stage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>module-docs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>docker</id>
            <properties>
                <sourcesRoot>${dockerSourcesRoot}${project.artifactId}</sourcesRoot>
            </properties>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${enforcer.plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.0.3,)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[1.7,)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>4.0.0</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- see https://github.com/git-commit-id/git-commit-id-maven-plugin/blob/v4.0.0/maven/docs/using-the-plugin.md for configuration options -->
                <configuration>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <prefix>git</prefix>
                    <verbose>false</verbose>
                    <gitDescribe>
                        <skip>false</skip>
                        <always>false</always>
                        <dirty>-dirty</dirty>
                    </gitDescribe>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                    <failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
                    <skip>${skip.git.commit.info}</skip>
                    <excludeProperties>
                        <excludeProperty>git.user.*</excludeProperty>
                    </excludeProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Category>jahia-module</Bundle-Category>

                        <Implementation-Title>${project.name}</Implementation-Title>
                        <Implementation-Version>${project.version}</Implementation-Version>
                        <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
                        <Implementation-URL>${project.organization.url}</Implementation-URL>
                        <Specification-Title>${project.name}</Specification-Title>
                        <Specification-Version>${project.version}</Specification-Version>
                        <Specification-Vendor>${project.organization.name}</Specification-Vendor>

                        <!-- Git maven plugin manifest attributes -->
                        <!-- see https://github.com/git-commit-id/git-commit-id-maven-plugin/blob/v4.0.0/maven/docs/using-the-plugin.md#generated-properties for available properties -->

                        <Git-last-commit-id>${git.commit.id}</Git-last-commit-id>
                        <Git-last-commit-time>${git.commit.time}</Git-last-commit-time>
                        <Git-branch>${git.branch}</Git-branch>
                        <Git-commit-desc>${git.commit.message.full}</Git-commit-desc>

                        <!-- Jahia manifest attributes -->
                        <Jahia-Depends>${jahia-depends}</Jahia-Depends>
                        <Jahia-Depends-Skip-Require-Capability>${jahia-depends-skip-require-capability}</Jahia-Depends-Skip-Require-Capability>
                        <Jahia-Module-Type>${jahia-module-type}</Jahia-Module-Type>
                        <Jahia-Key>${jahia-key}</Jahia-Key>
                        <Jahia-GroupId>${project.groupId}</Jahia-GroupId>
                        <Jahia-Source-Folders>${sourcesRoot}</Jahia-Source-Folders>
                        <Jahia-Source-Control-Connection>${project.scm.connection}</Jahia-Source-Control-Connection>
                        <Jahia-Source-Control-DeveloperConnection>${project.scm.developerConnection}</Jahia-Source-Control-DeveloperConnection>
                        <Jahia-Source-Control-Tag>${project.scm.tag}</Jahia-Source-Control-Tag>
                        <Jahia-Download-Sources-Available>${jahia-download-sources-available}</Jahia-Download-Sources-Available>
                        <Jahia-Required-Version>${jahia.version}</Jahia-Required-Version>
                        <Jahia-Static-Resources>${jahia-static-resources}</Jahia-Static-Resources>
                        <Jahia-Private-App-Store>${jahia-private-app-store}</Jahia-Private-App-Store>
                        <Jahia-Deploy-On-Site>${jahia-deploy-on-site}</Jahia-Deploy-On-Site>
                        <Jahia-Block-Edit-Mode>${jahia-block-edit-mode}</Jahia-Block-Edit-Mode>
                        <Jahia-Signature>${jahia-module-signature}</Jahia-Signature>
                        <Export-Package>${export-package}</Export-Package>
                        <Import-Package>${jahia.plugin.projectPackageImport},*</Import-Package>
                        <Provide-Capability>${jahia.plugin.providedNodeTypes}${jahia.plugin.providedModulesCapabilities}</Provide-Capability>
                        <Require-Capability>${jahia.plugin.requiredNodeTypes}${jahia.plugin.requiredModulesCapabilities},${require-capability}</Require-Capability>
                        <Embed-Dependency>${embed-dependency}</Embed-Dependency>
                        <Embed-Transitive>true</Embed-Transitive>
                        <Dynamic-ImportPackage>*</Dynamic-ImportPackage>
                        <_removeheaders>${jahia.modules.bundle.removeheaders}</_removeheaders>
                        <_noimportjava>true</_noimportjava>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jahia.server</groupId>
                <artifactId>jahia-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jahia-version</id>
                        <goals>
                            <goal>jahia-version</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>native2ascii</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <includes>resources/*.properties</includes>
                            <defaultPropertiesFileLocale>en</defaultPropertiesFileLocale>
                        </configuration>
                    </execution>
                    <execution>
                        <id>package-imports</id>
                        <goals>
                            <goal>package-imports</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>prepare-package-dependencies</id>
                        <goals>
                            <goal>dependencies</goal>
                        </goals>
                        <configuration>
                            <contentDefinitionCapabilitiesActivated>true</contentDefinitionCapabilitiesActivated>
                        </configuration>
                        <phase>prepare-package</phase>
                    </execution>
                    <execution>
                        <id>verify-package-dependencies</id>
                        <goals>
                            <goal>check-dependencies</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>calculate-gitbuildnumber</id>
                        <phase />
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <releaseProfiles>do-attach-javadocs,aggregate-javadocs,no-source-folders</releaseProfiles>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
