<?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>
	<name>BULL - Bean Utils Light Library</name>
	<groupId>com.hotels.beans</groupId>
	<artifactId>bean-utils-library</artifactId>
	<url>https://github.com/HotelsDotCom/bull</url>
	<version>1.1.2</version>
	<packaging>jar</packaging>
	<inceptionYear>2019</inceptionYear>
	<description>
		This BeanUtils library is a Java Bean to Java Bean transformer that recursively copies data from one object to another, it is generic, flexible, reusable, configurable	and
		incredibly fast. It's the only library able to transform Mutable, Immutable and Mixed bean without any custom configuration.
	</description>

	<parent>
		<groupId>com.hotels</groupId>
		<artifactId>hotels-oss-parent</artifactId>
		<version>4.0.0</version>
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<jdk.version>1.8</jdk.version>
		<maven.compiler.source>${jdk.version}</maven.compiler.source>
		<maven.compiler.target>${jdk.version}</maven.compiler.target>
		<maven.pmd.plugin.version>3.11.0</maven.pmd.plugin.version>
		<spring-boot.version>2.1.2.RELEASE</spring-boot.version>
		<lombok.version>1.18.4</lombok.version>
		<apache.common.version>1.3</apache.common.version>
		<apache.commons-lang3.version>3.8.1</apache.commons-lang3.version>
		<shazamcrest.version>0.11</shazamcrest.version>
		<gson.version>2.8.5</gson.version>
		<!-- validation dependencies -->
		<validation-api.version>2.0.1.Final</validation-api.version>
		<hibernate-validator.version>6.0.14.Final</hibernate-validator.version>
		<slf4j-api.version>1.7.25</slf4j-api.version>
		<javax.el-api.version>3.0.0</javax.el-api.version>
		<glassfish.javax.el.version>2.2.6</glassfish.javax.el.version>
		<!-- JaCoCo properties -->
		<jacoco.version>0.8.2</jacoco.version>
		<jacoco.classRatio>0.80</jacoco.classRatio>
		<jacoco.instructionRatio>0.80</jacoco.instructionRatio>
		<jacoco.methodRatio>0.80</jacoco.methodRatio>
		<jacoco.branchRatio>0.75</jacoco.branchRatio>
		<jacoco.complexityRatio>0.80</jacoco.complexityRatio>
		<jacoco.lineRatio>0.80</jacoco.lineRatio>
		<!-- site properties -->
		<wagon-ssh.version>3.2.0</wagon-ssh.version>
		<github.site.maven.plugin.version>0.12</github.site.maven.plugin.version>
		<github.global.server>github</github.global.server>
	</properties>

	<!-- distribution configuration -->
	<scm>
		<connection>scm:git:git@github.com:HotelsDotCom/bull.git</connection>
		<developerConnection>scm:git:git@github.com:HotelsDotCom/bull.git</developerConnection>
		<url>https://github.com/HotelsDotCom/bull</url>
		<tag>bean-utils-library-1.1.2</tag>
  	</scm>
	<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>

	<dependencies>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${apache.commons-lang3.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-text</artifactId>
			<version>${apache.common.version}</version>
		</dependency>
		<!-- validation dependencies -->
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>${validation-api.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.el</groupId>
			<artifactId>javax.el-api</artifactId>
			<version>${javax.el-api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.web</groupId>
			<artifactId>javax.el</artifactId>
			<version>${glassfish.javax.el.version}</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate.validator</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>${hibernate-validator.version}</version>
		</dependency>
		<!-- test dependencies -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<version>${spring-boot.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j-api.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.shazam</groupId>
			<artifactId>shazamcrest</artifactId>
			<version>${shazamcrest.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>${gson.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<!-- profile configuration -->
	<profiles>
		<profile>
			<id>full</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<checkstyle.check.skip>false</checkstyle.check.skip>
				<checkstyle.includeTestSourceDirectory>true</checkstyle.includeTestSourceDirectory>
				<jacoco.check.skip>false</jacoco.check.skip>
			</properties>
		</profile>
		<profile>
			<id>relaxed</id>
			<properties>
				<checkstyle.check.skip>true</checkstyle.check.skip>
				<checkstyle.includeTestSourceDirectory>false</checkstyle.includeTestSourceDirectory>
				<jacoco.check.skip>true</jacoco.check.skip>
			</properties>
		</profile>
		<!-- release profile -->
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<!-- build configuration -->
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.plugin.version}</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<parameters>true</parameters>
					<forceJavacCompilerUse>true</forceJavacCompilerUse>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven.jar.plugin.version}</version>
				<configuration>
					<excludes>
						<exclude>**/config/**</exclude>
						<exclude>**/logback*.xml</exclude>
						<exclude>**/banner.txt</exclude>
						<exclude>**/*.yml</exclude>
						<exclude>**/application/**</exclude>
						<exclude>**/stats/**</exclude>
					</excludes>
				</configuration>
			</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</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>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${maven.checkstyle.plugin.version}</version>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<configuration>
							<configLocation>config/checkstyle/rules.xml</configLocation>
							<suppressionsLocation>config/checkstyle/suppression.xml</suppressionsLocation>
							<encoding>UTF-8</encoding>
							<consoleOutput>true</consoleOutput>
							<failsOnError>true</failsOnError>
							<skip>${checkstyle.check.skip}</skip>
							<includeTestSourceDirectory>${checkstyle.includeTestSourceDirectory}</includeTestSourceDirectory>
						</configuration>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven.surefire.plugin.version}</version>
				<configuration>
					<parallelMavenExecution>false</parallelMavenExecution>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
					<execution>
						<id>jacoco-check</id>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<skip>${jacoco.check.skip}</skip>
							<includes>
								<include>com/hotels/beans/**</include>
							</includes>
							<excludes>
								<exclude>**/Test*.*</exclude>
								<exclude>**/*Test.*</exclude>
								<exclude>**/*Application.*</exclude>
								<exclude>com/hotels/beans/model/**</exclude>
								<exclude>com/hotels/beans/error/**</exclude>
								<exclude>com/hotels/beans/annotation/**</exclude>
							</excludes>
							<rules>
								<rule>
									<element>PACKAGE</element>
									<limits>
										<limit>
											<counter>COMPLEXITY</counter>
											<value>COVEREDRATIO</value>
											<minimum>${jacoco.complexityRatio}</minimum>
										</limit>
										<limit>
											<counter>CLASS</counter>
											<value>COVEREDRATIO</value>
											<minimum>${jacoco.classRatio}</minimum>
										</limit>
										<limit>
											<counter>METHOD</counter>
											<value>COVEREDRATIO</value>
											<minimum>${jacoco.methodRatio}</minimum>
										</limit>
										<limit>
											<counter>BRANCH</counter>
											<value>COVEREDRATIO</value>
											<minimum>${jacoco.branchRatio}</minimum>
										</limit>
										<limit>
											<counter>LINE</counter>
											<value>COVEREDRATIO</value>
											<minimum>${jacoco.lineRatio}</minimum>
										</limit>
										<limit>
											<counter>INSTRUCTION</counter>
											<value>COVEREDRATIO</value>
											<minimum>${jacoco.instructionRatio}</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>${cobertura.maven.plugin.version}</version>
				<configuration>
					<check>false</check>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<!-- pmd plugin configuration -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>${maven.pmd.plugin.version}</version>
				<configuration>
					<targetJdk>${jdk.version}</targetJdk>
					<printFailingErrors>true</printFailingErrors>
					<linkXRef>false</linkXRef>
					<failOnViolation>false</failOnViolation>
					<includeTests>false</includeTests>
					<language>java</language>
				</configuration>
				<executions>
					<execution>
						<phase>process-sources</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- site plugin configuration -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven.site.plugin.version}</version>
				<configuration>
					<siteDirectory>${project.basedir}/docs/site</siteDirectory>
					<skipDeploy>true</skipDeploy>
				</configuration>
				<dependencies>
					<dependency><!-- add support for ssh/scp -->
						<groupId>org.apache.maven.wagon</groupId>
						<artifactId>wagon-ssh</artifactId>
						<version>${wagon-ssh.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>com.github.github</groupId>
				<artifactId>site-maven-plugin</artifactId>
				<version>${github.site.maven.plugin.version}</version>
				<configuration>
					<message>Creating site for ${project.artifactId} ${project.version}</message>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>site</goal>
						</goals>
						<phase>site</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<show>public</show>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
</project>
