<?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>
	<groupId>au.org.consumerdatastandards</groupId>
	<artifactId>mock-data-holder-java</artifactId>
	<version>2.6.0</version>
	<name>Mock Data Holder (Java)</name>
    <description>CDS mock data holder (Java)</description>
	<url>https://github.com/ConsumerDataStandardsAustralia/mock-data-holder-java</url>

	<licenses>
		<license>
			<name>MIT</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Consumer Data Standards Australia</name>
			<email>dev@consumerdatastandards.gov.au</email>
			<organization>Data Standards Body</organization>
			<organizationUrl>https://consumerdatastandards.gov.au</organizationUrl>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/ConsumerDataStandardsAustralia/mock-data-holder-java</url>
		<connection>scm:git:https://github.com/ConsumerDataStandardsAustralia/mock-data-holder-java.git</connection>
		<developerConnection>scm:git:https://github.com/ConsumerDataStandardsAustralia/mock-data-holder-java.git</developerConnection>
		<tag>mock-data-holder-java-2.6.0</tag>
	</scm>

	<properties>
		<java.version>1.8</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.compiler.version>3.8.1</maven.compiler.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<build-helper.plugin.version>3.0.0</build-helper.plugin.version>
		<surefire.plugin.version>3.0.0-M3</surefire.plugin.version>
		<maven-source.plugin.version>3.1.0</maven-source.plugin.version>
		<maven-deploy.plugin.version>2.8.2</maven-deploy.plugin.version>
		<nexus-staging.plugin.version>1.6.8</nexus-staging.plugin.version>
		<dockerfile-maven.version>1.4.12</dockerfile-maven.version>
		<source.plugin.version>2.2.1</source.plugin.version>
		<release.plugin.version>3.0.0-M5</release.plugin.version>
		<gpg.plugin.version>1.5</gpg.plugin.version>
		<javadoc.plugin.version>2.9.1</javadoc.plugin.version>
		<commons-lang3.version>3.8.1</commons-lang3.version>
		<jackson.version>2.10.1</jackson.version>
		<jackson-databind-nullable.version>0.2.0</jackson-databind-nullable.version>
		<junit.version>5.5.0</junit.version>
		<jacoco.version>0.8.4</jacoco.version>
		<swagger-core.version>1.5.24</swagger-core.version>
		<spring-boot.version>2.7.18</spring-boot.version>
		<validation-api.version>2.0.1.Final</validation-api.version>
		<commons-validator.version>1.6</commons-validator.version>
		<commons-codec.version>1.13</commons-codec.version>
		<springfox.version>2.9.2</springfox.version>
        <h2.version>2.2.220</h2.version>
        <nimbus-jose-jwt.version>9.15.2</nimbus-jose-jwt.version>
    </properties>

	<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>

    <build>
        <plugins>
            <plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${spring-boot.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
            </plugin>
            <plugin>
				<groupId>com.spotify</groupId>
				<artifactId>dockerfile-maven-plugin</artifactId>
				<version>${dockerfile-maven.version}</version>
                <executions>
                    <execution>
                        <id>build-tag-push-version</id>
						<phase>deploy</phase>
                        <goals>
                            <goal>build</goal>
                            <goal>push</goal>
							<goal>tag</goal>
                        </goals>
						<configuration>
							<tag>${project.version}</tag>
						</configuration>
                    </execution>
					<execution>
						<id>tag-push-latest</id>
						<phase>deploy</phase>
						<goals>
							<goal>tag</goal>
							<goal>push</goal>
						</goals>
						<configuration>
							<tag>latest</tag>
						</configuration>
					</execution>
                </executions>
                <configuration>
                    <repository>consumerdatastandardsaustralia/mock-data-holder-java</repository>
                    <buildArgs>
                        <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
                    </buildArgs>
                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
					<skipDockerInfo>true</skipDockerInfo>
                </configuration>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>
            <plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>${build-helper.plugin.version}</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/gen/java</source>
								<source>src/main/java</source>
							</sources>
						</configuration>
					</execution>
					<execution>
						<id>add_test_sources</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/java</source>
							</sources>
						</configuration>
					</execution>
				</executions>
            </plugin>
            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${surefire.plugin.version}</version>
            </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>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
            </plugin>
            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${source.plugin.version}</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>${javadoc.plugin.version}</version>
				<configuration>
					<encoding>UTF-8</encoding>
					<source>8</source>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven-deploy.plugin.version}</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging.plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${release.plugin.version}</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
					<!--suppress UnresolvedMavenProperty -->
					<arguments>-Dgpg.passphrase=${pgp.passphrase}</arguments>
				</configuration>
			</plugin>
        </plugins>
    </build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${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>

	<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <version>${spring-boot.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>${h2.version}</version>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>${springfox.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>io.swagger</groupId>
                    <artifactId>swagger-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.swagger</groupId>
                    <artifactId>swagger-models</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>${springfox.version}</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>${swagger-core.version}</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-models</artifactId>
            <version>${swagger-core.version}</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-core</artifactId>
            <version>${swagger-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openapitools</groupId>
            <artifactId>jackson-databind-nullable</artifactId>
            <version>${jackson-databind-nullable.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-parameter-names</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
			<version>${validation-api.version}</version>
        </dependency>
        <dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${commons-lang3.version}</version>
        </dependency>
        <dependency>
			<groupId>commons-validator</groupId>
			<artifactId>commons-validator</artifactId>
			<version>${commons-validator.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>
        <dependency>
			<groupId>com.nimbusds</groupId>
			<artifactId>nimbus-jose-jwt</artifactId>
            <version>${nimbus-jose-jwt.version}</version>
        </dependency>
        <dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>${commons-codec.version}</version>
        </dependency>
    </dependencies>
</project>