<?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>com.microsoft.sqlserver</groupId>
	<artifactId>mssql-jdbc</artifactId>
	<version>7.2.1.jre8</version>
	<packaging>jar</packaging>

	<name>Microsoft JDBC Driver for SQL Server</name>
	<description>
		Microsoft JDBC Driver for SQL Server.
	</description>
	<url>https://github.com/Microsoft/mssql-jdbc</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<organization>
		<name>Microsoft Corporation</name>
	</organization>

	<developers>
		<developer>
			<organization>Microsoft</organization>
			<organizationUrl>http://www.microsoft.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/Microsoft/mssql-jdbc</url>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<junit.platform.version>1.3.2</junit.platform.version>
		<junit.jupiter.version>5.3.2</junit.jupiter.version>
		<testGroup></testGroup>
		<osgi.version>4.3.1</osgi.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault</artifactId>
			<version>1.2.0</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-webkey</artifactId>
			<version>1.2.0</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>adal4j</artifactId>
			<version>1.6.3</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>com.microsoft.rest</groupId>
			<artifactId>client-runtime</artifactId>
			<version>1.6.5</version>
			<optional>true</optional>
		</dependency>

		<!-- dependencies provided by an OSGi-Framework -->
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<version>${osgi.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
			<version>${osgi.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- dependencies for running tests -->
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-console</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-commons</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-engine</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-runner</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-surefire-provider</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>
		<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>com.zaxxer</groupId>
			<artifactId>HikariCP</artifactId>
			<version>3.2.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-dbcp2 </artifactId>
			<version>2.5.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-nop</artifactId>
			<version>1.7.25</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.gemini.blueprint</groupId>
			<artifactId>gemini-blueprint-mock</artifactId>
			<version>2.0.0.RELEASE</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>build42</id>
			<build>
				<finalName>${project.artifactId}-${project.version}.jre8</finalName>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<excludes>
								<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc43.java</exclude>
							</excludes>
							<source>1.8</source>
							<target>1.8</target>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<source>8</source>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>3.0.2</version>
						<configuration>
							<archive>
								<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
							</archive>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.2</version>
						<executions>
							<execution>
								<id>pre-test</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.22.0</version>
						<configuration>
							<argLine>
								${argLine} --illegal-access=permit
							</argLine>
							<properties>
								<excludeTags>${skipTestTag}</excludeTags>
							</properties>
							<groups>${testGroup}</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>build43</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<finalName>${project.artifactId}-${project.version}.jre11</finalName>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<excludes>
								<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java</exclude>
							</excludes>
							<source>11</source>
							<target>11</target>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>3.0.2</version>
						<configuration>
							<archive>
								<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
								<manifestEntries>
									<Automatic-Module-Name>com.microsoft.sqlserver.jdbc</Automatic-Module-Name>
								</manifestEntries>
							</archive>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.2</version>
						<executions>
							<execution>
								<id>pre-test</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.22.0</version>
						<configuration>
							<argLine>
								${argLine} --illegal-access=permit
							</argLine>
							<properties>
								<excludeTags>${skipTestTag}</excludeTags>
							</properties>
							<groups>${testGroup}</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<resources>
			<resource>
				<directory>${basedir}</directory>
				<includes>
					<include>META-INF/services/java.sql.Driver</include>
				</includes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<includes>
					<include>**/*.csv</include>
				</includes>
			</testResource>
			<testResource>
				<directory>AE_Certificates</directory>
				<includes>
					<include>**/*.txt</include>
					<include>**/*.jks</include>
				</includes>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0-M2</version>
				<executions>
					<execution>
						<id>enforce-versions</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<bannedPlugins>
									<!-- will only display a warning but does not fail the build. -->
									<level>WARN</level>
									<excludes>
										<exclude>org.apache.maven.plugins:maven-verifier-plugin</exclude>
									</excludes>
									<message>Please consider using the maven-invoker-plugin
										(http://maven.apache.org/plugins/maven-invoker-plugin/)!</message>
								</bannedPlugins>
								<requireMavenVersion>
									<version>3.0.5</version>
								</requireMavenVersion>
								<requireJavaVersion>
									<version>11</version>
								</requireJavaVersion>
							</rules>
						</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</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Create OSGI Headers -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>3.5.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<_exportcontents>
							com.microsoft.sqlserver.jdbc,
							com.microsoft.sqlserver.jdbc.osgi,
							com.microsoft.sqlserver.jdbc.dataclassification,
							microsoft.sql
						</_exportcontents>
						<Import-Package>!microsoft.sql,*</Import-Package>
						<Bundle-Activator>com.microsoft.sqlserver.jdbc.osgi.Activator</Bundle-Activator>
					</instructions>
				</configuration>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<failOnError>true</failOnError>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.5</version>
				<inherited>true</inherited>
				<configuration>
					<outputFile>outdated-dependencies.txt</outputFile>
					<rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
