<?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">

	<modelVersion>4.0.0</modelVersion>
	<groupId>es.gob.afirma.lib</groupId>
	<artifactId>support-libraries</artifactId>
	<version>1.0.3</version>
	<packaging>pom</packaging>
	
	<name>support-libraries</name>
	<description>Bibliotecas externas modificadas del Cliente @firma</description>
	<url>https://administracionelectronica.gob.es/ctt/clienteafirma</url>

	<properties>
		<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
		<jdk.version>1.7</jdk.version>
		<spongycastle.version>1.56.0.0</spongycastle.version>
		<junit.version>4.13.1</junit.version>
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
	</properties>

	<licenses>
		<license>
			<name>GPL-v2.0</name>
			<url>http://www.gnu.org/licenses/gpl-2.0.txt</url>
		</license>
		<license>
			<name>EUPL-v1.1</name>
			<url>http://joinup.ec.europa.eu/system/files/ES/EUPL%20v.1.1%20-%20Licencia.pdf</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Secretaría General de Administración Digital</name>
			<email>soporte.afirma@correo.gob.es</email>
			<organization>Gobierno de España</organization>
			<organizationUrl>https://administracionelectronica.gob.es</organizationUrl>
		</developer>
	</developers>
	
	<scm>
		<connection>scm:git:https://github.com/ctt-gob-es/clienteafirma-external.git</connection>
		<developerConnection>scm:git:ssh://github.com/ctt-gob-es/clienteafirma-external.git</developerConnection>
		<url>https://github.com/ctt-gob-es/clienteafirma-external</url>
	</scm>
	
	<modules>
		<module>afirma-lib-jmimemagic</module>
		<module>afirma-lib-juniversalchardet</module>
		<module>afirma-lib-oro</module>
		<module>afirma-lib-itext</module>
		<module>afirma-lib-itext-android</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.madgag.spongycastle</groupId>
				<artifactId>core</artifactId>
				<version>${spongycastle.version}</version>
			</dependency>

			<dependency>
				<groupId>com.madgag.spongycastle</groupId>
				<artifactId>prov</artifactId>
				<version>${spongycastle.version}</version>
			</dependency>
			
			<dependency>
				<groupId>com.madgag.spongycastle</groupId>
				<artifactId>bcpkix-jdk15on</artifactId>
				<version>${spongycastle.version}</version>
			</dependency>
					
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<profiles>
	
		<!-- Construccion por defecto -->
		<profile>
			<id>env-dev</id>
			<activation>
				<property>
					<name>defaultProfile</name>
					<value>!false</value>
				</property>
      		</activation>

      		<build>
       			<plugins>
	
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven-compiler-plugin.version}</version>
						<configuration>
							<source>${jdk.version}</source>
							<target>${jdk.version}</target>
						</configuration>
					</plugin>

			</plugins>
		  </build>
	    </profile>

		<!-- Construccion para despliegue en el repositorio de la SGAE -->
		<profile>
			<id>minhap</id>
			<distributionManagement>
				<repository>
					<id>MINHAP-central</id>
					<name>artefactos.scae.redsara.es-releases</name>
					<url>https://artefactos.scae.redsara.es/artifactory/AFIRMA-release/</url>
				</repository>
				<snapshotRepository>
					<id>MINHAP-snapshots</id>
					<name>artefactos.scae.redsara.es-snapshots</name>
					<url>https://artefactos.scae.redsara.es/artifactory/AFIRMA-snapshot/</url>
				</snapshotRepository>
			</distributionManagement>
			
      		<build>
       			<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven-compiler-plugin.version}</version>
						<configuration>
							<source>${jdk.version}</source>
							<target>${jdk.version}</target>
						</configuration>
					</plugin>
			</plugins>
		  </build>
	    </profile>
		
		<!-- Construccion para despliegue en el repositorio de artefactos -->
		<profile>
			<id>env-deploy</id>
			<activation>
				<property>
				  <name>env</name>
				  <value>deploy</value>
				</property>
			</activation>

			<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>
			
			<build>
				<plugins>
					<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.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>${maven-compiler-plugin.version}</version>
						<configuration>
							<source>${jdk.version}</source>
							<target>${jdk.version}</target>
						</configuration>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>2.5.3</version>
						<configuration>
							<tagNameFormat>${project.name}_@{project.version}</tagNameFormat>
						</configuration>
					</plugin>

					<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>
</project>
