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

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

	<groupId>com.github.docker-java</groupId>
	<artifactId>docker-java</artifactId>
	<packaging>bundle</packaging>
	<version>3.1.0-rc-4</version>

	<name>docker-java</name>
	<url>https://github.com/docker-java/docker-java</url>
	<description>Java API Client for Docker</description>

	<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:git@github.com:docker-java/docker-java.git</connection>
		<url>git@github.com:docker-java/docker-java.git</url>
		<developerConnection>scm:git:git@github.com:docker-java/docker-java.git</developerConnection>
		<tag>3.1.0-rc-4</tag>
	</scm>

	<developers>
		<developer>
			<id>marcuslinke</id>
			<name>Marcus Linke</name>
			<email>marcus.linke@gmx.de</email>
		</developer>
		<developer>
			<id>kostyasha</id>
			<name>Kanstantsin Shautsou</name>
			<email>kanstantsin.sha@gmail.com</email>
		</developer>
		<developer>
			<id>kpelykh</id>
			<name>Konstantin Pelykh</name>
			<email>kpelykh@gmail.com</email>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<jdk.debug>true</jdk.debug>
		<jdk.optimize>false</jdk.optimize>
		<jdk.source>1.7</jdk.source>
		<jdk.target>1.7</jdk.target>

		<jersey.version>2.27</jersey.version>
		<jackson-jaxrs.version>2.6.7</jackson-jaxrs.version>
		<httpclient.version>4.5.6</httpclient.version><!-- 4.5.1-4.5.2 broken -->
		<commons-compress.version>1.17</commons-compress.version>
		<commons-codec.version>1.11</commons-codec.version>
		<commons-io.version>2.6</commons-io.version>
		<commons-lang.version>2.6</commons-lang.version>
		<slf4j-api.version>1.7.25</slf4j-api.version>

		<bouncycastle.version>1.60</bouncycastle.version>
		<junixsocket.version>2.0.4</junixsocket.version>
		<guava.version>19.0</guava.version>

		<!-- test dependencies -->
		<logback.version>1.2.3</logback.version>
		<netty.version>4.1.27.Final</netty.version>
		<hamcrest.library.version>1.3</hamcrest.library.version>
		<hamcrest.jpa-matchers>1.8</hamcrest.jpa-matchers>
		<lambdaj.version>2.3.3</lambdaj.version>
		<mockito.version>1.10.19</mockito.version>


		<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
		<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
		<maven-failsafe-plugin.version>2.20</maven-failsafe-plugin.version>
		<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
		<maven-bundlor-plugin.version>1.1.2.RELEASE</maven-bundlor-plugin.version>
		<maven-build-helper-plugin.version>3.0.0</maven-build-helper-plugin.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.fasterxml.jackson.jaxrs</groupId>
			<artifactId>jackson-jaxrs-json-provider</artifactId>
			<version>${jackson-jaxrs.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.connectors</groupId>
			<artifactId>jersey-apache-connector</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
			<version>4.4.10</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>${httpclient.version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-client</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>com.kohlschutter.junixsocket</groupId>
			<artifactId>junixsocket-common</artifactId>
			<version>${junixsocket.version}</version>
		</dependency>
		<dependency>
			<groupId>com.kohlschutter.junixsocket</groupId>
			<artifactId>junixsocket-native-common</artifactId>
			<version>${junixsocket.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-compress</artifactId>
			<version>${commons-compress.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>${commons-codec.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>${commons-lang.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j-api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>1.7.21</version>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcpkix-jdk15on</artifactId>
			<version>${bouncycastle.version}</version>
		</dependency>

		<!-- /// Test /////////////////////////// -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>${hamcrest.library.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.googlecode.lambdaj</groupId>
			<artifactId>lambdaj</artifactId>
			<version>${lambdaj.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.hamcrest</groupId>
					<artifactId>hamcrest-all</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.testinfected.hamcrest-matchers</groupId>
			<artifactId>jpa-matchers</artifactId>
			<version>${hamcrest.jpa-matchers}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>annotations</artifactId>
			<version>3.0.1u2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-codec-http</artifactId>
			<version>${netty.version}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-handler</artifactId>
			<version>${netty.version}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-handler-proxy</artifactId>
			<version>${netty.version}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-transport-native-epoll</artifactId>
			<version>${netty.version}</version>
			<classifier>linux-x86_64</classifier>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-transport-native-kqueue</artifactId>
			<version>${netty.version}</version>
			<classifier>osx-x86_64</classifier>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

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

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<source>${jdk.source}</source>
						<target>${jdk.target}</target>
						<debug>${jdk.debug}</debug>
						<optimize>${jdk.optimize}</optimize>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>test-jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>${maven-antrun-plugin.version}</version>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>run</goal>
							</goals>
							<configuration>
								<tasks>
									<echo>*******************************************************************</echo>
									<echo>*******************************************************************</echo>
									<echo>[project.name] : ${project.name}</echo>
									<echo>[project.basedir] : ${project.basedir}</echo>
									<echo>[project.version] : ${project.version}</echo>
									<echo>[project.artifactId] ${project.artifactId}</echo>
									<echo>[project.build.directory] ${project.build.directory}</echo>
									<echo>[jdk.source] : ${jdk.source}</echo>
									<echo>[jdk.target] : ${jdk.target}</echo>
									<echo>[jdk.debug] : ${jdk.debug}</echo>
									<echo>[jdk.optimize] : ${jdk.optimize}</echo>
									<echo>[source encoding]: ${project.build.sourceEncoding}</echo>
									<echo>[LocalRepository] : ${settings.localRepository}</echo>
									<echo>*******************************************************************</echo>
									<echo>*******************************************************************</echo>
								</tasks>
							</configuration>
						</execution>
					</executions>
				</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-javadoc-plugin</artifactId>
					<version>2.10.4</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
							<configuration>
								<additionalparam>-Xdoclint:none</additionalparam>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<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>${maven-release-plugin.version}</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy nexus-staging:release</goals>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<configuration>
					<rerunFailingTestsCount>3</rerunFailingTestsCount>
					<excludedGroups>com.github.dockerjava.junit.category.Integration</excludedGroups>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>${maven-failsafe-plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<rerunFailingTestsCount>3</rerunFailingTestsCount>
					<!--<useUnlimitedThreads>true</useUnlimitedThreads>-->
					<perCoreThreadCount>true</perCoreThreadCount>
					<threadCount>1</threadCount>
					<parallel>classes</parallel>
					<groups>com.github.dockerjava.junit.category.Integration</groups>
					<excludedGroups>com.github.dockerjava.junit.category.AuthIntegration,com.github.dockerjava.junit.category.SwarmModeIntegration</excludedGroups>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Export-Package>!com.github.dockerjava.jaxrs.*,!com.github.dockerjava.netty.*,com.github.dockerjava.*</Export-Package>
						<Import-Package>org.newsclub.net.unix;resolution:="optional",*</Import-Package>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>docker-java-analyses</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<version>2.17</version>
						<executions>
							<execution>
								<id>checkstyle</id>
								<phase>validate</phase>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<encoding>UTF-8</encoding>
							<failOnViolation>true</failOnViolation>
							<logViolationsToConsole>true</logViolationsToConsole>
							<linkXRef>false</linkXRef>
							<!-- if some IDE has integration and requires other place, propose 
								it -->
							<configLocation>
								src/test/resources/checkstyle/checkstyle-config.xml
							</configLocation>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>findbugs-maven-plugin</artifactId>
						<version>3.0.3</version>
						<configuration>
							<effort>Max</effort>
							<threshold>Low</threshold>
							<xmlOutput>true</xmlOutput>
							<!-- until all will be fixed -->
							<failOnError>false</failOnError>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.1</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>

							<execution>
								<id>post-unit-test</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>

							<execution>
								<id>pre-integration-test</id>
								<phase>pre-integration-test</phase>
								<goals>
									<goal>prepare-agent-integration</goal>
								</goals>
							</execution>
							<execution>
								<id>report-integration</id>
								<goals>
									<goal>report-integration</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
