<?xml version="1.0"?>
<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>
	<parent>
		<groupId>at.researchstudio.sat</groupId>
		<artifactId>webofneeds</artifactId>
		<version>0.4</version>
	</parent>
	<artifactId>won-bot</artifactId>
	<packaging>jar</packaging>
	<version>0.4</version>
	<name>Bot</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<build>
		<plugins>
			<plugin>
				<groupId>net.revelc.code.formatter</groupId>
				<artifactId>formatter-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<!-- don't run the integration tests in a regular build -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>won/bot/integrationtest/*.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<!--plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>2.8</version><executions><execution><id>copy-dependencies-to-bots</id><phase>prepare-package</phase><goals><goal>copy-dependencies</goal></goals><configuration><outputDirectory>${project.build.directory}/${project.build.finalName}/lib</outputDirectory><overWriteReleases>true</overWriteReleases><overWriteSnapshots>true</overWriteSnapshots><overWriteIfNewer>true</overWriteIfNewer><includeGroupIds>${project.groupId}</includeGroupIds></configuration></execution></executions></plugin -->
			<plugin>
				<groupId>com.github.ekryd.echo-maven-plugin</groupId>
				<artifactId>echo-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>skip-notice-bot-uberjar</id>
						<phase>verify</phase>
						<goals>
							<goal>echo</goal>
						</goals>
						<configuration>
							<message>Note: this build is slow because a                                shaded jar is created. If you don't need                                that (you will know if you do), you can                                skip it by using the profile                                'skip-bot-uberjar'</message>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<id>build-bot-uberjar</id>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<finalName>bots</finalName>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<artifactSet>
								<includes>
									<include>*:*</include>
								</includes>
							</artifactSet>
							<filters>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
							</filters>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>reference.conf</resource>
								</transformer>
								<!--transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"><mainClass>won.matcher.service.AkkaSystemMain</mainClass></transformer -->
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/spring.handlers</resource>
								</transformer>
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>META-INF/spring.schemas</resource>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<repositories>
		<repository>
			<id>eliza-repo</id>
			<url>https://raw.github.com/fkleedorfer/eliza/mvn-repo/</url>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>always</updatePolicy>
			</snapshots>
		</repository>
	</repositories>
	<dependencies>
		<!-- WON stuff -->
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-sockets-tx</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-owner</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-matcher</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-core</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>jackson-core</artifactId>
					<groupId>com.fasterxml.jackson.core</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-cryptography</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-utils-goals</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-utils-conversation</artifactId>
			<version>${project.version}</version>
		</dependency>
		<!-- RDF -->
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-arq</artifactId>
		</dependency>
		<!-- SPRING stuff -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.integration</groupId>
			<artifactId>spring-integration-mail</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-commons</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-mongodb</artifactId>
		</dependency>
		<!-- UTILS -->
		<dependency>
			<groupId>org.apache.velocity</groupId>
			<artifactId>velocity</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-email</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jsoup</groupId>
			<artifactId>jsoup</artifactId>
		</dependency>
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
		</dependency>
		<!-- LOGGING -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
		</dependency>
		<!-- TESTING -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
		</dependency>
		<!-- MONITORING -->
		<dependency>
			<groupId>org.javasimon</groupId>
			<artifactId>javasimon-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.javasimon</groupId>
			<artifactId>javasimon-spring</artifactId>
		</dependency>
		<!-- security stuff -->
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcpkix-jdk15on</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk15on</artifactId>
			<scope>compile</scope>
		</dependency>
		<!-- eliza for the debug bot -->
		<dependency>
			<groupId>codeanticode</groupId>
			<artifactId>eliza</artifactId>
			<version>1.0.1</version>
		</dependency>
		<!-- telegram bot api -->
		<dependency>
			<groupId>org.telegram</groupId>
			<artifactId>telegrambots</artifactId>
		</dependency>
	</dependencies>
	<profiles>
		<profile>
			<id>skip-bot-uberjar</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.ekryd.echo-maven-plugin</groupId>
						<artifactId>echo-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>skip-bot-uberjar-before</id>
								<phase>validate</phase>
								<goals>
									<goal>echo</goal>
								</goals>
								<configuration>
									<message>Note: building the shaded                                        jar for the bot is skipped                                        completely. This is done because                                        the profile 'skip-bot-uberjar'                                        is active ('-P skip-bot-uberjar'                                        on the command line)                                    </message>
								</configuration>
							</execution>
							<execution>
								<!-- suppress the skip notice -->
								<id>skip-notice-bot-uberjar</id>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
					<!-- use the same config as above but set the phase to 
                        'none' -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-shade-plugin</artifactId>
						<version>2.1</version>
						<executions>
							<execution>
								<id>build-bot-uberjar</id>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>