<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>
		<artifactId>pdf-over</artifactId>
		<groupId>a-sit.at</groupId>
		<version>4.0.0-SNAPSHOT</version>
		<relativePath>..</relativePath>
	</parent>
	<artifactId>pdf-over-gui</artifactId>
	<name>PDF-Over GUI</name>

	<dependencies>
		<dependency>
			<groupId>org.eclipse.swt</groupId>
			<artifactId>${swt.artifactId}</artifactId>
			<version>3.8</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.izpack</groupId>
			<artifactId>izpack-standalone-compiler</artifactId>
			<version>${izpack-standalone.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>a-sit.at</groupId>
			<artifactId>pdf-over-signator</artifactId>
			<version>4.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>a-sit.at</groupId>
			<artifactId>pdf-over-sigpdfas</artifactId>
			<version>4.0.0-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun</groupId>
			<artifactId>pdfview</artifactId>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<!-- Ignore/Execute plugin execution -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<!-- copy-dependency plugin -->
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>copy-dependencies</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<descriptorRefs>
						<descriptorRef>jar</descriptorRef>
					</descriptorRefs>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<classpathPrefix></classpathPrefix>
							<mainClass>at.asit.pdfover.gui.Main</mainClass>
						</manifest>
					</archive>
					<outputDirectory>${staging.dir}/lib</outputDirectory>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<!-- copy product jars to izpack staging lib -->
						<id>copy-product-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${staging.dir}/lib</outputDirectory>
							<excludeTransitive>false</excludeTransitive>
							<stripVersion>false</stripVersion>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
							<excludeScope>system</excludeScope> <!-- this excludes tools.jar, e.g. -->
							<excludeGroupIds>org.codehaus.izpack</excludeGroupIds>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.2</version>
				<executions>
					<execution>
						<id>sign</id>
						<phase>install</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archiveDirectory>target</archiveDirectory>
					<excludes>
						<exclude>**/S*.jar</exclude>
					</excludes>
					<includes>
						<include>*.jar</include>
					</includes>
					<keystore>src/main/resources/keystore.jks</keystore>
					<alias>pdfover_test</alias>
					<storepass>123456</storepass>
					<keypass>123456</keypass>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.4.2</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>validate</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<encoding>UTF-8</encoding>
							<outputDirectory>${staging.dir}</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/resources</directory>
									<includes>
										<include>scripts/*</include>
										<include>icons/*</include>
									</includes>
								</resource>
								<resource>
									<directory>src/main/resources/izpack</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.izpack</groupId>
				<artifactId>izpack-maven-plugin</artifactId>
				<version>1.0-alpha-5</version>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.izpack</groupId>
						<artifactId>izpack-standalone-compiler</artifactId>
						<version>${izpack-standalone.version}</version>
					</dependency>
				</dependencies>
				<configuration>
					<izpackBasedir>${staging.dir}</izpackBasedir>
					<izpackOutput>${staging.dir}/setup.jar</izpackOutput>
				</configuration>
				<executions>
					<execution>
						<id>standard-installer</id>
						<phase>package</phase>
						<goals>
							<goal>izpack</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<properties>
		<staging.dir>${project.build.directory}/staging</staging.dir>
		<target.name>linux</target.name>
		<izpack-standalone.version>4.3.5</izpack-standalone.version>
		<project.maindir>${project.basedir}/..</project.maindir>
	</properties>

	<profiles>
		<profile>
			<id>linux</id>
			<activation>
				<os>
					<name>linux</name>
					<arch>x86</arch>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.gtk.linux.x86</swt.artifactId>
				<staging.dir>${project.build.directory}/staging/linux</staging.dir>
				<target.name>linux</target.name>
			</properties>
		</profile>
		<profile>
			<id>linux-64</id>
			<activation>
				<os>
					<name>linux</name>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.gtk.linux.x86_64</swt.artifactId>
				<staging.dir>${project.build.directory}/staging/linux-64</staging.dir>
				<target.name>linux-64</target.name>
			</properties>
		</profile>

		<profile>
			<id>windows</id>
			<activation>
				<os>
					<family>windows</family>
					<arch>x86</arch>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.win32.win32.x86</swt.artifactId>
				<staging.dir>${project.build.directory}/staging/windows</staging.dir>
				<target.name>windows</target.name>
			</properties>
		</profile>
		<profile>
			<id>windows-64</id>
			<activation>
				<os>
					<family>windows</family>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.win32.win32.x86_64</swt.artifactId>
				<staging.dir>${project.build.directory}/staging/windows-64</staging.dir>
				<target.name>windows-64</target.name>
			</properties>
		</profile>

		<profile>
			<id>mac</id>
			<activation>
				<os>
					<name>mac os x</name>
					<arch>x86</arch>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.cocoa.macosx</swt.artifactId>
				<staging.dir>${project.build.directory}/staging/mac</staging.dir>
				<target.name>mac</target.name>
			</properties>
		</profile>
		<profile>
			<id>mac-64</id>
			<activation>
				<os>
					<name>mac os x</name>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<swt.artifactId>org.eclipse.swt.cocoa.macosx.x86_64</swt.artifactId>
				<staging.dir>${project.build.directory}/staging/mac-64</staging.dir>
				<target.name>mac-64</target.name>
			</properties>
		</profile>
	</profiles>

	<repositories>
		<repository>
			<id>swt-repo</id>
			<url>https://swt-repo.googlecode.com/svn/repo/</url>
		</repository>
		<repository>
			<id>akathist-repository</id>
			<name>Akathist Repository</name>
			<url>http://www.9stmaryrd.com/maven</url>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>akathist-repository</id>
			<name>Akathist Repository</name>
			<url>http://www.9stmaryrd.com/maven</url>
		</pluginRepository>
	</pluginRepositories>

</project>