<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.ggeorgovassilis</groupId>
	<artifactId>spring-rest-invoker</artifactId>
	<version>1.8</version>
	<url>https://github.com/ggeorgovassilis/spring-rest-invoker</url>
	<name>${project.groupId}:${project.artifactId}</name>
	<description>Spring factory that allows consumption of a remote REST JSON service by binding it to a local Java interface and exposing it as a proxy.</description>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://opensource.org/licenses/Apache-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>ggeorgovassilis</id>
			<name>George Georgovassilis</name>
			<email>g.georgovassilis_gmail.com</email>
			<url>https://blog.georgovassilis.com/</url>
			<roles>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:https://ggeorgovassilis@github.com/ggeorgovassilis/spring-rest-invoker.git</connection>
		<developerConnection>scm:git:https://ggeorgovassilis@github.com/ggeorgovassilis/spring-rest-invoker.git</developerConnection>
		<url>http://github.com/ggeorgovassilis/spring-rest-invoker/tree/master</url>
	</scm>
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<!-- github server in ~/.m2/settings.xml -->
		<github.global.server>github</github.global.server>
		<spring.version>5.3.3</spring.version>
		<jackson.version>2.11.4</jackson.version>
		<bytebuddy.version>1.10.19</bytebuddy.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>

	<profiles>
		<profile>
			<id>reports</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<configuration>
							<skipEmptyReport>false</skipEmptyReport>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.pitest</groupId>
						<artifactId>pitest-maven</artifactId>
						<configuration>
							<targetClasses>
								<param>fauxjsp*</param>
							</targetClasses>
							<targetTests>
								<param>fauxjsp*</param>
							</targetTests>
							<excludedClasses>
								<excludedClasse>fauxjsp.test.integrationtests*</excludedClasse>
							</excludedClasses>
							<threads>4</threads>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.7.9</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<configuration> <!-- don't write links to external dependencies; dependency lookup takes 
								long -->
							<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
						</configuration>
					</plugin>
					<plugin> <!-- fix warning during report generation -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jxr-plugin</artifactId>
						<version>2.5</version>
					</plugin>
				</plugins>
			</reporting>
			<reports>
				<report>maven-pmd-plugin</report>
				<report>jacoco-maven-plugin</report>
				<report>pitest-maven</report>
			</reports>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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>
					<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>
						<configuration>
							<failOnError>true</failOnError>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<tasks>
										<echo>Displaying value of 'testproperty' property</echo>
										<echo>[testproperty] ${testproperty}</echo>
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments></gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-framework-bom</artifactId>
				<version>${spring.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>javax.ws.rs-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>net.bytebuddy</groupId>
			<artifactId>byte-buddy</artifactId>
			<version>${bytebuddy.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>5.6.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<version>3.7.7</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<version>2.2</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>3.14.0</version>
				</plugin>
				<plugin>
					<groupId>org.pitest</groupId>
					<artifactId>pitest-maven</artifactId>
					<version>1.6.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.0.0-M1</version>
				</plugin>

			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<!-- Will do integration tests with surefire. We don't need failsafe 
					here. -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<trimStackTrace>false</trimStackTrace>
					<skip>true</skip><!-- skip disables the plugin by default, otherwise 
						it will run integration tests during the unit test phase. -->
				</configuration>
				<executions>
					<execution> <!-- re-enable tests in the test phase -->
						<id>unit-tests</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<includes>
								<include>**/tests/*Test.java</include>
							</includes>
							<argLine>${jacoco.agent.argLine}</argLine>
						</configuration>
					</execution>
					<execution> <!-- re-enable tests in the integration-test phase -->
						<id>integration-tests</id>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<includes>
								<include>**/integrationtests/*Test.java</include>
							</includes>
							<argLine>${jacoco.agent.argLine}</argLine>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<configuration>
					<skipEmptyReport>false</skipEmptyReport>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.9</version>
				<executions>
					<execution>
						<id>prepare-test-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<append>true</append>
							<inclNoLocationClasses>false</inclNoLocationClasses>
							<propertyName>jacoco.agent.argLine</propertyName>
							<include>com/github/ggeorgovassilis/springjsonmapper/**</include>
						</configuration>
					</execution>
					<execution>
						<id>jacoco-report</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<includes>
								<include>com/github/ggeorgovassilis/springjsonmapper/**</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
