<?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>de.ipb-halle</groupId>
	<artifactId>fasta-search-service-models</artifactId>
	<version>2.0.0</version>
	<packaging>jar</packaging>

	<name>fasta-search-service-models</name>
	<description>Model classes for the fasta-search-service</description>
	<url>https://github.com/ipb-halle/fasta-search-service/tree/main/models</url>

	<organization>
		<name>Leibniz Institute of Plant Biochemistry (IPB), Halle (Saale), Germany</name>
		<url>https://www.ipb-halle.de</url>
	</organization>

	<developers>
		<developer>
			<name>Frank Lange</name>
			<organization>Leibniz Institute of Plant Biochemistry (IPB), Halle (Saale), Germany</organization>
			<organizationUrl>https://www.ipb-halle.de</organizationUrl>
		</developer>
                <developer>
                        <name>Frank Broda</name>
                        <email>fbroda@ipb-halle.de</email>
                        <organization>Leibniz Institute of Plant Biochemistry (IPB), Halle (Saale), Germany</organization>
                        <organizationUrl>https://www.ipb-halle.de</organizationUrl>
                </developer>
	</developers>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:https://github.com/ipb-halle/fasta-search-service.git</connection>
		<url>https://github.com/ipb-halle/fasta-search-service.git</url>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <gpg.keyname>fbroda@ipb-halle.de</gpg.keyname>
	</properties>

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

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>17</source>
					<target>17</target>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.0</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.2.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>jakarta.validation</groupId>
			<artifactId>jakarta.validation-api</artifactId>
			<version>3.0.2</version>
			<scope>provided</scope>
		</dependency>

		<!-- dependencies for testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<version>2.2</version>
			<scope>test</scope>
		</dependency>
		<!-- The bean validation API is provided by the JavaEE container only
			 during runtime, but not during tests. Thus, we need to include an
			 implementation. -->
		<dependency>
			<groupId>org.hibernate.validator</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>8.0.0.Final</version>
			<scope>test</scope>
		</dependency>
		<!-- Required by org.hibernate.validator.hibernate-validator -->
		<dependency>
			<groupId>org.glassfish</groupId>
			<artifactId>jakarta.el</artifactId>
			<version>4.0.2</version>
			<scope>test</scope>
		</dependency>

<dependency>
    <groupId>jakarta.xml.bind</groupId>
    <artifactId>jakarta.xml.bind-api</artifactId>
    <version>4.0.0</version>
</dependency>

	</dependencies>

	<profiles>
		<!-- release to ossrh: mvn clean deploy -P release -->
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<configuration>
							<!-- Prevent gpg from using pinentry programs -->
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
                                                        <keyname>${gpg.keyname}</keyname>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>dependencyCheck</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>6.5.3</version>
						<configuration>
							<failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
