<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.gov.lexml</groupId>
	<artifactId>lexml-urn-formatter</artifactId>
	<version>0.0.45</version>
	<name>LexML Brazil URN Formatter</name>
	<description>Library with functions for formatting LexML Brazil URN references in portuguese</description>
	<url>https://github.com/lexml/lexml-urn-formatter</url>

	<licenses>
	    <license>
		<name>GPLv3</name>
		<url>https://www.gnu.org/licenses/gpl-3.0.html</url>
	    </license>
	</licenses>
 
	<developers>
	      <developer>
		<id>jrafael</id>
		<name>João Nicola</name>
		<email>jrafael@senado.leg.br</email>
	      </developer>
	 </developers>

	<distributionManagement>
	    <snapshotRepository>
		<id>ossrh</id>
		<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
	    </snapshotRepository>
	    <repository>
		<id>ossrh</id>
		<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	    </repository>
	</distributionManagement>

	<properties>
		<scala.version>2.13</scala.version>
		<scala.lib.version>${scala.version}.2</scala.lib.version>
		<java.version>11</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
	</properties>

	<scm>
		<url>https://github.com/lexml/lexml-urn-formatter</url>
		<developerConnection>scm:git:https://github.com/lexml/lexml-urn-formatter.git</developerConnection>
		<connection>scm:git:https://github.com/lexml/lexml-urn-formatter.git</connection>
		<tag>0.0.45</tag>
	</scm>

	<dependencies>
		<dependency>
			<groupId>org.scala-lang</groupId>
			<artifactId>scala-library</artifactId>
			<version>${scala.lib.version}</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.22</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.22</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/scala</directory>
			</resource>
			<resource>
				<directory>src/main/java</directory>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<release>${java.version}</release>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
	    		<plugin>
			   <groupId>net.alchim31.maven</groupId>
			   <artifactId>scala-maven-plugin</artifactId>
			   <version>4.3.1</version>
			   <executions>
			       <execution>
				   <goals>
				       <goal>compile</goal>
				       <goal>testCompile</goal>
				   </goals>
			       </execution>
			   </executions>
			   <configuration>
			       <!--                    <sourceDir>src/main/scala</sourceDir> -->
			       <fork>true</fork>
			       <scalaVersion>${scala.lib.version}</scalaVersion>
			       <scalaCompatVersion>${scala.lib.version}</scalaCompatVersion>
			       <jvmArgs>
				   <jvmArg>-Xms1024m</jvmArg>
				   <jvmArg>-Xmx4096m</jvmArg>
				   <jvmArg>-Xss16m</jvmArg>
			       </jvmArgs>
			   </configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/main/scala</source>
							</sources>
						</configuration>
					</execution>
					<execution>
						<id>add-test-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/scala</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
    <profiles>
      <profile>
	<id>release</id>
	<activation>
	  <activeByDefault>false</activeByDefault>
	</activation>
	<build>
	  <plugins>
	    <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-release-plugin</artifactId>
		<version>2.5.3</version>
		<configuration>
		    <detail>true</detail>
		    <tagNameFormat>@{project.version}</tagNameFormat>
		</configuration>
	    </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://s01.oss.sonatype.org/</nexusUrl>
		      <autoReleaseAfterClose>true</autoReleaseAfterClose>
		  </configuration>
	      </plugin>
	    <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-jar-plugin</artifactId>
	    <executions>
		<execution>
		    <id>empty-javadoc-jar</id>
		    <phase>package</phase>
		    <goals>
			<goal>jar</goal>
		    </goals>
		    <configuration>
			<classifier>javadoc</classifier>
			<classesDirectory>${basedir}/javadoc</classesDirectory>
		    </configuration>
		</execution>
	     </executions>
	   </plugin>
	      <plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-gpg-plugin</artifactId>
		  <version>3.0.1</version>
		  <executions>
		      <execution>
			  <id>sign-artifacts</id>
			  <phase>verify</phase>
			  <goals>
			      <goal>sign</goal>
			  </goals>
			  <configuration>
			      <!-- Prevent gpg from using pinentry programs. Fixes: gpg: signing
				  failed: Inappropriate ioctl for device -->
			      <gpgArguments>
				  <arg>--pinentry-mode</arg>
				  <arg>loopback</arg>
			      </gpgArguments>
			  </configuration>
		      </execution>
		  </executions>
	      </plugin>
	 </plugins>
       </build>

       </profile>
    </profiles>

</project>
