<?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">
	<parent>
		<artifactId>webofneeds</artifactId>
		<groupId>at.researchstudio.sat</groupId>
		<version>0.4</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<packaging>jar</packaging>
	<groupId>at.researchstudio.sat</groupId>
	<artifactId>won-matcher-rescal</artifactId>
	<name>Matcher-Rescal</name>
	<dependencies>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-matcher-service</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>at.researchstudio.sat</groupId>
			<artifactId>won-matcher-utils</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.typesafe.akka</groupId>
			<artifactId>akka-actor_2.11</artifactId>
		</dependency>
		<dependency>
			<groupId>com.typesafe.akka</groupId>
			<artifactId>akka-slf4j_2.11</artifactId>
		</dependency>
		<dependency>
			<groupId>com.typesafe.akka</groupId>
			<artifactId>akka-camel_2.11</artifactId>
		</dependency>
		<dependency>
			<groupId>com.typesafe.akka</groupId>
			<artifactId>akka-cluster_2.11</artifactId>
		</dependency>
		<dependency>
			<groupId>com.typesafe.akka</groupId>
			<artifactId>akka-remote_2.11</artifactId>
		</dependency>
		<dependency>
			<groupId>com.typesafe.akka</groupId>
			<artifactId>akka-cluster-tools_2.11</artifactId>
		</dependency>
		<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>
		<dependency>
			<groupId>org.apache.jena</groupId>
			<artifactId>jena-arq</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>net.revelc.code.formatter</groupId>
				<artifactId>formatter-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>com.github.ekryd.echo-maven-plugin</groupId>
				<artifactId>echo-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>skip-notice-matcher-rescal-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-matcher-rescal-uberjar'</message>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<execution>
						<id>build-matcher-rescal-uberjar</id>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<finalName>won-matcher-rescal</finalName>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<artifactSet>
								<includes>
									<include>*:*</include>
								</includes>
							</artifactSet>
							<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.rescal.AkkaRescalMain</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>
	<profiles>
		<profile>
			<id>skip-matcher-rescal-uberjar</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.ekryd.echo-maven-plugin</groupId>
						<artifactId>echo-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>skip-matcher-rescal-uberjar-before</id>
								<phase>validate</phase>
								<goals>
									<goal>echo</goal>
								</goals>
								<configuration>
									<message>Note: building the shaded                                        jar for the matcher-rescal is                                        skipped completely. This is done                                        because the profile                                        'skip-matcher-rescal-uberjar' is                                        active ('-P                                        skip-matcher-rescal-uberjar' on                                        the command line)</message>
								</configuration>
							</execution>
							<execution>
								<id>skip-notice-matcher-rescal-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-matcher-rescal-uberjar</id>
								<phase>none</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>