<?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/maven-v4_0_0.xsd">

	<!-- PMS consists of two major parts: PMS itself and the third party software 
		needed to run it. While PMS itself is 100% pure Java, some of the third party 
		software is not. This means building a platform specific distribution boils 
		down to first building the pms.jar and then assembling all application resources. 
		Note that Maven 3 does not automatically install all dependencies, unlike 
		Maven 2. To install all dependencies to your local repository, run the following 
		commands: mvn com.savage7.maven.plugins:maven-external-dependency-plugin:resolve-external 
		mvn com.savage7.maven.plugins:maven-external-dependency-plugin:install-external 
		To build PMS, do: mvn clean package After building, the "target" directory 
		will contain the binary. To generate a full source code report, do: mvn site 
		After generating, the "target/site" directory will contain the reports. -->

	<modelVersion>4.0.0</modelVersion>
	<groupId>github.com.taconaut</groupId>
	<artifactId>pms</artifactId>
	<name>PS3 Media Server MLX</name>
	<packaging>jar</packaging>
	<version>1.52.2-mlx_0.8</version>
	<url>http://www.ps3mediaserver.org/</url>
	<inceptionYear>2008</inceptionYear>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<organization>
		<name>PS3 Media Server</name>
		<url>http://www.ps3mediaserver.org/</url>
	</organization>

	<licenses>
		<license>
			<name>GNU General Public License version 2</name>
			<url>http://www.gnu.org/licenses/gpl-2.0.txt</url>
			<distribution>manual</distribution>
		</license>
	</licenses>

	<description>
		PS3 Media Server is a cross-platform DLNA-compliant UPnP Media Server.
		Originally written to support the PlayStation 3, PS3 Media Server has been
		expanded to support a range of other media renderers, including smartphones,
		televisions, music players and more.
	</description>

	<developers>
		<developer>
			<name>shagrath</name>
		</developer>
		<developer>
			<name>tcox</name>
		</developer>
		<developer>
			<name>SubJunk</name>
		</developer>
		<developer>
			<name>taconaut</name>
		</developer>
		<developer>
			<name>tomeko</name>
		</developer>
		<developer>
			<name>chocolateboy</name>
		</developer>
		<developer>
			<name>ditlew</name>
		</developer>
		<developer>
			<name>Raptor399</name>
		</developer>
		<developer>
			<name>renszarv</name>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:taconaut/pms-mlx.git</connection>
		<developerConnection>scm:git:git@github.com:taconaut/pms-mlx.git</developerConnection>
		<tag>master</tag>
		<url>git@github.com:taconaut/pms-mlx.git</url>
	</scm>

	<issueManagement>
		<system>Github</system>
		<url>https://github.com/taconaut/pms-mlx/issues</url>
	</issueManagement>

	<properties>
		<!-- NSIS needs a version without "-SNAPSHOT" or "-b1" -->
		<project.version.short>1.51.0</project.version.short>

		<buildName>${project.name}-${project.version}</buildName>
		<jcalendar-version>1.1.1</jcalendar-version>
		<jgoodies-binding-version>2.5.1</jgoodies-binding-version>

		<cuelib-version>1.2.1-2008-06-13</cuelib-version>
		<jgoodies-common-version>1.2.1</jgoodies-common-version>
		<jgoodies-forms-version>1.4.2</jgoodies-forms-version>
		<jgoodies-looks-version>2.4.2</jgoodies-looks-version>
		<junrar-version>0.5</junrar-version>
		<mediautil-version>1.0</mediautil-version>
		<slf4j-version>1.6.4</slf4j-version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.external-resources>${project.basedir}/src/main/external-resources</project.external-resources>
		<project.binaries>${project.basedir}/target/bin</project.binaries>

		<!-- Snapshots should get their binaries from the trunk, releases from 
			a tag -->
		<project.binaries-base>http://ps3mediaserver.googlecode.com/svn/trunk/ps3mediaserver</project.binaries-base>
		<!-- <project.binaries-base>http://ps3mediaserver.googlecode.com/svn/tags/1.40.0</project.binaries-base> -->

		<maven.nsis.project.template>${project.basedir}/src/main/external-resources/nsis/project.jelly</maven.nsis.project.template>
	</properties>

	<repositories>
		<!-- Sonatype -->
		<repository>
			<id>sonatype.org</id>
			<name>Sonatype Repository</name>
			<url>https://oss.sonatype.org/content/groups/public</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>

		<!-- Java.net -->
		<repository>
			<id>java.net</id>
			<name>Java.net Repository</name>
			<url>http://download.java.net/maven/2/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>

		<!-- netty -->
		<repository>
			<id>jboss</id>
			<url>http://repository.jboss.org/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>

		<!-- GSON -->
		<repository>
			<id>google-gson</id>
			<name>google-gson</name>
			<url>https://google-gson.googlecode.com/svn/mavenrepo/</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>

		<!-- JBoss.org repository -->
		<repository>
			<id>jboss.releases</id>
			<name>JBoss releases</name>
			<url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>

	</repositories>

	<dependencies>
		<dependency>
			<groupId>github.com.taconaut</groupId>
			<artifactId>jtmdb</artifactId>
			<version>1.9.17</version>
		</dependency>

		<dependency>
			<groupId>org.beanshell</groupId>
			<artifactId>bsh-core</artifactId>
			<version>2.0b4</version>
		</dependency>

		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.6</version>
		</dependency>

		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
		</dependency>

		<dependency>
			<groupId>commons-configuration</groupId>
			<artifactId>commons-configuration</artifactId>
			<version>1.7</version>
			<exclusions>
				<!-- no need for commons-logging, as jcl-over-slf4j provides the impl -->
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
			<exclusions>
				<!-- no need for commons-logging, as jcl-over-slf4j provides the impl -->
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.4</version>
		</dependency>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.6</version>
		</dependency>

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.3.166</version>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.0.0</version>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>1.0.0</version>
		</dependency>
		
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<version>3.0.3</version>
		</dependency>

		<dependency>
			<groupId>org.apache.sanselan</groupId>
			<artifactId>sanselan</artifactId>
			<version>0.97-incubator</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j-version}</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j-version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>1.7.1</version>
		</dependency>

		<!-- originally, hamcrest-all 1.2RC2 for the artifact change, see: https://code.google.com/p/hamcrest/issues/detail?id=12#c54 
			FIXME: verify if needed -->
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-integration</artifactId>
			<version>1.2</version>
		</dependency>

		<dependency>
			<groupId>org.jboss.netty</groupId>
			<artifactId>netty</artifactId>
			<version>3.2.4.Final</version>
		</dependency>

		<!-- maven replacement for nsisant-1.2.jar -->
		<dependency>
			<groupId>maven</groupId>
			<artifactId>maven-nsis-plugin</artifactId>
			<version>2.1</version>
		</dependency>

		<dependency>
			<groupId>net.java.dev.rome</groupId>
			<artifactId>rome</artifactId>
			<version>1.0.0</version>
		</dependency>

		<dependency>
			<groupId>org.jvnet.winp</groupId>
			<artifactId>winp</artifactId>
			<version>1.14</version>
		</dependency>

		<dependency>
			<groupId>org</groupId>
			<artifactId>jaudiotagger</artifactId>
			<version>2.0.3</version>
		</dependency>

		<dependency>
			<groupId>net.java.dev.jna</groupId>
			<artifactId>jna</artifactId>
			<version>3.2.5</version>
		</dependency>

		<!-- XXX: not Mavenized: http://www.jgoodies.com/downloads/libraries.html -->
		<dependency>
			<groupId>com.jgoodies</groupId>
			<artifactId>binding</artifactId>
			<version>${jgoodies-binding-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: http://flib.sourceforge.net/JCalendar/doc/index.html -->
		<dependency>
			<groupId>org.freixas</groupId>
			<artifactId>jcalendar</artifactId>
			<version>${jcalendar-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: http://www.jgoodies.com/downloads/libraries.html -->
		<dependency>
			<groupId>com.jgoodies</groupId>
			<artifactId>common</artifactId>
			<version>${jgoodies-common-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: http://www.jgoodies.com/downloads/libraries.html -->
		<dependency>
			<groupId>com.jgoodies</groupId>
			<artifactId>forms</artifactId>
			<version>${jgoodies-forms-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: http://www.jgoodies.com/downloads/libraries.html -->
		<dependency>
			<groupId>com.jgoodies</groupId>
			<artifactId>looks</artifactId>
			<version>${jgoodies-looks-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: http://github.com/edmund-wagner/junrar -->
		<dependency>
			<groupId>de.innosystec</groupId>
			<artifactId>java-unrar</artifactId>
			<version>${junrar-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: https://code.google.com/p/cuelib/ -->
		<dependency>
			<groupId>jwbroek.cuelib</groupId>
			<artifactId>cuelib</artifactId>
			<version>${cuelib-version}</version>
		</dependency>

		<!-- XXX: not Mavenized: http://sourceforge.net/projects/mediachest/ -->
		<dependency>
			<groupId>mediautil</groupId>
			<artifactId>mediautil</artifactId>
			<version>${mediautil-version}</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>3.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<defaultGoal>assembly:assembly</defaultGoal>

		<resources>
			<!-- squashed bug: this needs to be defined explicitly if a <resources>...</resources> 
				section is used -->

			<resource>
				<directory>src/main/resources</directory>
				<!-- By default Maven packages resources in the top-level of the jar. 
					For compatibility with trunk PMS, we preserve that destination. If this is 
					ever changed to the Maven default, a handful of files will need to be changed 
					to reference "/resource.name" rather than "/resources/resource.name" -->
				<targetPath>resources</targetPath>
				<excludes>
					<exclude>project.properties</exclude>
				</excludes>

				<!-- Avoid inadvertently filtering binaries -->
				<filtering>false</filtering>
			</resource>

			<resource>
				<directory>src/main/resources</directory>
				<targetPath>resources</targetPath>
				<includes>
					<include>project.properties</include>
				</includes>

				<!-- Filter to replace Maven properties -->
				<filtering>true</filtering>
			</resource>

			<!-- There are (or were) reportedly issues with Eclipse's "Externalize 
				Strings" wizard if these aren't in the source tree, so keep them here for 
				now, even though it's Mavenly-incorrect. -->
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.properties</include>
				</includes>
			</resource>

			<!-- Copy and filter the NSIS header file to replace Maven properties -->
			<resource>
				<directory>src/main/external-resources/nsis</directory>
				<includes>
					<include>extra.nsh</include>
				</includes>
				<filtering>true</filtering>
				<targetPath>..</targetPath>
			</resource>
		</resources>

		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<includes>
					<include>project.properties</include>
				</includes>
				<targetPath>resources</targetPath>

				<!-- Enable the use of Maven properties -->
				<filtering>true</filtering>
			</testResource>
		</testResources>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.11</version>
				</plugin>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-antrun-plugin
										</artifactId>
										<versionRange>
											[1.7,)
										</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											pl.project13.maven
										</groupId>
										<artifactId>
											git-commit-id-plugin
										</artifactId>
										<versionRange>
											[1.9,)
										</versionRange>
										<goals>
											<goal>revision</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
			<!-- Plugin to add git commit information properties. These are used in 
				the project.properties files. See: https://github.com/ktoso/maven-git-commit-id-plugin -->
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>1.9</version>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<dateFormat>yyyy-MM-dd</dateFormat>
					<verbose>false</verbose>
					<generateGitPropertiesFile>false</generateGitPropertiesFile>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<fork>false</fork>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<additionalProjectnatures>
						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
					</additionalProjectnatures>
					<additionalBuildcommands>
						<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
					</additionalBuildcommands>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
					<wtpversion>1.5</wtpversion>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-idea-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
					<dependenciesAsLibraries>true</dependenciesAsLibraries>
					<useFullNames>false</useFullNames>
				</configuration>
			</plugin>

			<!-- Plugin to assemble a jar with dependencies -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>make-jar-with-dependencies</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>${project.basedir}/src/main/assembly/jar-with-dependencies.xml</descriptor>
							</descriptors>
							<archive>
								<manifest>
									<mainClass>net.pms.PMS</mainClass>
								</manifest>
							</archive>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- This plugin will take care of installing the external dependencies 
				that do not exist in a public Maven repository. That is why we store some 
				jar files in the "src/main/external-resources/lib" directory and have this 
				plugin take care of the installation at build time. Note: The plugin does 
				not work automatically in Maven 3. To install the required dependencies execute 
				the following commands: mvn com.savage7.maven.plugins:maven-external-dependency-plugin:resolve-external 
				mvn com.savage7.maven.plugins:maven-external-dependency-plugin:install-external 
				Checksums can be calculated with "openssl sha1 [filename]". See: http://code.google.com/p/maven-external-dependency-plugin/issues/detail?id=8#c4 -->
			<plugin>
				<groupId>com.savage7.maven.plugins</groupId>
				<artifactId>maven-external-dependency-plugin</artifactId>
				<version>0.4</version>
				<inherited>false</inherited>
				<configuration>
					<stagingDirectory>${project.build.directory}/dependencies/</stagingDirectory>
					<createChecksum>true</createChecksum>
					<skipChecksumVerification>false</skipChecksumVerification>
					<force>false</force>
					<artifactItems>

						<artifactItem>
							<groupId>com.jgoodies</groupId>
							<artifactId>common</artifactId>
							<version>${jgoodies-common-version}</version>
							<packaging>jar</packaging>
							<install>true</install>
							<force>false</force>
							<downloadUrl>http://www.jgoodies.com/download/libraries/{artifactId}/jgoodies-{artifactId}-{_version}.zip</downloadUrl>
							<checksum>5a4cf9866a7339e64e52f46101b5b13fe50b9c80</checksum>
							<extractFile>jgoodies-{artifactId}-{version}/jgoodies-{artifactId}-{version}.{packaging}</extractFile>
							<extractFileChecksum>f3955d59f2263fb889b02febec74377647a2eaba</extractFileChecksum>
						</artifactItem>

						<artifactItem>
							<groupId>com.jgoodies</groupId>
							<artifactId>forms</artifactId>
							<version>${jgoodies-forms-version}</version>
							<packaging>jar</packaging>
							<install>true</install>
							<force>false</force>
							<downloadUrl>http://www.jgoodies.com/download/libraries/{artifactId}/jgoodies-{artifactId}-{_version}.zip</downloadUrl>
							<checksum>83bb8780a38cb6bc854964da298f0f657868871d</checksum>
							<extractFile>jgoodies-{artifactId}-{version}/jgoodies-{artifactId}-{version}.{packaging}</extractFile>
							<extractFileChecksum>de8a67990cbeae62910cc2022f06c466476f2f2b</extractFileChecksum>
						</artifactItem>

						<artifactItem>
							<groupId>com.jgoodies</groupId>
							<artifactId>looks</artifactId>
							<version>${jgoodies-looks-version}</version>
							<packaging>jar</packaging>
							<install>true</install>
							<force>false</force>
							<downloadUrl>http://www.jgoodies.com/download/libraries/{artifactId}/jgoodies-{artifactId}-{_version}.zip</downloadUrl>
							<checksum>ccba2963e63c8349f8a16a10abfd5102a94a182b</checksum>
							<extractFile>jgoodies-{artifactId}-{version}/jgoodies-{artifactId}-{version}.{packaging}</extractFile>
							<extractFileChecksum>535745c08e342f7ea78556baad44a4a52ffb7863</extractFileChecksum>
						</artifactItem>

						<artifactItem>
							<groupId>jwbroek.cuelib</groupId>
							<artifactId>cuelib</artifactId>
							<version>${cuelib-version}</version>
							<packaging>jar</packaging>
							<downloadUrl>http://cuelib.googlecode.com/files/cuelib-${cuelib-version}.jar</downloadUrl>
							<checksum>d03b6b960b3b83a2a419e8b5f07b6ba4bd18387b</checksum>
						</artifactItem>

						<artifactItem>
							<groupId>de.innosystec</groupId>
							<artifactId>java-unrar</artifactId>
							<version>${junrar-version}</version>
							<packaging>jar</packaging>
							<install>true</install>
							<force>false</force>
							<downloadUrl>http://cloud.github.com/downloads/edmund-wagner/junrar/java-unrar-${junrar-version}.zip</downloadUrl>
							<checksum>1e621c27dba2feeac400a96042f55775dc47f990</checksum>
							<extractFile>java-unrar-${junrar-version}/java-unrar-${junrar-version}.jar</extractFile>
							<extractFileChecksum>111074096b6bdce79fa09842143c336a5cf64fcb</extractFileChecksum>
						</artifactItem>

						<artifactItem>
							<groupId>mediautil</groupId>
							<artifactId>mediautil</artifactId>
							<version>${mediautil-version}</version>
							<packaging>jar</packaging>
							<install>true</install>
							<force>false</force>
							<downloadUrl>http://downloads.sourceforge.net/project/mediachest/MediaUtil/Version%201.0/mediautil-1.zip</downloadUrl>
							<checksum>aa7ae51bb24a9268a8e57c6afe478c4293f84fda</checksum>
							<extractFile>mediautil-${mediautil-version}/mediautil-${mediautil-version}.jar</extractFile>
							<extractFileChecksum>e843cd55def75dce57123c79b7f36caca4841466</extractFileChecksum>
						</artifactItem>

					</artifactItems>

				</configuration>

				<executions>

					<execution>
						<id>clean-external-dependencies</id>
						<phase>clean</phase>
						<goals>
							<!-- mvn com.savage7.maven.plugins:maven-external-dependency-plugin:clean-external -->
							<goal>clean-external</goal>
						</goals>
					</execution>

					<execution>
						<id>resolve-install-external-dependencies</id>
						<!-- Not bound to a phase, you need to execute these manually. See 
							above -->
						<!-- phase>process-resources</phase -->
						<goals>
							<!-- mvn com.savage7.maven.plugins:maven-external-dependency-plugin:resolve-external -->
							<goal>resolve-external</goal>

							<!-- mvn com.savage7.maven.plugins:maven-external-dependency-plugin:install-external -->
							<goal>install-external</goal>
						</goals>
					</execution>
				</executions>

			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.0</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.doxia</groupId>
						<artifactId>doxia-module-docbook-simple</artifactId>
						<version>1.2</version>
					</dependency>
				</dependencies>

				<configuration>
					<reportPlugins>

						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-project-info-reports-plugin</artifactId>
							<version>2.4</version>
							<reports>
								<report>index</report>
								<report>dependencies</report>
								<report>dependency-convergence</report>
								<report>dependency-management</report>
								<report>plugins</report>
							</reports>
						</plugin>

						<!-- PMS tests report -->
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-report-plugin</artifactId>
							<version>2.5</version>
							<configuration>
								<showSuccess>false</showSuccess>
							</configuration>
						</plugin>

						<!-- Javadoc -->
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<version>2.8</version>
							<configuration>
								<quiet>true</quiet>
								<tags>
									<tag>
										<name>todo</name>
										<placement>a</placement>
										<head>To Do:</head>
									</tag>
									<tag>
										<name>review</name>
										<placement>a</placement>
										<head>Review:</head>
									</tag>
								</tags>
								<detectJavaApiLink>false</detectJavaApiLink>
								<links>
									<link>http://download.oracle.com/javase/6/docs/api/</link>
								</links>
								<!-- Doclet to generate class diagrams inside Javadoc. Requires the 
									installation of Graphviz (http://www.graphviz.org/) -->
								<doclet>org.jboss.apiviz.APIviz</doclet>
								<docletArtifact>
									<groupId>org.jboss.apiviz</groupId>
									<artifactId>apiviz</artifactId>
									<version>1.3.1.GA</version>
								</docletArtifact>
								<useStandardDocletOptions>true</useStandardDocletOptions>
							</configuration>
						</plugin>

						<!-- Class dependency report -->
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>jdepend-maven-plugin</artifactId>
							<version>2.0-beta-2</version>
						</plugin>

						<!-- Findbugs report -->
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>findbugs-maven-plugin</artifactId>
							<version>2.3.2</version>
						</plugin>

						<!-- Checkstyle report will go out of memory because of the huge amount 
							of issues it finds(!) <plugin> <groupId>org.apache.maven.plugins</groupId> 
							<artifactId>maven-checkstyle-plugin</artifactId> <version>2.8</version> </plugin> -->

						<!-- Cobertura Test Coverage report -->
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>cobertura-maven-plugin</artifactId>
							<version>2.5.1</version>
						</plugin>

						<!-- PMD and CPD code analysis report -->
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-pmd-plugin</artifactId>
							<version>2.6</version>
							<configuration>
								<linkXref>false</linkXref>
								<sourceEncoding>utf-8</sourceEncoding>
								<minimumTokens>100</minimumTokens>
								<targetJdk>1.6</targetJdk>
							</configuration>
						</plugin>

						<!-- L10n internationalization report -->
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>l10n-maven-plugin</artifactId>
							<version>1.0-alpha-2</version>
							<configuration>
								<locales>
									<locale>de</locale>
									<locale>bg</locale>
									<locale>br</locale>
									<locale>ca</locale>
									<locale>cz</locale>
									<locale>da</locale>
									<locale>de</locale>
									<locale>el</locale>
									<locale>es</locale>
									<locale>fi</locale>
									<locale>fr</locale>
									<locale>is</locale>
									<locale>it</locale>
									<locale>ja</locale>
									<locale>ko</locale>
									<locale>nl</locale>
									<locale>no</locale>
									<locale>pl</locale>
									<locale>pt</locale>
									<locale>ro</locale>
									<locale>ru</locale>
									<locale>sl</locale>
									<locale>sv</locale>
									<locale>zhs</locale>
									<locale>zht</locale>
								</locales>
							</configuration>
						</plugin>

					</reportPlugins>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>

		<!-- Windows profile: takes care of building the final package for Microsoft 
			Windows -->
		<profile>
			<id>windows</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<os>
					<family>windows</family>
				</os>
			</activation>


			<pluginRepositories>
				<pluginRepository>
					<id>Codehaus Snapshots</id>
					<url>http://nexus.codehaus.org/snapshots/</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<releases>
						<enabled>true</enabled>
					</releases>
				</pluginRepository>
			</pluginRepositories>

			<build>
				<plugins>

					<!-- Plugin to move the pms-x.x.x-jar-with-dependencies.jar to pms.jar -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.7</version>
						<executions>
							<execution>
								<id>process-resources-windows</id>
								<phase>process-resources</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<target>
										<!-- Make sure the download folders exist -->
										<mkdir dir="${project.binaries}" />
										<mkdir dir="${project.binaries}/win32" />
										<mkdir dir="${project.binaries}/win32/codecs" />
										<mkdir dir="${project.binaries}/win32/dvrms" />
										<mkdir dir="${project.binaries}/win32/fonts" />
										<mkdir dir="${project.binaries}/win32/fonts/conf.avail" />
										<mkdir dir="${project.binaries}/win32/fonts/conf.d" />
										<mkdir dir="${project.binaries}/win32/fonts" />
										<mkdir dir="${project.binaries}/win32/mplayer" />
										<mkdir dir="${project.binaries}/win32/service" />

										<!-- Download all necessary Windows binaries. Keep the same structure 
											because NSIS expects it that way. -->
										<get src="${project.binaries-base}/MediaInfo.dll" dest="${project.binaries}/MediaInfo.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/MediaInfo64.dll" dest="${project.binaries}/MediaInfo64.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/Convert_License.txt" dest="${project.binaries}/win32/Convert_License.txt" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/LICENSE.txt" dest="${project.binaries}/win32/LICENSE.txt" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/builds.txt" dest="${project.binaries}/win32/builds.txt" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/convert.exe" dest="${project.binaries}/win32/convert.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/dcrawMS.exe" dest="${project.binaries}/win32/dcrawMS.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/ffmpeg.exe" dest="${project.binaries}/win32/ffmpeg.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/flac.exe" dest="${project.binaries}/win32/flac.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/mencoder.exe" dest="${project.binaries}/win32/mencoder.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/mplayer.exe" dest="${project.binaries}/win32/mplayer.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/pthreadGC2.dll" dest="${project.binaries}/win32/pthreadGC2.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/tsMuxeR.exe" dest="${project.binaries}/win32/tsMuxeR.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/vcomp100.dll" dest="${project.binaries}/win32/vcomp100.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/drv33260.dll" dest="${project.binaries}/win32/codecs/drv33260.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/drv43260.dll" dest="${project.binaries}/win32/codecs/drv43260.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/pncrt.dll" dest="${project.binaries}/win32/codecs/pncrt.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/sipr3260.dll" dest="${project.binaries}/win32/codecs/sipr3260.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/tokr3260.dll" dest="${project.binaries}/win32/codecs/tokr3260.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/wma9dmod.dll" dest="${project.binaries}/win32/codecs/wma9dmod.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/wmv9dmod.dll" dest="${project.binaries}/win32/codecs/wmv9dmod.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/codecs/wmvdmod.dll" dest="${project.binaries}/win32/codecs/wmvdmod.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/dvrms/ffmpeg_MPGMUX.exe" dest="${project.binaries}/win32/dvrms/ffmpeg_MPGMUX.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/dvrms/pthreadGC2.dll" dest="${project.binaries}/win32/dvrms/pthreadGC2.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/fonts.conf" dest="${project.binaries}/win32/fonts/fonts.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/fonts.dtd" dest="${project.binaries}/win32/fonts/fonts.dtd" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-autohint.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-autohint.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-no-sub-pixel.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-no-sub-pixel.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-sub-pixel-bgr.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-sub-pixel-bgr.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-sub-pixel-rgb.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-sub-pixel-rgb.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-sub-pixel-vbgr.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-sub-pixel-vbgr.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-sub-pixel-vrgb.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-sub-pixel-vrgb.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/10-unhinted.conf" dest="${project.binaries}/win32/fonts/conf.avail/10-unhinted.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/20-fix-globaladvance.conf" dest="${project.binaries}/win32/fonts/conf.avail/20-fix-globaladvance.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/20-unhint-small-vera.conf" dest="${project.binaries}/win32/fonts/conf.avail/20-unhint-small-vera.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/25-unhint-nonlatin.conf" dest="${project.binaries}/win32/fonts/conf.avail/25-unhint-nonlatin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/30-metric-aliases.conf" dest="${project.binaries}/win32/fonts/conf.avail/30-metric-aliases.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/30-urw-aliases.conf" dest="${project.binaries}/win32/fonts/conf.avail/30-urw-aliases.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/40-nonlatin.conf" dest="${project.binaries}/win32/fonts/conf.avail/40-nonlatin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/45-latin.conf" dest="${project.binaries}/win32/fonts/conf.avail/45-latin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/49-sansserif.conf" dest="${project.binaries}/win32/fonts/conf.avail/49-sansserif.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/50-user.conf" dest="${project.binaries}/win32/fonts/conf.avail/50-user.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/51-local.conf" dest="${project.binaries}/win32/fonts/conf.avail/51-local.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/60-latin.conf" dest="${project.binaries}/win32/fonts/conf.avail/60-latin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/65-fonts-persian.conf" dest="${project.binaries}/win32/fonts/conf.avail/65-fonts-persian.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/65-khmer.conf" dest="${project.binaries}/win32/fonts/conf.avail/65-khmer.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/65-nonlatin.conf" dest="${project.binaries}/win32/fonts/conf.avail/65-nonlatin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/69-unifont.conf" dest="${project.binaries}/win32/fonts/conf.avail/69-unifont.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/70-no-bitmaps.conf" dest="${project.binaries}/win32/fonts/conf.avail/70-no-bitmaps.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/70-yes-bitmaps.conf" dest="${project.binaries}/win32/fonts/conf.avail/70-yes-bitmaps.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/80-delicious.conf" dest="${project.binaries}/win32/fonts/conf.avail/80-delicious.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.avail/90-synthetic.conf" dest="${project.binaries}/win32/fonts/conf.avail/90-synthetic.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/20-fix-globaladvance.conf" dest="${project.binaries}/win32/fonts/conf.d/20-fix-globaladvance.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/20-unhint-small-vera.conf" dest="${project.binaries}/win32/fonts/conf.d/20-unhint-small-vera.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/30-metric-aliases.conf" dest="${project.binaries}/win32/fonts/conf.d/30-metric-aliases.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/30-urw-aliases.conf" dest="${project.binaries}/win32/fonts/conf.d/30-urw-aliases.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/40-nonlatin.conf" dest="${project.binaries}/win32/fonts/conf.d/40-nonlatin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/45-latin.conf" dest="${project.binaries}/win32/fonts/conf.d/45-latin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/49-sansserif.conf" dest="${project.binaries}/win32/fonts/conf.d/49-sansserif.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/50-user.conf" dest="${project.binaries}/win32/fonts/conf.d/50-user.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/51-local.conf" dest="${project.binaries}/win32/fonts/conf.d/51-local.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/60-latin.conf" dest="${project.binaries}/win32/fonts/conf.d/60-latin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/65-fonts-persian.conf" dest="${project.binaries}/win32/fonts/conf.d/65-fonts-persian.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/65-nonlatin.conf" dest="${project.binaries}/win32/fonts/conf.d/65-nonlatin.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/69-unifont.conf" dest="${project.binaries}/win32/fonts/conf.d/69-unifont.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/80-delicious.conf" dest="${project.binaries}/win32/fonts/conf.d/80-delicious.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/90-synthetic.conf" dest="${project.binaries}/win32/fonts/conf.d/90-synthetic.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/fonts/conf.d/README" dest="${project.binaries}/win32/fonts/conf.d/README" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/mplayer/config" dest="${project.binaries}/win32/mplayer/config" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/mplayer/input.conf" dest="${project.binaries}/win32/mplayer/input.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/mplayer/subfont.ttf" dest="${project.binaries}/win32/mplayer/subfont.ttf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/service/wrapper-community-license-1.1.txt" dest="${project.binaries}/win32/service/wrapper-community-license-1.1.txt" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/service/wrapper.conf" dest="${project.binaries}/win32/service/wrapper.conf" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/service/wrapper.dll" dest="${project.binaries}/win32/service/wrapper.dll" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/service/wrapper.exe" dest="${project.binaries}/win32/service/wrapper.exe" usetimestamp="true" />
										<get src="${project.binaries-base}/win32/service/wrapper.jar" dest="${project.binaries}/win32/service/wrapper.jar" usetimestamp="true" />
									</target>
								</configuration>
							</execution>
							<execution>
								<id>prepare-package-windows</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<target>
										<!-- Copy the pms-x.x.x-jar-with-dependencies.jar to pms.jar -->
										<copy file="${project.basedir}/target/${project.artifactId}-${project.version}-jar-with-dependencies.jar" tofile="${project.basedir}/target/pms.jar" overwrite="true" />

										<!-- MediaInfo library needs to be in the standard library path 
											to be found -->
										<copy file="${project.binaries}/MediaInfo.dll" todir="${project.basedir}" />
										<copy file="${project.binaries}/MediaInfo64.dll" todir="${project.basedir}" />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- Plugin to build a Windows installer using the nullsoft scriptable 
						install system (NSIS) The "generate-project" goal generates a file "target/project.nsh", 
						which contains the definitions for project variables like "${PROJECT_BASEDIR}" 
						that can be used in the "pms.nsi" and "setup.nsi" files. -->
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>nsis-maven-plugin</artifactId>
						<version>1.0-SNAPSHOT</version>
						<executions>
							<execution>
								<id>build-pms-windows</id>
								<configuration>
									<makensisBin>${project.external-resources}/third-party/nsis/makensis.exe</makensisBin>
									<outputFile>${project.build.directory}/PMS.exe</outputFile>
									<setupScript>${project.external-resources}/nsis/pms.nsi</setupScript>
								</configuration>
								<phase>package</phase>
								<goals>
									<goal>generate-project</goal>
									<goal>compile</goal>
								</goals>
							</execution>

							<execution>
								<id>build-setup-windows</id>
								<configuration>
									<makensisBin>${project.external-resources}/third-party/nsis/makensis.exe</makensisBin>
									<outputFile>${project.build.directory}/${project.artifactId}-${project.version}-windows-setup.exe</outputFile>
									<setupScript>${project.external-resources}/nsis/setup.nsi</setupScript>
								</configuration>
								<phase>package</phase>
								<goals>
									<goal>generate-project</goal>
									<goal>compile</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>


		<!-- Linux profile: takes care of building the final package for Linux -->
		<profile>
			<id>linux</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<os>
					<family>unix</family>
				</os>
			</activation>

			<build>
				<plugins>
					<!-- Plugin to copy the pms-x.x.x-jar-with-dependencies.jar to pms.jar -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.7</version>
						<executions>
							<execution>
								<id>process-resources-linux</id>
								<phase>process-resources</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<target>
										<!-- Make sure the binaries folder exists -->
										<mkdir dir="${project.binaries}" />

										<!-- Download binaries -->
										<get src="${project.binaries-base}/linux/tsMuxeR" dest="${project.binaries}/tsMuxeR" usetimestamp="true" />
									</target>
								</configuration>
							</execution>

							<execution>
								<id>copy-jar-with-dependencies-linux</id>
								<phase>package</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<target>
										<copy file="${project.basedir}/target/${project.artifactId}-${project.version}-jar-with-dependencies.jar" tofile="${project.basedir}/target/pms.jar" overwrite="true" />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- Plugin to assemble the PMS distribution file. -->
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>build-pms-linux</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>${project.basedir}/src/main/assembly/assembly-linux.xml</descriptor>
									</descriptors>
									<archive>
										<manifest>
											<mainClass>net.pms.PMS</mainClass>
										</manifest>
									</archive>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>


		<!-- Mac OSX profile: takes care of building the final package for Mac 
			OSX -->
		<profile>
			<id>osx</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<os>
					<family>mac</family>
				</os>
			</activation>
			<build>
				<plugins>

					<!-- Plugin to download binaries before assembly -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.7</version>
						<executions>
							<execution>
								<id>process-resources-osx</id>
								<phase>test</phase>
								<goals>
									<goal>run</goal>
								</goals>

								<configuration>
									<target>
										<!-- Make sure the binaries folder exists -->
										<mkdir dir="${project.binaries}" />
										<mkdir dir="${project.binaries}/osx" />

										<!-- Download binaries -->
										<get src="${project.binaries-base}/osx/dcraw" dest="${project.binaries}/osx/dcraw" usetimestamp="true" />
										<get src="${project.binaries-base}/osx/ffmpeg" dest="${project.binaries}/osx/ffmpeg" usetimestamp="true" />
										<get src="${project.binaries-base}/osx/flac" dest="${project.binaries}/osx/flac" usetimestamp="true" />
										<get src="${project.binaries-base}/osx/libmediainfo.dylib" dest="${project.binaries}/libmediainfo.dylib" usetimestamp="true" />
										<get src="${project.binaries-base}/osx/mencoder" dest="${project.binaries}/osx/mencoder" usetimestamp="true" />
										<get src="${project.binaries-base}/osx/mplayer" dest="${project.binaries}/osx/mplayer" usetimestamp="true" />
										<get src="${project.binaries-base}/osx/tsMuxeR" dest="${project.binaries}/osx/tsMuxeR" usetimestamp="true" />

										<!-- MediaInfo library needs to be in the standard library path 
											to be found -->
										<copy file="${project.binaries}/libmediainfo.dylib" todir="${project.basedir}" />

										<!-- Make all downloaded binaries executable -->
										<chmod dir="${project.binaries}/osx" perm="a+x" includes="*" />

										<copy file="${project.external-resources}/osx/pms.icns" todir="${project.binaries}" overwrite="true" />
									</target>
								</configuration>
							</execution>

							<execution>
								<id>prepare-package-osx</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<target>
										<!-- Make sure the target folder exists -->
										<mkdir dir="${project.build.directory}/${project.build.finalName}-distribution" />

										<!-- Create the shortcut to the Applications folder -->
										<exec executable="/usr/bin/osascript">
											<arg value="-e" />
											<arg value="tell application &quot;Finder&quot;" />
											<arg value="-e" />
											<arg value="set src to POSIX file &quot;/Applications&quot;" />
											<arg value="-e" />
											<arg value="set dest to POSIX file &quot;${project.build.directory}/${project.build.finalName}-distribution&quot;" />
											<arg value="-e" />
											<arg value="make new alias file to folder src at folder dest" />
											<arg value="-e" />
											<arg value="end tell" />
										</exec>
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- Plugin to assemble the PMS files in the right place before creating 
						the App Bundle and DMG disk image. -->
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>make-assembly-osx</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>${project.basedir}/src/main/assembly/assembly-osx.xml</descriptor>
									</descriptors>
									<archive>
										<manifest>
											<mainClass>net.pms.PMS</mainClass>
										</manifest>
									</archive>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- Plugin to create the OSX Application Bundle and DMG disk image. 
						This will automatically copy all dependencies to a local repository, so the 
						jar-with-dependencies is not needed here. -->
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>osxappbundle-maven-plugin</artifactId>
						<version>1.0-alpha-2</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>bundle</goal>
								</goals>
								<configuration>
									<mainClass>net.pms.PMS</mainClass>
									<buildDirectory>${project.build.directory}/${project.build.finalName}-distribution</buildDirectory>
									<diskImageFile>${project.build.directory}/${project.build.finalName}.dmg</diskImageFile>
									<zipFile>${project.build.directory}/${project.build.finalName}-app.zip</zipFile>
									<javaApplicationStub>/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub</javaApplicationStub>
									<bundleName>${project.name}</bundleName>
									<iconFile>${project.basedir}/target/bin/pms.icns</iconFile>
									<version>${project.version}</version>
									<jvmVersion>1.6+</jvmVersion>
									<!-- Options to the JVM, will be used as the value of VMOptions 
										in Info.plist. -->
									<vmOptions>-Xmx768M -Xss16M -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar</vmOptions>
									<dictionaryFile>${project.external-resources}/osx/Info.plist-template.xml</dictionaryFile>
									<internetEnable>false</internetEnable>
									<additionalClasspath />
									<additionalResources />
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- This profile allows running PMS from inside Eclipse (Requires a "mvn 
			clean package" to download the binaries first) -->
		<profile>
			<id>run-from-eclipse</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>1.1.1</version>
						<executions>
							<execution>
								<phase>test</phase>
								<goals>
									<goal>java</goal>
								</goals>
								<configuration>
									<classpathScope>test</classpathScope>
									<mainClass>net.pms.PMS</mainClass>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<ciManagement>
		<system>Jenkins</system>
		<url>http://pms.smoeller.de/</url>
	</ciManagement>
</project>
