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

    <modelVersion>4.0.0</modelVersion>
    <groupId>eu.european-language-grid</groupId>
    <artifactId>elg-java-bindings</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>Java bindings for ELG JSON messages</name>
    <url>https://www.european-language-grid.eu</url>
    <description>Java POJO classes representing the various JSON messages defined for the APIs of the European Language Grid, for use with the Jackson databinding library.</description>
    <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>
            <id>i.roberts</id>
            <name>Ian Roberts</name>
            <organization>University of Sheffield</organization>
            <organizationUrl>https://gate.ac.uk</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://gitlab.com/european-language-grid/platform/elg-apis.git</connection>
        <developerConnection>scm:git:ssh://git@gitlab.com/european-language-grid/platform/elg-apis.git</developerConnection>
        <url>https://gitlab.com/european-language-grid/platform/elg-apis/-/tree/master/java</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <name>Sonatype OSS staging</name>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
            <layout>default</layout>
        </repository>
        <snapshotRepository>
            <id>gate.snapshots</id>
            <name>GATE Snapshots Repository</name>
            <url>https://repo.gate.ac.uk/content/repositories/snapshots</url>
            <layout>default</layout>
        </snapshotRepository>
    </distributionManagement>

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

    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.9.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <version>2.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-text</artifactId>
                        <version>1.7</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>${project.basedir}/src/main/script/GenerateStandardMessages.groovy</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>native2ascii-maven-plugin</artifactId>
                <version>2.0.1</version>
                <executions>
                    <execution>
                        <id>utf8-to-latin1</id>
                        <goals>
                            <goal>inplace</goal>
                        </goals>
                        <phase>process-resources</phase><!-- default -->
                        <configuration>
                            <dir>${project.build.outputDirectory}</dir><!-- must be set -->
                            <encoding>${project.build.sourceEncoding}</encoding><!-- default -->
                            <includes>
                                <include>**/*.properties</include><!-- default -->
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>gpg-sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
