<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>org.qortal</groupId>
	<artifactId>qortal-data</artifactId>
	<version>2.0.0</version>
	<packaging>jar</packaging>
	<properties>
		<skipTests>true</skipTests>
		<altcoinj.version>bf9fb80</altcoinj.version>
		<bitcoinj.version>0.15.10</bitcoinj.version>
		<bouncycastle.version>1.64</bouncycastle.version>
		<build.timestamp>${maven.build.timestamp}</build.timestamp>
		<ciyam-at.version>1.3.8</ciyam-at.version>
		<commons-net.version>3.6</commons-net.version>
		<commons-text.version>1.8</commons-text.version>
		<commons-io.version>2.6</commons-io.version>
		<commons-compress.version>1.21</commons-compress.version>
		<xz.version>1.9</xz.version>
		<dagger.version>1.2.2</dagger.version>
		<guava.version>28.1-jre</guava.version>
		<hsqldb.version>2.5.1</hsqldb.version>
		<jersey.version>2.29.1</jersey.version>
		<jetty.version>9.4.29.v20200521</jetty.version>
		<log4j.version>2.12.1</log4j.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<slf4j.version>1.7.12</slf4j.version>
		<swagger-api.version>2.0.9</swagger-api.version>
		<swagger-ui.version>3.23.8</swagger-ui.version>
		<package-info-maven-plugin.version>1.1.0</package-info-maven-plugin.version>
		<jsoup.version>1.13.1</jsoup.version>
		<java-diff-utils.version>4.10</java-diff-utils.version>
	</properties>
	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<testSourceDirectory>src/test/java</testSourceDirectory>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<generateBackupPoms>false</generateBackupPoms>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<release>11</release>
				</configuration>
			</plugin>
			<!-- unpack swagger-ui to target folder -->
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>swagger ui</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.webjars</groupId>
									<artifactId>swagger-ui</artifactId>
									<version>${swagger-ui.version}</version>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${project.build.directory}/swagger-ui.unpacked</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>4.0.0</version>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
						<phase>initialize</phase>
					</execution>
				</executions>
				<configuration>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
					<includeOnlyProperties>
						<includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
						<includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
					</includeOnlyProperties>
					<dateFormat>yyyyMMddHHmmss</dateFormat>
					<dateFormatTimeZone>UTC</dateFormatTimeZone>
					<gitDescribe>
						<dirty>-devel</dirty>
					</gitDescribe>
					<commitIdGenerationMode>full</commitIdGenerationMode>
					<injectAllReactorProjects>true</injectAllReactorProjects>
					<offline>true</offline>
					<skipPoms>false</skipPoms>
				</configuration>
			</plugin>
			<!-- inject correct url to swagger json file into swagger-ui -->
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>replacer</artifactId>
				<version>1.5.3</version>
				<executions>
					<execution>
						<id>replace-swagger-ui</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>replace</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<file>${project.build.directory}/swagger-ui.unpacked/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/index.html</file>
							<replacements>
								<replacement>
									<token>https://petstore.swagger.io/v2/swagger.json</token>
									<value>/openapi.json</value>
								</replacement>
								<replacement>
									<token>Swagger UI</token>
									<value>API Documentation</value>
								</replacement>
								<replacement>
									<token>deepLinking: true,</token>
									<value>
										deepLinking: true,
										tagsSorter: "alpha",
										operationsSorter:
										"alpha",
									</value>
								</replacement>
							</replacements>
						</configuration>
					</execution>
					<execution>
						<id>replace-git-resources</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>replace</goal>
						</goals>
						<inherited>false</inherited>
						<configuration>
							<file>${project.build.outputDirectory}/git.properties</file>
							<regex>true</regex>
							<regexFlags><regexFlag>MULTILINE</regexFlag></regexFlags>
							<replacements>
								<replacement>
									<token>^(#.*$[\n\r]*)</token>
									<value></value>
								</replacement>
							</replacements>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- add swagger-ui as resource to output package -->
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/classes/resources/swagger-ui</outputDirectory>
							<resources>
								<resource>
									<directory>${project.build.directory}/swagger-ui.unpacked/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- Generate package-info.java files for JAXB, to convert byte[] to/from 
				Base58 -->
			<plugin>
				<groupId>com.github.bohnman</groupId>
				<artifactId>package-info-maven-plugin</artifactId>
				<version>${package-info-maven-plugin.version}</version>
				<configuration>
					<packages>
						<package>
							<pattern>org.qortal.data.**</pattern>
							<template>${project.build.sourceDirectory}/org/qortal/data/package-info.java</template>
						</package>
						<package>
							<pattern>org.qortal.api.model**</pattern>
							<template>${project.build.sourceDirectory}/org/qortal/data/package-info.java</template>
						</package>
						<package>
							<pattern>org.qortal.api.model.**</pattern>
							<template>${project.build.sourceDirectory}/org/qortal/data/package-info.java</template>
						</package>
					</packages>
					<outputDirectory>${project.build.directory}/generated-sources/package-info</outputDirectory>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Include generated package-info.java sources in build -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.build.directory}/generated-sources/package-info</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultEntries>false</addDefaultEntries>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Last-Commit-Id>${git.commit.id.full}</Last-Commit-Id>
							<Last-Commit-Time>${git.commit.time}</Last-Commit-Time>
							<Reproducible-Build>true</Reproducible-Build>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<createDependencyReducedPom>false</createDependencyReducedPom>
					<artifactSet>
						<excludes>
							<!-- Don't include original swagger-UI as we're including our own 
								modified version -->
							<exclude>org.webjars:swagger-ui</exclude>
							<!-- Don't include JUnit as it's for testing only! -->
							<exclude>junit:junit</exclude>
						</excludes>
					</artifactSet>
					<filters>
						<filter>
							<artifact>*:*</artifact>
							<excludes>
								<exclude>META-INF/*.SF</exclude>
								<exclude>META-INF/*.DSA</exclude>
								<exclude>META-INF/*.RSA</exclude>
								<exclude>**/*.js.map</exclude>
							</excludes>
						</filter>
					</filters>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>org.qortal.controller.Controller</mainClass>
									<manifestEntries>
										<Class-Path>. ..</Class-Path>
									</manifestEntries>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>io.github.zlika</groupId>
				<artifactId>reproducible-build-maven-plugin</artifactId>
				<version>0.11</version>
				<executions>
					<execution>
						<phase>package</phase>
						<id>strip-jar</id>
						<goals>
							<goal>strip-jar</goal>
						</goals>
						<configuration>
							<zipDateTime>${git.commit.time}</zipDateTime>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<skipTests>${skipTests}</skipTests>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-dependency-plugin
										</artifactId>
										<versionRange>
											[2.8,)
										</versionRange>
										<goals>
											<goal>unpack</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute></execute>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											com.google.code.maven-replacer-plugin
										</groupId>
										<artifactId>
											replacer
										</artifactId>
										<versionRange>
											[1.5.3,)
										</versionRange>
										<goals>
											<goal>replace</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute></execute>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<repositories>
		<repository>
			<id>project.local</id>
			<name>project</name>
			<url>file:${project.basedir}/lib</url>
		</repository>
		<!-- jitpack for build-on-demand of altcoinj -->
		<repository>
			<id>jitpack.io</id>
			<url>https://jitpack.io</url>
		</repository>
	</repositories>
	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/build-helper-maven-plugin -->
		<dependency>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>build-helper-maven-plugin</artifactId>
			<version>3.0.0</version>
			<scope>provided</scope><!-- needed for build, not for runtime -->
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.github.bohnman/package-info-maven-plugin -->
		<dependency>
			<groupId>com.github.bohnman</groupId>
			<artifactId>package-info-maven-plugin</artifactId>
			<version>${package-info-maven-plugin.version}</version>
			<scope>provided</scope><!-- needed for build, not for runtime -->
		</dependency>
		<!-- HSQLDB for repository -->
		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>${hsqldb.version}</version>
		</dependency>
		<!-- CIYAM AT (automated transactions) -->
		<dependency>
			<groupId>org.ciyam</groupId>
			<artifactId>AT</artifactId>
			<version>${ciyam-at.version}</version>
		</dependency>
		<!-- Bitcoin support -->
		<dependency>
			<groupId>org.bitcoinj</groupId>
			<artifactId>bitcoinj-core</artifactId>
			<version>${bitcoinj.version}</version>
		</dependency>
		<!-- For Litecoin, etc. support, requires bitcoinj -->
		<dependency>
			<groupId>com.github.jjos2372</groupId>
			<artifactId>altcoinj</artifactId>
			<version>${altcoinj.version}</version>
		</dependency>
		<!-- Utilities -->
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20210307</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-text</artifactId>
			<version>${commons-text.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-compress</artifactId>
			<version>${commons-compress.version}</version>
		</dependency>
		<dependency>
			<groupId>org.tukaani</groupId>
			<artifactId>xz</artifactId>
			<version>${xz.version}</version>
		</dependency>
		<!--  For bitset/bitmap compression -->
		<dependency>
			<groupId>io.druid</groupId>
			<artifactId>extendedset</artifactId>
			<version>0.12.3</version>
			<exclusions>
				<!-- exclude old versions of jackson-annotations / jackson-core -->
				<exclusion>
					<groupId>com.fasterxml.jackson.core</groupId>
					<artifactId>jackson-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.fasterxml.jackson.core</groupId>
					<artifactId>jackson-annotations</artifactId>
				</exclusion>
				<!-- exclude Netty, as included by io.druid.java.util -->
				<exclusion>
					<groupId>io.netty</groupId>
					<artifactId>netty</artifactId>
				</exclusion>
				<!-- exclude async-http-client, as included by io.druid.java.util -->
				<exclusion>
					<groupId>org.asynchttpclient</groupId>
					<artifactId>async-http-client</artifactId>
				</exclusion>
				<exclusion>
					<groupId>io.druid</groupId>
					<artifactId>java-util</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- For NTP -->
		<dependency>
			<groupId>commons-net</groupId>
			<artifactId>commons-net</artifactId>
			<version>${commons-net.version}</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>
		<!-- Logging: log4j2 -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<!-- redirect slf4j to log4j2 -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<!-- redirect java.utils.logging to log4j2 -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-jul</artifactId>
			<version>${log4j.version}</version>
		</dependency>
		<!-- Logging: slf4j used by Jetty/Jersey -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- Servlet related -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>4.0.1</version>
		</dependency>
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.5.0-b01</version>
		</dependency>
		<!-- Unicode homoglyph utilities -->
		<dependency>
			<groupId>net.codebox</groupId>
			<artifactId>homoglyph</artifactId>
			<version>1.2.0</version>
		</dependency>
		<!-- Jetty -->
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<version>${jetty.version}</version>
			<classifier>config</classifier>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlet</artifactId>
			<version>${jetty.version}</version>
			<type>jar</type>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlets</artifactId>
			<version>${jetty.version}</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-rewrite</artifactId>
			<version>${jetty.version}</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-client</artifactId>
			<version>${jetty.version}</version>
		</dependency>
		<!-- Websocket support -->
		<dependency>
			<groupId>org.eclipse.jetty.websocket</groupId>
			<artifactId>javax-websocket-server-impl</artifactId>
			<version>${jetty.version}</version>
		</dependency>
		<!-- Jersey -->
		<dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-server</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-servlet-core</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
			<version>${jersey.version}</version>
			<exclusions>
				<exclusion><!-- exclude javax.inject-1.jar because other jersey modules include javax.inject v2+ -->
					<groupId>javax.inject</groupId>
					<artifactId>javax.inject</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-moxy</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-multipart</artifactId>
			<version>${jersey.version}</version>
		</dependency>
		<!-- Swagger OpenAPI implementation -->
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-jaxrs2</artifactId>
			<version>${swagger-api.version}</version>
		</dependency>
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
			<version>${swagger-api.version}</version>
			<exclusions>
				<exclusion><!-- excluded because included in swagger-jaxrs2-servlet-initializer -->
					<groupId>io.swagger.core.v3</groupId>
					<artifactId>swagger-integration</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>swagger-ui</artifactId>
			<version>${swagger-ui.version}</version>
		</dependency>
		<!-- Testing -->
		<!-- disabled pending better Eclipse support
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>5.3.1</version>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>1.3</version>
		</dependency>
		-->
		<!-- BouncyCastle for crypto, including TLS secure networking -->
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk15on</artifactId>
			<version>${bouncycastle.version}</version>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bctls-jdk15on</artifactId>
			<version>${bouncycastle.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jsoup</groupId>
			<artifactId>jsoup</artifactId>
			<version>${jsoup.version}</version>
		</dependency>
		<dependency>
			<groupId>io.github.java-diff-utils</groupId>
			<artifactId>java-diff-utils</artifactId>
			<version>${java-diff-utils.version}</version>
		</dependency>
	</dependencies>
</project>
