<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>br.ufsc.bridge</groupId>
    <artifactId>validation</artifactId>
    <version>1.4.2</version>
    <packaging>jar</packaging>

    <name>Bridge Platform - Validation</name>
    <description>Java validation library</description>
  	<url>https://github.com/laboratoriobridge/validation</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Laboratório Bridge</name>
			<email>maven@bridge.ufsc.br</email>
			<organization>Laboratório Bridge</organization>
			<organizationUrl>https://bridge.ufsc.br/</organizationUrl>
		</developer>
	</developers>

    <properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <sonar.jacoco.itReportPath>${project.basedir}/../target/jacoco-it.exec</sonar.jacoco.itReportPath>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>br.ufsc.bridge</groupId>
            <artifactId>metafy</artifactId>
            <version>0.1.2</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.2.Final</version>
        </dependency>
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
            <version>2.2.4</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.8.11.3</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <configuration>
                    <destFile>${sonar.jacoco.itReportPath}</destFile>
                    <dataFile>${sonar.jacoco.itReportPath}</dataFile>
                    <append>true</append>
                </configuration>
                <executions>
                    <execution>
                        <id>agent-for-ut</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>agent-for-it</id>
                        <goals>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.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.9.1</version>
				<executions>
				  <execution>
				    <id>attach-javadocs</id>
				    <goals>
				      <goal>jar</goal>
				    </goals>
				  </execution>
				</executions>
			</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>
					<tagNameFormat>@{project.version}</tagNameFormat>
				</configuration>
			</plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	    </repository>
        <snapshotRepository>
            <id>repo-bridge</id>
            <url>https://repositorio.bridge.ufsc.br/repository/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

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

    <scm>
        <connection>scm:git:git@github.com:laboratoriobridge/validation.git</connection>
        <url>scm:git:git@github.com:laboratoriobridge/validation.git</url>
        <developerConnection>scm:git:git@github.com:laboratoriobridge/validation.git</developerConnection>
        <tag>1.4.2</tag>
    </scm>
</project>
