<?xml version="1.0" encoding="UTF-8"?>

<!--
 Copyright 2011 The Buzz Media, LLC
 Copyright 2015-2019 Mickael Jeanroy

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<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.github.mjeanroy</groupId>
	<artifactId>exiftool-lib</artifactId>
	<version>3.3.0</version>
	<name>exiftool</name>
	<description>Java Wrapper for ExifTool</description>
	<packaging>jar</packaging>
	<url>https://github.com/mjeanroy/exiftool</url>

	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>thebuzzmedia</id>
			<name>Riyad Kalla</name>
			<email>software@thebuzzmedia.com</email>
		</developer>
		<developer>
			<id>mjeanroy</id>
			<name>Mickael Jeanroy</name>
			<email>mickael.jeanroy@gmail.com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:mjeanroy/exiftool.git</connection>
		<developerConnection>scm:git:git@github.com:mjeanroy/exiftool.git</developerConnection>
		<url>https://github.com/mjeanroy/exiftool</url>
	  <tag>exiftool-lib-3.3.0</tag>
  </scm>

	<distributionManagement>
		<repository>
			<id>central</id>
			<name>Sonatype Release Repository</name>
			<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2</url>
    </repository>
	</distributionManagement>

	<properties>
		<java-module-name>com.github.mjeanroy.exiftool</java-module-name>

		<!-- Settings -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.testTarget>${java.version}</maven.compiler.testTarget>
		<maven.compiler.testSource>${java.version}</maven.compiler.testSource>

		<!-- Plugins -->
		<maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
		<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
		<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
		<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
		<maven-release-plugin.version>3.3.1</maven-release-plugin.version>
		<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
		<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
		<maven-install-plugin.version>3.1.4</maven-install-plugin.version>
		<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
		<maven-resources-plugin.version>3.4.0</maven-resources-plugin.version>
		<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
		<maven-site-plugin.version>3.21.0</maven-site-plugin.version>
		<versions-maven-plugin.version>2.21.0</versions-maven-plugin.version>
		<central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>

		<!-- Project dependencies -->
		<slf4j.version>2.0.17</slf4j.version>
		<logback.version>1.3.16</logback.version>
		<log4j.version>1.2.17</log4j.version>
		<log4j2.version>2.25.3</log4j2.version>
		<guava.version>33.5.0-android</guava.version>

		<!-- Tests dependencies -->
		<junit-jupiter.version>5.13.4</junit-jupiter.version>
		<assertj.version>3.27.7</assertj.version>
		<mockito.version>4.6.1</mockito.version>
		<commons-exec.version>1.6.0</commons-exec.version>
		<equalsverifier.version>3.19.4</equalsverifier.version>
		<awaitility.version>4.3.0</awaitility.version>
		<byte-buddy.version>1.18.5</byte-buddy.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- Ensure byte-buddy version compatible with java 21 are used -->
			<!-- Dependencies using byte-buddy as a transitive dependencies: mockito, equalsverfier, assertj -->
			<dependency>
				<groupId>net.bytebuddy</groupId>
				<artifactId>byte-buddy</artifactId>
				<version>${byte-buddy.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>net.bytebuddy</groupId>
				<artifactId>byte-buddy-agent</artifactId>
				<version>${byte-buddy.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>${log4j.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j2.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j2.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit-jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>${assertj.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>nl.jqno.equalsverifier</groupId>
			<artifactId>equalsverifier</artifactId>
			<version>${equalsverifier.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-exec</artifactId>
			<version>${commons-exec.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.awaitility</groupId>
			<artifactId>awaitility</artifactId>
			<version>${awaitility.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>${maven-clean-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>${maven-install-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven-jar-plugin.version}</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>${java-module-name}</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${maven-resources-plugin.version}</version>
			</plugin>
			<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.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<testSource>${maven.compiler.testSource}</testSource>
					<testTarget>${maven.compiler.testTarget}</testTarget>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${maven-enforcer-plugin.version}</version>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.0</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven-gpg-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<signTag>true</signTag>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<useReleaseProfile>false</useReleaseProfile>
					<arguments>-Prelease</arguments>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<configuration>
					<excludes>
						<exclude>**/*IT.java</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>test</goal>
						</goals>
						<phase>integration-test</phase>
						<configuration>
							<excludes>
								<exclude>none</exclude>
							</excludes>
							<includes>
								<include>**/*IT.java</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>${versions-maven-plugin.version}</version>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<inherited>false</inherited>
						<configuration>
							<publishingServerId>central</publishingServerId>
						</configuration>
						<executions>
							<execution>
								<id>publish-to-maven-central</id>
								<phase>deploy</phase>
								<goals>
									<goal>publish</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</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>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</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>${maven-javadoc-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
