<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>eu.europa.ec.grow.espd</groupId>
    <artifactId>exchange-model2</artifactId>
    <packaging>jar</packaging>
    <version>2.0.0</version>

    <name>exchange-model</name>
    <description>The ESPD Exchange Data Model is the technical representation of the legal European Single Procurement
        Document. It is used to support interoperability between ESPD services provided all over Europe.
    </description>
    <url>https://github.com/ESPD/ESPD-EDM</url>

    <licenses>
        <license>
            <name>EUPL, Version 1.1</name>
            <url>https://joinup.ec.europa.eu/community/eupl/og_page/eupl</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Virgiliu Ratoi</name>
            <email>Virgiliu.RATOI@ext.ec.europa.eu</email>
            <organization>European Commission DG Growth</organization>
            <organizationUrl>http://ec.europa.eu/growth/</organizationUrl>
        </developer>
        <developer>
            <name>Alexey Lukashov</name>
            <email>Alexey.LUKASHOV@ext.ec.europa.eu</email>
            <organization>European Commission DG Growth</organization>
            <organizationUrl>http://ec.europa.eu/growth/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:ESPD/ESPD-EDM.git</connection>
        <developerConnection>scm:git:git@github.com:ESPD/ESPD-EDM.git</developerConnection>
        <url>git@github.com:ESPD/ESPD-EDM</url>
    </scm>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jaxb2-basics-runtime.version>1.11.1</jaxb2-basics-runtime.version>
    </properties>

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

    <dependencies>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>${jaxb2-basics-runtime.version}</version>
        </dependency>
        <!-- Consider using this if we want to override the JAXB runtime -->
        <!--<dependency>-->
        <!--<groupId>org.glassfish.jaxb</groupId>-->
        <!--<artifactId>jaxb-runtime</artifactId>-->
        <!--</dependency>-->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.13.2</version>
                <configuration>
                    <extension>true</extension>
                    <!-- Use the XSD files from the distribution package in the documentation folder instead of src/main/resources -->
                    <schemaDirectory>../docs/src/main/asciidoc/dist/xsdrt/maindoc</schemaDirectory>
                    <generateDirectory>src/main/generated</generateDirectory>
                    <removeOldOutput>true</removeOldOutput>
                    <args>
                        <arg>-XtoString</arg>
                        <arg>-Xequals</arg>
                        <arg>-XhashCode</arg>
                        <arg>-Xnamespace-prefix</arg>
                    </args>
                    <plugins>
                        <plugin>
                            <groupId>org.jvnet.jaxb2_commons</groupId>
                            <artifactId>jaxb2-basics</artifactId>
                            <version>${jaxb2-basics-runtime.version}</version>
                        </plugin>
                    </plugins>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <!-- Allows us to customize the namespace names of the generated XML elements -->
                    <dependency>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-namespace-prefix</artifactId>
                        <version>1.3</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!--<plugin>-->
            <!--<groupId>org.sonatype.plugins</groupId>-->
            <!--<artifactId>nexus-staging-maven-plugin</artifactId>-->
            <!--<version>1.6.7</version>-->
            <!--<extensions>true</extensions>-->
            <!--<configuration>-->
            <!--<serverId>ossrh</serverId>-->
            <!--<nexusUrl>https://oss.sonatype.org/</nexusUrl>-->
            <!--<autoReleaseAfterClose>true</autoReleaseAfterClose>-->
            <!--</configuration>-->
            <!--</plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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>
