<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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<groupId>mobi.boilr</groupId>
	<artifactId>libpricealarm</artifactId>
	<packaging>jar</packaging>
	<version>0.2.0</version>
	<name>libpricealarm</name>
	<description>Java alarms triggered when price crosses a boundary or surpasses given change.</description>
	<url>https://github.com/andrefbsantos/libpricealarm</url>
	<inceptionYear>2014</inceptionYear>

	<scm>
		<url>https://github.com/andrefbsantos/libpricealarm</url>
		<connection>scm:git:https://github.com/andrefbsantos/libpricealarm.git</connection>
		<developerConnection>scm:git:https://github.com/andrefbsantos/libpricealarm.git</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<jdk.version>1.6</jdk.version>
		<libdynticker.version>0.5.0</libdynticker.version>
		<release.description>
			\+ Added RollingPriceChangeAlarm.
			\+ Added price direction to Alarm.
			\+ Added wasUpperLimitHit to PriceHitAlarm.
			\+ Added get[Upper/Lower]Limit to all alarms.
			\+ Added comparator for alarm's position.
			\* PriceChangeAlarm now clears its buffer when a new pair is set.
			\* Notifier class now checks if alarm is on before showing notification.
			\* Tests with timing now fully working.
			\* Refactored SerializationTest to remove repeated code.
			\- Removed PriceHit[Upper/Lower]AlarmTest, duplicates of PriceHitAlarmTest.
		</release.description>
	</properties>

	<developers>
		<developer>
			<name>André Santos</name>
			<email>andrefilipebrazsantos@gmail.com</email>
		</developer>
		<developer>
			<name>David Ludovino</name>
			<email>david.ludovino@gmail.com</email>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>GNU LGPLv3+</name>
			<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/andrefbsantos/libpricealarm/issues</url>
	</issueManagement>

	<distributionManagement>
		<repository>
			<id>internal.repo</id>
			<name>Temporary repository for manual upload to Github releases</name>
			<url>file://${project.build.directory}/mvn-repo</url>
		</repository>
	</distributionManagement>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>1.10.19</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>mobi.boilr.libdynticker</groupId>
			<artifactId>libdynticker</artifactId>
			<!-- libpricealarm builds against all libdynticker versions published so far. -->
			<version>[0.0.0,)</version>  
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Generates a source code JAR during package -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Generates a Javadoc JAR during package -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

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

			<plugin>
				<groupId>org.kuali.maven.plugins</groupId>
				<artifactId>wagon-maven-plugin</artifactId>
				<version>1.0.5</version>
				<executions>
					<execution>
						<id>get-libdynticker-jar</id>
						<phase>process-resources</phase>
						<goals>
							<goal>download-single</goal>
						</goals>
						<configuration>
							<url>https://github.com</url>
							<fromFile>andrefbsantos/libdynticker/releases/download/${libdynticker.version}/libdynticker-${libdynticker.version}.jar</fromFile>
							<toDir>${project.build.directory}/lib</toDir>
						</configuration>
					</execution>
					<execution>
						<id>get-libdynticker-pom</id>
						<phase>process-resources</phase>
						<goals>
							<goal>download-single</goal>
						</goals>
						<configuration>
							<url>https://github.com</url>
							<fromFile>andrefbsantos/libdynticker/releases/download/${libdynticker.version}/libdynticker-${libdynticker.version}.pom</fromFile>
							<toDir>${project.build.directory}/lib</toDir>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<version>2.5.2</version>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>install-file</goal>
						</goals>
						<configuration>
							<groupId>mobi.boilr.libdynticker</groupId>
							<artifactId>libdynticker</artifactId>
							<version>${libdynticker.version}</version>
							<packaging>jar</packaging>
							<file>${project.build.directory}/lib/libdynticker-${libdynticker.version}.jar</file>
							<pomFile>${project.build.directory}/lib/libdynticker-${libdynticker.version}.pom</pomFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<id>copy-pom</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target name="copy and rename pom">
								<copy file="pom.xml"
									tofile="${project.build.directory}/${project.artifactId}-${project.version}.pom" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>

<!-- 			<plugin> -->
<!-- 				<groupId>de.jutzig</groupId> -->
<!-- 				<artifactId>github-release-plugin</artifactId> -->
<!-- 				<version>1.1.0</version> -->
<!-- 				<configuration> -->
<!-- 					<releaseName>${project.version}</releaseName> -->
<!-- 					<tag>${project.version}</tag> -->
<!-- 					<prerelease>true</prerelease> -->
<!-- 					<description>${release.description}</description> -->
<!-- 				</configuration> -->
<!-- 				<executions> -->
<!-- 					<execution> -->
<!-- 						<id>github-upload-jar</id> -->
<!-- 						<phase>deploy</phase> -->
<!-- 						<goals> -->
<!-- 							<goal>release</goal> -->
<!-- 						</goals> -->
<!-- 						<inherited>false</inherited> -->
<!-- 						<configuration> -->
<!-- 							<artifact>${project.build.directory}/${project.artifactId}-${project.version}.jar</artifact> -->
<!-- 						</configuration> -->
<!-- 					</execution> -->
<!-- 					<execution> -->
<!-- 						<id>github-upload-javadoc</id> -->
<!-- 						<phase>deploy</phase> -->
<!-- 						<goals> -->
<!-- 							<goal>release</goal> -->
<!-- 						</goals> -->
<!-- 						<inherited>false</inherited> -->
<!-- 						<configuration> -->
<!-- 							<artifact>${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar</artifact> -->
<!-- 						</configuration> -->
<!-- 					</execution> -->
<!-- 					<execution> -->
<!-- 						<id>github-upload-sources</id> -->
<!-- 						<phase>deploy</phase> -->
<!-- 						<goals> -->
<!-- 							<goal>release</goal> -->
<!-- 						</goals> -->
<!-- 						<inherited>false</inherited> -->
<!-- 						<configuration> -->
<!-- 							<artifact>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</artifact> -->
<!-- 						</configuration> -->
<!-- 					</execution> -->
<!-- 					<execution> -->
<!-- 						<id>github-upload-pom</id> -->
<!-- 						<phase>deploy</phase> -->
<!-- 						<goals> -->
<!-- 							<goal>release</goal> -->
<!-- 						</goals> -->
<!-- 						<inherited>false</inherited> -->
<!-- 						<configuration> -->
<!-- 							<artifact>${project.build.directory}/${project.artifactId}-${project.version}.pom</artifact> -->
<!-- 						</configuration> -->
<!-- 					</execution> -->
<!-- 				</executions> -->
<!-- 			</plugin> -->
			
				<!--  deploy to maven -->		
			<plugin>
		      <groupId>org.sonatype.plugins</groupId>
		      <artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.5</version>
		      <extensions>true</extensions>
		      <configuration>
		        <serverId>ossrh</serverId>
		        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
		        <autoReleaseAfterClose>true</autoReleaseAfterClose>
		      </configuration>
		    </plugin>
		 
		    <plugin>
		      <groupId>org.apache.maven.plugins</groupId>
		      <artifactId>maven-gpg-plugin</artifactId>
		      <version>1.6</version>
		      <executions>
		        <execution>
		          <id>sign-artifacts</id>
		          <phase>verify</phase>
		          <goals>
		            <goal>sign</goal>
		          </goals>
		        </execution>
		      </executions>
		    </plugin>
			
		</plugins>
	</build>
</project>
