<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.github.mygreen</groupId>
	<artifactId>splate</artifactId>
	<name>splate</name>
	<packaging>jar</packaging>
	<version>0.2</version>
	<description><![CDATA[ splate is Java Library for 2Way-SQL template ]]></description>
	<url>https://mygreen.github.io/splate/</url>

	<issueManagement>
		<system>github</system>
		<url>https://github.com/mygreen/splate/issues</url>
	</issueManagement>

	<scm>
		<connection>scm:git:ssh://github.com/mygreen/splate.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/mygreen/splate.git</developerConnection>
		<url>https://github.com/mygreen/splate</url>
	</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>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<organization>
		<name>mygreen</name>
		<url>https://mygreen.github.io/splate/</url>
	</organization>

	<developers>
		<developer>
			<id>mygreen</id>
			<name>Tatsuo TSUCHIE</name>
			<url>https://mygreen.github.io/splate/</url>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<java.version>11</java.version>
		<source.encode>UTF-8</source.encode>
		<spring.version>5.0.18.RELEASE</spring.version>
		<slf4j.version>1.7.25</slf4j.version>
		<logback.version>1.2.3</logback.version>
		<jacoco.include.package>com.github.mygreen.splate.*</jacoco.include.package>

				<!-- SonarQubeの解析から除外したいファイル -->
		<sonar.exclusions>
			**/sample/*,
			**/*Test.*,
			**/*.js,
		</sonar.exclusions>
		<sonar.projectName>${groupId}/${project.artifactId}</sonar.projectName>
		<sonar.host.url>https://sonarcloud.io/</sonar.host.url>
		<sonar.organization>mygreen-github</sonar.organization>
		<sonar.coverage.jacoco.xmlReportPaths>${project.directory}/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
	</properties>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
			<testResource>
				<directory>src/test/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
		</testResources>
		<pluginManagement>
			<plugins>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<encoding>utf-8</encoding>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>source-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok-maven-plugin</artifactId>
				<version>1.18.12.0</version>
				<executions>
					<execution>
						<id>delombok</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>delombok</goal>
						</goals>
						<configuration>
							<addOutputDirectory>false</addOutputDirectory>
							<sourceDirectory>src/main/java</sourceDirectory>
							<encoding>${source.encode}</encoding>
	                    </configuration>
					</execution>
					<execution>
						<id>test-delombok</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>testDelombok</goal>
						</goals>
						<configuration>
							<addOutputDirectory>false</addOutputDirectory>
							<sourceDirectory>src/test/java</sourceDirectory>
							<encoding>${source.encode}</encoding>
	                    </configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<source>${java.version}</source>
					<encoding>${source.encode}</encoding>
					<charset>UTF-8</charset>
					<docencoding>UTF-8</docencoding>
					<locale>ja_JP</locale>
					<maxmemory>1024m</maxmemory>
					<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
					<sourcepath>target/generated-sources/delombok</sourcepath>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.9.1</version>
				<configuration>
					<locales>ja</locales>
					<inputEncoding>UTF-8</inputEncoding>
					<outputEncoding>UTF-8</outputEncoding>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.doxia</groupId>
						<artifactId>doxia-module-markdown</artifactId>
						<version>1.9.1</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<argLine>${jacocoArgs}</argLine>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.junit.platform</groupId>
						<artifactId>junit-platform-surefire-provider</artifactId>
						<version>1.3.2</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
		        <groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.5</version>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<phase>test-compile</phase>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<propertyName>jacocoArgs</propertyName>
							<includes>
								<include>${jacoco.include.package}</include>
							</includes>
						</configuration>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>4.0.4</version>
			</plugin>
			<plugin>
				<groupId>org.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>3.7.0.1746</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</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://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Utility -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.12</version>
			<scope>provided</scope>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.5.2</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.13.2</version>
			<scope>test</scope>
		</dependency>

		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.2</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- Logger -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
		</dependency>

	</dependencies>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<source>${java.version}</source>
					<encoding>${source.encode}</encoding>
					<charset>UTF-8</charset>
					<docencoding>UTF-8</docencoding>
					<locale>ja_JP</locale>
					<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
				</configuration>
				<reportSets>
					<reportSet>
						<id>html</id>
						<configuration>
							<sourcepath>target/generated-sources/delombok</sourcepath>
						</configuration>
						<reports>
							<report>javadoc</report>
						</reports>
					</reportSet>
					<reportSet>
						<id>test-html</id>
						<configuration>
							<show>private</show>
							<sourcepath>target/generated-test-sources/delombok</sourcepath>
						</configuration>
						<reports>
							<report>test-javadoc</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<aggregate>true</aggregate>
					<inputEncoding>UTF-8</inputEncoding>
					<outputEncoding>UTF-8</outputEncoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</reporting>

</project>
