<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>
    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>

	<groupId>com.github.resource4j</groupId>
	<artifactId>resource4j-parent</artifactId>
	<version>3.2.0</version>
	<packaging>pom</packaging>

	<name>Resource4J</name>
	<description>
        Simple Java library for loading localization resources and accessing them in convenient way via internal DSL.
    </description>
	<url>https://github.com/resource4j/resource4j</url>

	<modules>
		<module>converters</module>
		<module>core</module>
		<module>integration</module>
	</modules>

	<licenses>
		<license>
			<name>Modified BSD License</name>
			<url>https://github.com/resource4j/resource4j/blob/master/LICENSE.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Ivan Gammel</name>
			<email>ivan.gammel@gmail.com</email>
			<organization>Align Technology, Inc.</organization>
			<organizationUrl>http://www.aligntech.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:resource4j/resource4j.git</connection>
		<developerConnection>scm:git:git@github.com:resource4j/resource4j.git</developerConnection>
		<url>git@github.com:resource4j/resource4j.git</url>
	  <tag>release-3.0.0</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>

	<properties>
		<java.version>1.8</java.version>

		<!-- Logging -->
		<slf4j.version>1.7.21</slf4j.version>
		<logback.version>1.1.7</logback.version>

		<!-- Integration -->
		<springframework.version>5.0.9.RELEASE</springframework.version>
		<spring-boot.version>2.0.5.RELEASE</spring-boot.version>
		<aspectj.version>1.8.6</aspectj.version>

		<thymeleaf-spring5.version>3.0.9.RELEASE</thymeleaf-spring5.version>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<compilerArgument>-Xlint:all</compilerArgument>
					<showWarnings>true</showWarnings>
					<showDeprecation>true</showDeprecation>
				</configuration>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version><!--$NO-MVN-MAN-VER$ -->
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <remoteTagging>false</remoteTagging>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
		</plugins>
	</build>

	<profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
	   <profile>
	       <id>quality-report</id>
	       <activation>
	           <property>
	               <name>sqa</name>
	               <value>true</value>
	           </property>
	       </activation>
	       <build>
	           <plugins>
	               <plugin>
	                   <groupId>org.apache.maven.plugins</groupId>
	                   <artifactId>maven-surefire-plugin</artifactId>
	                   <version>2.19.1</version>
	                   <configuration>
	                       <argLine>${surefireArgLine}</argLine>
	                   </configuration>
	               </plugin>
	               <plugin>
	                   <groupId>org.apache.maven.plugins</groupId>
	                   <artifactId>maven-failsafe-plugin</artifactId>
	                   <version>2.19.1</version>
	                   <executions>
	                       <execution>
	                           <goals>
	                               <goal>integration-test</goal>
	                               <goal>verify</goal>
	                           </goals>
	                       </execution>
	                   </executions>
	                   <configuration>
	                       <argLine>${failsafeArgLine}</argLine>
	                   </configuration>
	               </plugin>
	               <plugin>
	                   <groupId>org.jacoco</groupId>
	                   <artifactId>jacoco-maven-plugin</artifactId>
	                   <version>0.7.6.201602180812</version>
	                   <executions>
	                       <execution>
	                           <id>pre-unit-test</id>
	                           <goals>
	                               <goal>prepare-agent</goal>
	                           </goals>
	                           <configuration>
	                               <destFile>/${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
	                               <propertyName>surefireArgLine</propertyName>
	                           </configuration>
	                       </execution>
	                       <execution>
	                           <id>post-unit-test</id>
	                           <phase>test</phase>
	                           <goals>
	                               <goal>report</goal>
	                           </goals>
	                           <configuration>
	                               <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
	                               <outputDirectory>${project.build.directory}/jacoco-ut</outputDirectory>
	                           </configuration>
	                       </execution>
                           <execution>
                               <id>pre-integration-test</id>
                               <goals>
                                   <goal>prepare-agent</goal>
                               </goals>
                               <configuration>
                                   <destFile>/${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
                                   <propertyName>failsafeArgLine</propertyName>
                               </configuration>
                           </execution>
                           <execution>
                               <id>post-integration-test</id>
                               <phase>test</phase>
                               <goals>
                                   <goal>report</goal>
                               </goals>
                               <configuration>
                                   <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
                                   <outputDirectory>${project.build.directory}/jacoco-it</outputDirectory>
                               </configuration>
                           </execution>
	                   </executions>
	               </plugin>
	           </plugins>
	       </build>
	   </profile>
	</profiles>

	<dependencyManagement>

		<dependencies>
			<!-- project dependencies -->
			<dependency>
				<groupId>com.github.resource4j</groupId>
				<artifactId>resource4j-core</artifactId>
				<version>${project.version}</version>
			</dependency>

			<dependency>
				<groupId>com.github.resource4j</groupId>
				<artifactId>resource4j-spring</artifactId>
				<version>${project.version}</version>
			</dependency>

			<!-- logging -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>

			<!-- integration -->
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${springframework.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-webmvc</artifactId>
				<version>${springframework.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-autoconfigure</artifactId>
				<version>${spring-boot.version}</version>
			</dependency>

            <dependency>
                <groupId>org.thymeleaf</groupId>
                <artifactId>thymeleaf-spring5</artifactId>
                <version>${thymeleaf-spring5.version}</version>
            </dependency>

			<!-- test dependencies -->
			<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>

			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>${springframework.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

</project>
