<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>de.tudresden.inf.st</groupId>
	<artifactId>salespoint-framework</artifactId>
	<version>7.2.0.RELEASE</version>

	<name>Salespoint</name>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.0.RC1</version>
		<relativePath />
	</parent>

	<properties>
		<dev>/dev</dev>
		<java.version>11</java.version>
		<moduliths.version>1.0.0.RC2</moduliths.version>
	</properties>

	<profiles>
		<profile>
			<id>release</id>
			<properties>
				<dev />
			</properties>
		</profile>
	</profiles>

	<dependencies>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>

		<dependency>
			<groupId>com.querydsl</groupId>
			<artifactId>querydsl-jpa</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-thymeleaf</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-mail</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.thymeleaf.extras</groupId>
			<artifactId>thymeleaf-extras-springsecurity5</artifactId>
		</dependency>

		<dependency>
			<groupId>org.thymeleaf.extras</groupId>
			<artifactId>thymeleaf-extras-java8time</artifactId>
		</dependency>

		<!-- Test -->

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.junit.vintage</groupId>
					<artifactId>junit-vintage-engine</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-junit</artifactId>
			<version>2.0.0.0</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.javamoney.moneta</groupId>
			<artifactId>moneta-core</artifactId>
			<version>1.4-tud</version>
		</dependency>

		<!-- For changelog creation -->

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
		</dependency>

		<dependency>
			<groupId>de.olivergierke.moduliths</groupId>
			<artifactId>moduliths-core</artifactId>
			<version>${moduliths.version}</version>
		</dependency>

		<dependency>
			<groupId>de.olivergierke.moduliths</groupId>
			<artifactId>moduliths-test</artifactId>
			<version>${moduliths.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>de.olivergierke.moduliths</groupId>
			<artifactId>moduliths-docs</artifactId>
			<version>${moduliths.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>3.3.1</version>
			</extension>
		</extensions>

		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<compilerArgument>-parameters</compilerArgument>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.mysema.maven</groupId>
				<artifactId>apt-maven-plugin</artifactId>
				<version>1.1.3</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>process</goal>
						</goals>
						<configuration>
							<outputDirectory>target/generated-sources/queries</outputDirectory>
							<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>com.querydsl</groupId>
						<artifactId>querydsl-apt</artifactId>
						<version>${querydsl.version}</version>
					</dependency>
				</dependencies>
			</plugin>

			<!-- Delombok sources to make sure generated methods can be picked up by JavaDoc -->
			<plugin>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok-maven-plugin</artifactId>
				<version>1.18.6.0</version>
				<configuration>
					<addOutputDirectory>false</addOutputDirectory>
					<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
				</configuration>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>delombok</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>package-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<phase>package</phase>
					</execution>
				</executions>
				<configuration>
					<doclint>none</doclint>
					<excludePackageNames>org.thymeleaf.*</excludePackageNames>
					<outputDirectory>${project.build.directory}/site${dev}/api</outputDirectory>
					<sourcepath>target/generated-sources/delombok</sourcepath>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<version>2.0.0-RC.1</version>
				<dependencies>
					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj</artifactId>
						<version>2.0.0</version>
					</dependency>
					<dependency>
						<groupId>org.asciidoctor</groupId>
						<artifactId>asciidoctorj-diagram</artifactId>
						<version>1.5.16</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>website</id>
						<phase>package</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<sourceDirectory>src/main/asciidoc/site</sourceDirectory>
							<outputDirectory>${project.build.directory}/site</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>reference</id>
						<phase>package</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<sourceDocumentName>salespoint-reference.adoc</sourceDocumentName>
							<outputDirectory>${project.build.directory}/site${dev}</outputDirectory>
							<requires>
								<require>asciidoctor-diagram</require>
							</requires>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<doctype>book</doctype>
					<backend>html5</backend>
					<sourceHighlighter>prettify</sourceHighlighter>
					<outputDirectory>${project.build.directory}/site</outputDirectory>
					<attributes>
						<version>${project.version}</version>
						<majorversion>6</majorversion>
						<linkcss>true</linkcss>
						<numbered>true</numbered>
						<icons>font</icons>
						<sectanchors>true</sectanchors>
						<dev>${dev}</dev>
					</attributes>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<pushChanges>false</pushChanges>
					<scmCommentPrefix />
					<tagNameFormat>${project.version}</tagNameFormat>
					<releaseProfiles>release</releaseProfiles>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<scm>
		<url>https://github.com/st-tu-dresden/salespoint</url>
		<connection>scm:git:https://github.com/st-tu-dresden/salespoint</connection>
		<tag>7.2.0.RELEASE</tag>
	</scm>

	<distributionManagement>
		<repository>
			<id>salespoint</id>
			<url>sftp://st.inf.tu-dresden.de:44/home/salespnt/salespoint/repository</url>
		</repository>
		<site>
			<id>salespoint</id>
			<url>sftp://st.inf.tu-dresden.de:44/home/salespnt/salespoint</url>
		</site>
	</distributionManagement>

	<repositories>
		<repository>
			<id>spring-libs-snapshot</id>
			<url>https://repo.spring.io/libs-snapshot</url>
		</repository>
		<repository>
			<id>salespointframework</id>
			<url>https://www.st.inf.tu-dresden.de/SalesPoint/repository</url>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>spring-libs-snapshot</id>
			<url>https://repo.spring.io/libs-snapshot</url>
		</pluginRepository>
	</pluginRepositories>

</project>
