<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">
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.build.timestamp.format>yyyy-MM-dd/HH:mm:ss</maven.build.timestamp.format>

		<sign-keystore>/path/to/jks.keystore</sign-keystore>
		<sign-alias>alias</sign-alias>
		<sign-storepass>storepass</sign-storepass>
		<sign-keypass>keypass</sign-keypass>
		<sign-skip>true</sign-skip>
		<verbose-log>false</verbose-log>
		<tsa>${tsa-uri}</tsa>
	</properties>
	<modelVersion>4.0.0</modelVersion>
	<groupId>tigase</groupId>
	<artifactId>tigase-monitor</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<name>Tigase Monitor</name>
	<description>Tigase Management Console</description>
	
	<scm>
		<connection>scm:git:https://repository.tigase.org/git/tigase-monitor.git</connection>
		<developerConnection>scm:git:https://repository.tigase.org/git/tigase-monitor.git</developerConnection>
		<url>https://projects.tigase.org/projects/tigase-monitor/repository</url>
	</scm>
	
	<licenses>
		<license>
			<name>GNU Affero General Public License GPLv3</name>
			<url>https://www.gnu.org/licenses/agpl-3.0.html</url>
		</license>
	</licenses>

	<dependencies>
		<dependency>
			<groupId>tigase</groupId>
			<artifactId>tigase-server</artifactId>
			<version>7.1.3</version>
		</dependency>
		<dependency>
			<groupId>jfree</groupId>
			<artifactId>jfreechart</artifactId>
			<version>1.0.13</version>
		</dependency>
		<dependency>
			<groupId>jfree</groupId>
			<artifactId>jcommon</artifactId>
			<version>1.0.15</version>
		</dependency>
	</dependencies>


	<build>
		<plugins>
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<filesets>
						<fileset>
							<directory>pack</directory>
							<includes>
								<include>**/*.jar</include>
								<include>**/*.gz</include>
								<include>**/*.zip</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
					</filesets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.1</version>
				<configuration>
					<timestampFormat>{0,date} {0,time}</timestampFormat>
					<doCheck>false</doCheck>
					<doUpdate>false</doUpdate>
					<shortRevisionLength>8</shortRevisionLength>
				</configuration>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>gmaven-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>gitver</id>
						<phase>validate</phase>
						<goals>
							<goal>execute</goal>
						</goals>
						<configuration>
							<providerSelection>2.0</providerSelection>
							<properties>
								<script>git rev-list HEAD --count</script>
							</properties>
							<source>
								def version
								try {
									def command = project.properties.script
									def process = command.execute()
									process.waitFor()

									version = process.in.text.trim()
								} catch (Exception e) {
									version = '0'
								}
								println "setting revision to: " + version

								project.properties.setProperty( 'gitVersion' , version )

							</source>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
					<showDeprecation>true</showDeprecation>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<mainClass>tigase.monitor.MonitorMain</mainClass>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Implementation-Version>${project.version}-b${gitVersion}/${buildNumber}</Implementation-Version>
							<Implementation-Build>${gitVersion}/${buildNumber} (${maven.build.timestamp})</Implementation-Build>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<!-- NOTE: We don't need a groupId specification because the group is
				org.apache.maven.plugins ...which is assumed by default. -->
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>jar-with-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
							<finalName>${project.artifactId}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<outputDirectory>libs</outputDirectory>
							<archive>
								<manifest>
									<mainClass>tigase.monitor.MonitorMain</mainClass>
								</manifest>
							</archive>
						</configuration>
					</execution>
					<execution>
						<id>dist</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>src/main/assembly/dist.xml</descriptor>
							</descriptors>
							<tarLongFileMode>gnu</tarLongFileMode>
							<finalName>${project.artifactId}-${project.version}-b${gitVersion}</finalName>
							<outputDirectory>pack</outputDirectory>
							<archive>
								<manifest>
									<mainClass>tigase.monitor.MonitorMain</mainClass>
								</manifest>
							</archive>
							<appendAssemblyId>false</appendAssemblyId>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<id>sign</id>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archiveDirectory>${project.basedir}</archiveDirectory>
					<includes>
						<include>target/tigase*.?ar</include>
						<include>jars/tigase*.?ar</include>
					</includes>
					<processMainArtifact>false</processMainArtifact>
					<processAttachedArtifacts>false</processAttachedArtifacts>
					<tsa>${tsa-uri}</tsa>
					<skip>${sign-skip}</skip>

					<keystore>${sign-keystore}</keystore>
					<alias>${sign-alias}</alias>
					<storepass>${sign-storepass}</storepass>
					<keypass>${sign-keypass}</keypass>
					<verbose>${verbose-log}</verbose>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<repositories>
		<repository>
			<id>tigase</id>
			<name>Tigase repository</name>
			<url>https://maven-repo.tigase.org/repository/release</url>
		</repository>
		<repository>
			<id>tigase-snapshot</id>
			<name>Tigase repository</name>
			<url>https://maven-repo.tigase.org/repository/snapshot</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
	<distributionManagement>
		<repository>
			<id>tigase</id>
			<name>Tigase repository</name>
			<url>https://maven-repo.tigase.org/repository/release</url>
		</repository>
		<snapshotRepository>
			<id>tigase-snapshot</id>
			<name>Tigase snapshot repository</name>
			<url>https://maven-repo.tigase.org/repository/snapshot</url>
		</snapshotRepository>
	</distributionManagement>
</project>
