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

    eXist-db Apps parent POM - Maven parent POM for eXist Apps
    Copyright © 2017 The eXist-db Authors (info@exist-db.org)

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; version 2.1.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

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

    <groupId>org.exist-db</groupId>
    <artifactId>exist-apps-parent</artifactId>
    <version>2.0.0</version>
    <packaging>pom</packaging>

    <name>eXist-db EXPath Package parent POM</name>
    <description>Maven parent POM for eXist-db EXPath Packages</description>
    <url>https://www.github.com/exist-db/exist-apps-parent</url>
    <inceptionYear>2017</inceptionYear>

    <organization>
        <name>The eXist-db Open Source project</name>
        <url>https://exist-db.org</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Lesser General Public License, version 2.1 only</name>
            <url>http://opensource.org/licenses/LGPL-2.1</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://www.github.com/exist-db/exist-apps-parent.git</url>
        <connection>scm:git:https://www.github.com/exist-db/exist-apps-parent.git</connection>
        <developerConnection>scm:git:https://www.github.com/exist-db/exist-apps-parent.git</developerConnection>
        <tag>2.0.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/eXist-db/exist-apps-parent/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>adamretter</id>
            <name>Adam Retter</name>
            <email>adam@evolvedbinary.com</email>
            <organization>Evolved Binary</organization>
            <organizationUrl>https://www.evolvedbinary.com</organizationUrl>
        </developer>
    </developers>

    <contributors>
	    <contributor>
            <name>Duncan Paterson</name>
        </contributor>
    </contributors>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.source>1.8</project.build.source>
        <project.build.target>1.8</project.build.target>

        <project.copyright.name>The eXist-db Authors</project.copyright.name>
        <contact.email>info@exist-db.org</contact.email>

        <package-title>${project.name}</package-title>
        <package-abbrev>${project.artifactId}</package-abbrev>
        <package-final-name>${project.artifactId}-${project.version}</package-final-name>

        <!-- other packages that the documentation (of apps) links to; their `abbrev` must match
        their expath-pkg.xml -->
        <documentation.pkg.abbrev>exist-documentation</documentation.pkg.abbrev>
        <dashboard.pkg.abbrev>dashboard</dashboard.pkg.abbrev>
        <demo.pkg.abbrev>demo</demo.pkg.abbrev>
        <fundocs.pkg.abbrev>fundocs</fundocs.pkg.abbrev>
        <exide.pkg.abbrev>eXide</exide.pkg.abbrev>
        <monex.pkg.abbrev>monex</monex.pkg.abbrev>
        <atomicwiki.pkg.abbrev>atomic-wiki</atomicwiki.pkg.abbrev>
    </properties>

    <dependencyManagement>
        <!-- Test dependencies -->
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.xmlunit</groupId>
                <artifactId>xmlunit-core</artifactId>
                <version>2.10.3</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>4.6</version>
                </plugin>
                <plugin>
                    <groupId>com.code54.mojo</groupId>
                    <artifactId>buildversion-plugin</artifactId>
                    <version>1.0.3</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xml-maven-plugin</artifactId>
                    <version>1.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.14.0</version>
                    <configuration>
                        <source>${project.build.source}</source>
                        <target>${project.build.target}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>ro.kuberam.maven.plugins</groupId>
                    <artifactId>kuberam-expath-plugin</artifactId>
                    <version>0.6.3</version>
                    <executions>
                        <execution>
                            <id>create-xar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>make-xar</goal>
                            </goals>
                            <configuration>
                                <descriptor>xar-assembly.xml</descriptor>
                                <finalName>${package-final-name}</finalName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Tag>${build-tag}</Build-Tag>
                                <Git-Commit>${build-commit}</Git-Commit>
                                <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                                <Git-Commit-Timestamp>${build-tstamp}</Git-Commit-Timestamp>
                                <Build-Version>${build-version}</Build-Version>
                                <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                                <Source-Repository>${project.scm.connection}</Source-Repository>
                                <Description>${project.description}</Description>
                                <Implementation-URL>${project.url}</Implementation-URL>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <!-- Attach source jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Tag>${build-tag}</Build-Tag>
                                <Git-Commit>${build-commit}</Git-Commit>
                                <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                                <Git-Commit-Timestamp>${build-tstamp}</Git-Commit-Timestamp>
                                <Build-Version>${build-version}</Build-Version>
                                <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                                <Source-Repository>${project.scm.connection}</Source-Repository>
                                <Description>${project.description}</Description>
                                <Implementation-URL>${project.url}</Implementation-URL>
                            </manifestEntries>
                        </archive>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Attach javadoc jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.2</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <source>${project.build.source}</source>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Build-Tag>${build-tag}</Build-Tag>
                                <Git-Commit>${build-commit}</Git-Commit>
                                <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                                <Git-Commit-Timestamp>${build-tstamp}</Git-Commit-Timestamp>
                                <Build-Version>${build-version}</Build-Version>
                                <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                                <Source-Repository>${project.scm.connection}</Source-Repository>
                                <Description>${project.description}</Description>
                                <Implementation-URL>${project.url}</Implementation-URL>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.8.0</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changes-plugin</artifactId>
                    <version>2.12.1</version>
                    <configuration>
                        <includeOpenIssues>false</includeOpenIssues>
                        <onlyMilestoneIssues>false</onlyMilestoneIssues>
                        <columnNames>Type, Summary</columnNames>
                        <outputDirectory>${project.basedir}</outputDirectory>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <headerDefinitions>
                        <headerDefinition>xquery-license-style.xml</headerDefinition>
                    </headerDefinitions>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                        <xconf>XML_STYLE</xconf>
                        <xq>XQUERY_STYLE</xq>
                        <xql>XQUERY_STYLE</xql>
                        <xqm>XQUERY_STYLE</xqm>
                        <xsl>XML_STYLE</xsl>
                        <xslt>XML_STYLE</xslt>
                    </mapping>
                    <licenseSets>
                        <licenseSet>
                            <header>com/mycila/maven/plugin/license/templates/LGPL-21-ONLY.txt</header>
                            <properties>
                                <owner>${project.copyright.name}</owner>
                                <organisation>${project.organization.name}</organisation>
                                <email>${contact.email}</email>
                                <url>${project.organization.url}</url>
                            </properties>
                            <excludes>
                                <exclude>.gitignore</exclude>
                                <exclude>.idea/</exclude>
                                <exclude>.mvn/</exclude>
                                <exclude>mvnw</exclude>
                                <exclude>mvnw.cmd</exclude>
                                <exclude>README.md</exclude>
                                <exclude>LICENSE</exclude>
                                <exclude>xquery-license-style.xml</exclude>
                                <exclude>xar-assembly.xml</exclude>
                            </excludes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.code54.mojo</groupId>
                <artifactId>buildversion-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>set-properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <configuration>
                    <useAgent>true</useAgent>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>${project.artifactId}-@{project.version}</tagNameFormat>
                    <releaseProfiles>exist-apps-parent-release</releaseProfiles>
                </configuration>
            </plugin>
        </plugins>

    </build>

    <profiles>
        <profile>
            <!-- NOTE(AR) This profile will be activated by the maven-release-plugin -->
            <id>exist-apps-parent-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <deploymentName>${project.artifactId}-${project.version}</deploymentName>
                            <failOnBuildFailure>true</failOnBuildFailure>
                            <waitUntil>validated</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>exist-db</id>
            <url>https://repo.evolvedbinary.com/repository/exist-db/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>github</id>
            <name>GitHub Registry for Snapshots</name>
            <url>https://maven.pkg.github.com/eXist-db/exist</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>clojars.org</id>
            <url>https://clojars.org/repo</url>
        </pluginRepository>
    </pluginRepositories>

</project>
