<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.mindoo.domino</groupId>
	<artifactId>domino-jna</artifactId>
	<version>0.9.21</version>
	<packaging>jar</packaging>

	<name>Domino JNA</name>
	<description>Java project to access the IBM Domino C API using Java Native Access (JNA)</description>
	<url>https://github.com/klehmann/domino-jna</url>

	<properties>
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
		<jna.version>4.4.0</jna.version>
	</properties>

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

	<developers>
		<developer>
			<name>Karsten Lehmann</name>
			<email>karsten.lehmann@mindoo.de</email>
			<organization>Mindoo GmbH</organization>
			<organizationUrl>http://www.mindoo.de</organizationUrl>
		</developer>
		<developer>
			<name>Tammo Riedinger</name>
			<email>tammo.riedinger@mindoo.de</email>
			<organization>Mindoo GmbH</organization>
			<organizationUrl>http://www.mindoo.de</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/klehmann/domino-jna.git</connection>
		<developerConnection>scm:git:ssh://github.com:klehmann/domino-jna.git</developerConnection>
		<url>https://github.com/klehmann/domino-jna.git</url>
	</scm>

	<profiles>
		<profile>
			<id>release</id>

			<distributionManagement>
				<snapshotRepository>
					<id>nexus-snapshots</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
			</distributionManagement>

			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<version>${maven-deploy-plugin.version}</version>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.5.1</version>
						<executions>
							<execution>
								<id>default-deploy</id>
								<phase>deploy</phase>
								<goals>
									<goal>deploy</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<serverId>nexus-releases</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<!-- explicit matching using the staging profile id -->
							<!-- <stagingProfileId>49650ad66a37c6</stagingProfileId> -->
						</configuration>
					</plugin>
					<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-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>qa</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-dependency-plugin</artifactId>
						<executions>
							<execution>
								<phase>install</phase>
								<goals>
									<goal>copy-dependencies</goal>
								</goals>
								<configuration>
									<outputDirectory>${project.build.directory}/lib</outputDirectory>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencies>
		<!-- using org.elasticsearch version of JNA to not have to require GLIBC 2.14 -->
		<dependency>
			<groupId>org.elasticsearch</groupId>
			<artifactId>jna</artifactId>
			<version>4.4.0</version>
		</dependency>
		<dependency>
			<groupId>com.ibm</groupId>
			<artifactId>domino-api-binaries</artifactId>
			<version>9.0.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.drewnoakes</groupId>
			<artifactId>metadata-extractor</artifactId>
			<version>2.11.0</version>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>3.2.6</version>
		</dependency>
		<dependency>
			<groupId>com.googlecode.concurrentlinkedhashmap</groupId>
			<artifactId>concurrentlinkedhashmap-lru</artifactId>
			<version>1.4.2</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>joda-time</groupId>
		    <artifactId>joda-time</artifactId>
		    <version>2.9.9</version>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>com.sun.mail</groupId>
		    <artifactId>javax.mail</artifactId>
		    <version>1.5.2</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.commons</groupId>
		    <artifactId>commons-email</artifactId>
		    <version>1.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>org.json</groupId>
		    <artifactId>json</artifactId>
		    <version>20170516</version>
			<scope>test</scope>
		</dependency>		
	</dependencies>

	<build>
		<plugins>
			<!-- collect all required libs to use the project standalone -->
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<phase>install</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!-- Note: Running the tests via Maven build does not work yet (tested 
					on Mac Notes Client 64 bit; we still need to figure out why -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<forkMode>once</forkMode>
					<useSystemClassLoader>false</useSystemClassLoader>
					<argLine>-Xmx512m -Djava.library.path="${DOMINODIR}"
						-Djna.library.path="${DOMINODIR}" ${JVMPARAMS}</argLine>

					<environmentVariables>
						<PATH>${DOMINODIR}${path.separator}${env.PATH}</PATH>
						<LD_LIBRARY_PATH>${DOMINODIR}${path.separator}${env.LD_LIBRARY_PATH}</LD_LIBRARY_PATH>
						<DYLD_LIBRARY_PATH>${DOMINODIR}${path.separator}${env.DYLD_LIBRARY_PATH}</DYLD_LIBRARY_PATH>
						<Notes_ExecDirectory>${DOMINODIR}</Notes_ExecDirectory>
						<NotesINI>${NOTESINI}</NotesINI>
					</environmentVariables>
				</configuration>
			</plugin>
			<!-- generate javadoc -->
			<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>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>