<?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>org.gitlab</groupId>
	<artifactId>java-gitlab-api</artifactId>
	<version>4.1.1</version>

	<name>Gitlab Java API Wrapper</name>
	<description>A Java wrapper for the Gitlab Git Hosting Server API</description>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>

	<developers>
		<developer>
			<id>timols</id>
			<name>Tim Olshansky</name>
			<email>tim.olshansky@gmail.com</email>
		</developer>
	</developers>
	<contributors>
		<contributor>
			<name>Adam Retter</name>
			<email>adam.retter@googlemail.com</email>
			<organization>Evolved Binary Ltd</organization>
		</contributor>
		<contributor>
			<name>Cesar Aguilar</name>
			<email>cesar@fuzzproductions.com</email>
			<organization>Fuzz Productions</organization>
		</contributor>
		<contributor>
			<name>Chris Luu</name>
			<email>luu@fuzzproductions.com</email>
			<organization>Fuzz Productions</organization>
		</contributor>
		<contributor>
			<name>Oleg Shaburov</name>
			<email>shaburov.o.a@gmail.com</email>
			<roles>
				<role>Automation QA</role>
			</roles>
			<timezone>+3</timezone>
		</contributor>
	</contributors>

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

	<scm>
		<connection>scm:git:ssh://github.com/timols/java-gitlab-api.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/timols/java-gitlab-api.git</developerConnection>
		<url>https://github.com/timols/java-gitlab-api</url>
	</scm>

	<issueManagement>
		<system>Github</system>
		<url>https://github.com/timols/java-gitlab-api/issues</url>
	</issueManagement>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
		<!-- wait three minutes for gitlab to start -->
		<docker-maven-plugin.timeOut>180000</docker-maven-plugin.timeOut>
		<log4j.version>2.11.0</log4j.version>
		<junit.jupiter.version>5.2.0</junit.jupiter.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
			<version>2.5.3</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.5.3</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<!-- Logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.8.0-beta2</version>
		</dependency>
		<!-- Test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>2.10.0</version>
			<scope>test</scope>
		</dependency>
		<!-- Test provided -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
			<version>${log4j.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310 -->
		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-jsr310</artifactId>
			<version>2.5.1</version>
		</dependency>

	</dependencies>



	<build>
		<resources>
			<resource>
				<directory>./</directory>
				<includes>
					<include>LICENSE</include>
					<include>NOTICE</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<executions>
					<execution>
						<id>default-integration-test</id>
						<goals>
							<goal>integration-test</goal>
						</goals>
						<configuration>
							<systemPropertyVariables>
								<docker.host.address>${docker.host.address}</docker.host.address>
								<gitlab.port>${gitlab.port}</gitlab.port>
							</systemPropertyVariables>
						</configuration>
					</execution>
					<execution>
						<id>default-verify</id>
						<goals>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<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>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>docker-ide</id>
			<properties>
				<docker.host.address>127.0.0.1</docker.host.address>
				<gitlab.port>18080</gitlab.port>
			</properties>
		</profile>
		<profile>
			<id>docker-gitlab</id>
			<build>
				<plugins>
					<plugin>
						<groupId>io.fabric8</groupId>
						<artifactId>docker-maven-plugin</artifactId>
						<version>0.23.0</version>
						<executions>
							<execution>
								<id>default-start</id>
								<goals>
									<goal>start</goal>
								</goals>
							</execution>
							<execution>
								<id>default-stop</id>
								<goals>
									<goal>stop</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<images>
								<image>
									<name>gitlab/gitlab-ce:latest</name>
									<alias>gitlab</alias>
									<run>
										<ports>
											<port>gitlab.port:80</port>
										</ports>
										<volumes>
											<bind>
												<volume>
													${user.dir}/src/test/resources/gitlab.rb:/etc/gitlab/gitlab.rb
												</volume>
											</bind>
										</volumes>
										<wait>
											<http>
												<url>http://${docker.host.address}:${gitlab.port}/api/v4/version</url>
												<method>GET</method>
												<status>401</status>
											</http>
											<time>${docker-maven-plugin.timeOut}</time>
										</wait>
									</run>
								</image>
							</images>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
        <profile>
          <id>doclint-java8-disable</id>
          <activation>
            <jdk>[1.8,)</jdk>
          </activation>

          <build>
            <plugins>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </plugin>
            </plugins>
          </build>
        </profile>
      </profiles>
</project>
