<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.treblereel.gwt.xml.mapper</groupId>
    <artifactId>mapper-parent</artifactId>
    <version>0.5</version>
    <packaging>pom</packaging>

    <name>mapper-parent</name>
    <description>XML marshallers</description>
    <url>https://github.com/treblereel</url>

    <developers>
        <developer>
            <id>treblereel</id>
            <name>Dmitrii Tikhomirov</name>
            <email>chani.liet@gmail.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Treblereel</name>
        <url>https://github.com/treblereel</url>
    </organization>

    <scm>
        <url>https://github.com/treblereel/mapper-xmll</url>
        <developerConnection>scm:git:git@github.com:treblereel/mapper-xml.git</developerConnection>
        <connection>scm:git:git://github.com/treblereel/mapper-xml.git</connection>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>

        <maven.compiler.version>3.8.0</maven.compiler.version>
        <maven.source.version>3.2.1</maven.source.version>
        <maven.fmt.plugin>2.9</maven.fmt.plugin>
        <maven.license.plugin>3.0</maven.license.plugin>
        <maven.shade.plugin>3.2.4</maven.shade.plugin>
        <maven.deploy.plugin>2.8.2</maven.deploy.plugin>
        <maven.gpg.plugin>1.6</maven.gpg.plugin>
        <maven.javadoc.plugin>3.2.0</maven.javadoc.plugin>
        <maven.source.plugin>3.2.1</maven.source.plugin>
        <maven.j2cl.plugin>0.18-SNAPSHOT</maven.j2cl.plugin>
        <maven.release.plugin>2.5.3</maven.release.plugin>
        <maven.surfire.plugin>3.0.0-M1</maven.surfire.plugin>

        <nexus.staging.maven.plugin>1.6.8</nexus.staging.maven.plugin>
        <maven.scm.provider.gitexe>1.9.5</maven.scm.provider.gitexe>

        <elemental2.version>1.1.0</elemental2.version>
        <j2cl.version>0.9-SNAPSHOT</j2cl.version>
        <javax.annotation.api.version>1.3.1</javax.annotation.api.version>
        <javaparser.core.version>3.13.1</javaparser.core.version>
        <apache.commons.lang3.version>3.9</apache.commons.lang3.version>
        <junit.version>4.13.1</junit.version>

        <com.fasterxml.woodstox.version>6.2.1</com.fasterxml.woodstox.version>
        <auto.common.version>0.11</auto.common.version>
        <auto.service.version>1.0-rc6</auto.service.version>
    </properties>

    <modules>
        <module>common</module>
        <module>backend</module>
        <module>api</module>
        <module>processor</module>
        <module>tests</module>
    </modules>

    <dependencyManagement>


        <dependencies>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>${javax.annotation.api.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.elemental2</groupId>
                <artifactId>elemental2-core</artifactId>
                <version>${elemental2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.elemental2</groupId>
                <artifactId>elemental2-dom</artifactId>
                <version>${elemental2.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.auto</groupId>
                <artifactId>auto-common</artifactId>
                <version>${auto.common.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.auto.service</groupId>
                <artifactId>auto-service</artifactId>
                <version>${auto.service.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${apache.commons.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.javaparser</groupId>
                <artifactId>javaparser-core</artifactId>
                <version>${javaparser.core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.woodstox</groupId>
                <artifactId>woodstox-core</artifactId>
                <version>${com.fasterxml.woodstox.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${maven.license.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>com.coveo</groupId>
                    <artifactId>fmt-maven-plugin</artifactId>
                    <version>${maven.fmt.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven.deploy.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven.shade.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${maven.release.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus.staging.maven.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>com.vertispan.j2cl</groupId>
                    <artifactId>j2cl-maven-plugin</artifactId>
                    <version>${maven.j2cl.plugin}</version>
                </plugin>
            </plugins>


        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <header>LICENSE.header</header>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <skipExistingHeaders>true</skipExistingHeaders>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <excludes>
                        <exclude>.github/</exclude>
                        <exclude>**/README.md</exclude>
                        <exclude>**/LICENSE</exclude>
                        <exclude>**/LICENSE.header</exclude>
                        <exclude>**/AUTHORS</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/main/resources/**</exclude>
                        <exclude>**/war</exclude>
                        <exclude>**/pom.xml</exclude>
                        <exclude>**/.flattened-pom.xml</exclude>
                        <exclude>**/gwt-unitcache</exclude>
                        <exclude>**/src/test/java/org/treblereel/gwt/xml/mapper/client/tests/pmml/model/**</exclude>
                    </excludes>
                    <properties>
                        <year>${project.inceptionYear}</year>
                        <name>${project.organization.name}</name>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.coveo</groupId>
                <artifactId>fmt-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>${maven.scm.provider.gitexe}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- release profile to create sources, javadoc, and sign all artifacts before uploading -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- see http://central.sonatype.org/pages/working-with-pgp-signatures.html for more detail -->
                    <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>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- Specify that we will push snapshots and releases to sonatype's repos -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>vertispan</id>
            <name>vertispan</name>
            <url>https://repo.vertispan.com/gwt-snapshot/</url>
        </repository>
        <repository>
            <id>vertispan-releases</id>
            <name>Vertispan hosted artifacts-releases</name>
            <url>https://repo.vertispan.com/j2cl</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>vertispan-snapshots</id>
            <name>Vertispan Snapshots</name>
            <url>https://repo.vertispan.com/gwt-snapshot/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>
</project>