<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.alibaba</groupId>
	<artifactId>log4j2-ttl-thread-context-map</artifactId>
	<version>1.3.3</version>
	<packaging>jar</packaging>
	<name>TTL Thread Context Map for Log4j2</name>
	<description>TTL Thread Context Map for Log4j2</description>
	<url>https://github.com/oldratlee/log4j2-ttl-thread-context-map</url>
	<inceptionYear>2015</inceptionYear>

	<licenses>
		<license>
			<name>Apache 2</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:git@github.com:oldratlee/log4j2-ttl-thread-context-map.git</connection>
		<developerConnection>scm:git:git@github.com:oldratlee/log4j2-ttl-thread-context-map.git</developerConnection>
		<url>git@github.com:oldratlee/log4j2-ttl-thread-context-map.git</url>
	</scm>
	<issueManagement>
		<url>https://github.com/oldratlee/log4j2-ttl-thread-context-map/issues</url>
		<system>GitHub Issues</system>
	</issueManagement>
	<organization>
		<name>Alibaba</name>
		<url>http://www.alibaba.com</url>
	</organization>
	<developers>
		<developer>
			<name>Jerry Lee</name>
			<id>oldratlee</id>
			<email>oldratlee(AT)gmail(DOT)com</email>
			<timezone>+8</timezone>
			<url>https://github.com/oldratlee</url>
			<roles>
				<role>developer</role>
			</roles>
			<organization>Alibaba</organization>
			<organizationUrl>http://www.alibaba.com</organizationUrl>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<log4j2.version>2.14.0</log4j2.version>
		<slf4j.version>1.7.30</slf4j.version>
	</properties>

	<dependencies>
		<!-- logging libs -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j2.version}</version>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>transmittable-thread-local</artifactId>
			<version>2.12.0</version>
		</dependency>
		<!-- Testing libs -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j2.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
			<version>${log4j2.version}</version>
			<scope>test</scope>
		</dependency>
		<!--
			https://stackoverflow.com/a/34543148/922688
			https://stefanbirkner.github.io/system-rules/apidocs/org/junit/contrib/java/lang/system/SystemOutRule.html

			https://github.com/stefanbirkner/system-rules
		-->
		<dependency>
			<groupId>com.github.stefanbirkner</groupId>
			<artifactId>system-rules</artifactId>
			<version>1.19.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<!--
						terminate the spawned process after one test class and to create a new process for the next test in line (reuseForks=false)
						http://maven.apache.org/surefire-archives/maven-surefire-2.16/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html
					-->
					<reuseForks>false</reuseForks>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<!--
					official docs: https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

					add maven-enforce-plugin to make sure the right jdk is used
					https://stackoverflow.com/a/18420462/922688
				-->
			<plugin>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>3.3.9</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!--
					config example: https://github.com/mojohaus/versions-maven-plugin/issues/157#issuecomment-306041074
				-->
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<configuration>
					<rulesUri>file://${project.basedir}/src/versions-rules.xml</rulesUri>
					<generateBackupPoms>false</generateBackupPoms>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.22.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.9.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>2.8.2</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.8</version>
				</plugin>
				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.0.0-M2</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>2.8.1</version>
				</plugin>
				<plugin>
					<groupId>pl.project13.maven</groupId>
					<artifactId>git-commit-id-plugin</artifactId>
					<version>4.0.0</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.6</version>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.1.2</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<profiles>
		<profile>
			<id>enable-ttl-agent-for-test</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<argLine>-javaagent:${com.alibaba:transmittable-thread-local:jar}=ttl.agent.logger:STDOUT</argLine>
						</configuration>
					</plugin>
					<plugin>
						<!--
							How to get path to dependency jar with maven
							https://stackoverflow.com/a/56396097/922688
							Apache Maven Dependency Plugin – Introduction
							https://maven.apache.org/plugins/maven-dependency-plugin/
						-->
						<artifactId>maven-dependency-plugin</artifactId>
						<executions>
							<execution>
								<phase>initialize</phase>
								<goals>
									<goal>properties</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>srcDoc</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<show>public</show>
							<charset>UTF-8</charset>
							<encoding>UTF-8</encoding>
							<docencoding>UTF-8</docencoding>
							<links>
								<link>http://docs.oracle.com/javase/7/docs/api</link>
							</links>
							<additionalJOptions>
								<additionalJOption>-J-Duser.language=en -J-Duser.country=US</additionalJOption>
							</additionalJOptions>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>sign</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>gen-git-properties</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<!--
						Maven plugin which includes build-time git repository information into an POJO / *.properties).
						Make your apps tell you which version exactly they were built from! Priceless in large distributed deployments.
							https://github.com/ktoso/maven-git-commit-id-plugin
					-->
					<plugin>
						<groupId>pl.project13.maven</groupId>
						<artifactId>git-commit-id-plugin</artifactId>
						<executions>
							<execution>
								<id>get-the-git-infos</id>
								<goals>
									<goal>revision</goal>
								</goals>
							</execution>
							<execution>
								<id>validate-the-git-infos</id>
								<goals>
									<goal>validateRevision</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<validationProperties>
								<!-- verify that the current repository is not dirty -->
								<validationProperty>
									<name>validating git dirty</name>
									<value>${git.dirty}</value>
									<shouldMatchTo>false</shouldMatchTo>
								</validationProperty>
							</validationProperties>
							<generateGitPropertiesFile>true</generateGitPropertiesFile>
							<generateGitPropertiesFilename>
								${project.build.outputDirectory}/META-INF/scm/${project.groupId}/${project.artifactId}/git.properties
							</generateGitPropertiesFilename>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>travis</id>
			<activation>
				<property>
					<name>env.TRAVIS</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<!-- for codecov.io -->
						<!-- config example: https://github.com/codecov/example-java -->
						<!-- plugin docs: http://eclemma.org/jacoco/trunk/doc/ -->
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
