<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>6.2.1.RELEASE</version>

	<name>Salespoint</name>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.3.1.RELEASE</version>
	</parent>

	<properties>
		<dev>/dev</dev>
		<java.version>1.8</java.version>
	</properties>

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

	<dependencies>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-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.thymeleaf.extras</groupId>
			<artifactId>thymeleaf-extras-springsecurity4</artifactId>
		</dependency>

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

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

		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.javamoney</groupId>
			<artifactId>moneta</artifactId>
			<version>1.0</version>
		</dependency>

		<!-- For changelog creation -->

		<dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path</artifactId>
			<scope>test</scope>
		</dependency>

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

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

	</dependencies>

	<build>

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

		<plugins>

			<!-- 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.16.6.1</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>
	                <additionalparam>-Xdoclint:none</additionalparam>
	                <excludePackageNames>org.thymeleaf.*</excludePackageNames>
	                <outputDirectory>${project.build.directory}/site${dev}/api</outputDirectory>
					<show>package</show>
					<sourcepath>target/generated-sources/delombok</sourcepath>
	            </configuration>
			</plugin>

			<plugin>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<version>1.5.3</version>
				<executions>
					<execution>
						<id>website</id>
						<phase>generate-resources</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>generate-resources</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<sourceDocumentName>salespoint-reference.adoc</sourceDocumentName>
							<outputDirectory>${project.build.directory}/site${dev}</outputDirectory>
						</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>

		</plugins>
	</build>

	<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>

</project>
