<?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">
    <parent>
        <groupId>org.sonarsource.parent</groupId>
        <artifactId>parent</artifactId>
        <version>52</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.societegenerale.sonar.sslr</groupId>
    <artifactId>sslr-yaml-parser</artifactId>
    <version>1.2.1</version>

    <name>Sonar SSLR :: YAML Parser</name>
    <description>Parser and grammar generator toolkit for YAML-based domain languages</description>

    <inceptionYear>2018</inceptionYear>
    <organization>
        <name>Societe Generale</name>
	<url>http://www.societegenerale.com/en/open-source</url>
    </organization>
    <licenses>
        <license>
            <name>GNU LGPL 3</name>
            <url>http://www.gnu.org/licenses/lgpl.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>vgirardreydet</id>
            <name>Vincent Girard-Reydet</name>
            <email>vincent.girard-reydet@socgen.com</email>
            <organization>Societe Generale</organization>
        </developer>
    </developers>

    <properties>
        <!-- To configure maven-license-plugin to check license headers -->
        <license.name>GNU LGPL v3</license.name>
        <license.owner>Societe Generale</license.owner>
        <license.mailto>vincent.girard-reydet AT socgen DOT com</license.mailto>
    </properties>

    <scm>
        <url>https://github.com/societe-generale/sslr-yaml-parser</url>
        <connection>scm:git:git@github.com:societe-generale/sslr-yaml-parser.git</connection>
        <developerConnection>scm:git:git@github.com:societe-generale/sslr-yaml-parser.git</developerConnection>
        <tag>sslr_yaml_parser_1.2.1</tag>
    </scm>

    <repositories>
        <repository>
            <id>sonatype-releases</id>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
        </repository>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>

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

    <ciManagement>
        <system>Travis</system>
        <url>https://travis-ci.org/societe-generale/sslr-yaml-parser</url>
    </ciManagement>

    <dependencies>
        <dependency>
            <groupId>org.sonarsource.sslr</groupId>
            <artifactId>sslr-core</artifactId>
	    <version>1.23</version>
        </dependency>
        <dependency>
            <groupId>org.sonarsource.sslr</groupId>
            <artifactId>sslr-xpath</artifactId>
	    <version>1.23</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
	    <artifactId>jackson-databind</artifactId>
	    <version>2.9.9.3</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
	    <version>2.9.9</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
	    <version>22.0</version>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
	    <artifactId>assertj-core</artifactId>
	    <version>3.6.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
	    <version>4.12</version>
	    <scope>test</scope>
        </dependency>
        <!-- must appear AFTER junit otherwise junit sees wrong version of Hamcrest -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
	    <version>1.10.19</version>
	    <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- To manually release using mvn release:clean release:prepare, then release:perform -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <stagingRepository>https://oss.sonatype.org/service/local/staging/deploy/maven2</stagingRepository>
                    <tagNameFormat>sslr_yaml_parser_@{project.version}</tagNameFormat>
                    <localCheckout>true</localCheckout>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <pushChanges>false</pushChanges>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <!-- To release to Maven central -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <!-- To generate javadoc -->
                    <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>3.0.1</version>
                        <configuration>
	                    <source>1.8</source>
                            <encoding>UTF-8</encoding>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- To sign the artifacts -->
                    <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>
