<?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">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.vaadin.addon.audio</groupId>
	<artifactId>AudioPlayer</artifactId>
	<packaging>jar</packaging>
	<version>1.3</version>
	<name>AudioPlayer Add-on</name>

	<prerequisites>
		<maven>3</maven>
	</prerequisites>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<vaadin.version>7.7.7</vaadin.version>
		<vaadin.plugin.version>7.7.7</vaadin.plugin.version>

		<!-- ZIP Manifest fields -->
		<Implementation-Version>${project.version}</Implementation-Version>
		<!-- Must not change this because of the Directory -->
		<Implementation-Title>${project.name}</Implementation-Title>
		<Implementation-Vendor>Drew Harvey</Implementation-Vendor>
		<Vaadin-License-Title>Apache License 2.0</Vaadin-License-Title>
		<Vaadin-Addon>${project.artifactId}-${project.version}.jar</Vaadin-Addon>
		<maven.javadoc.skip>true</maven.javadoc.skip>
	</properties>

	<!-- <organization> <name>My Name</name> <url>https://github.com/mygithubaccount/AudioPlayer/</url> 
		</organization> <scm> <url>https://github.com/mygithubaccount/AudioPlayer</url> 
		<connection>scm:git:git://github.com/mygithubaccount/AudioPlayer.git</connection> 
		<developerConnection>scm:git:ssh://git@github.com:/mygithubaccount/${componentClassName}.git</developerConnection> 
		<tag>AudioPlayer add-on for Vaadin</tag> </scm> <issueManagement> <system>GitHub</system> 
		<url>https://github.com/mygithubaccount/AudioPlayer/issues</url> </issueManagement> -->

	<licenses>
		<license>
			<name>Apache 2</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<repositories>
		<repository>
			<id>vaadin-addons</id>
			<url>http://maven.vaadin.com/vaadin-addons</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-server</artifactId>
			<version>${vaadin.version}</version>
		</dependency>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-client</artifactId>
			<version>${vaadin.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- This can be replaced with TestNG or some other test framework supported 
			by the surefire plugin -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>

		<!-- For Vorbis encoding support -->
		<dependency>
			<groupId>org.gagravarr</groupId>
			<artifactId>vorbis-java-core</artifactId>
			<version>0.8</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<!-- <version>2.12.4</version> -->
				<configuration>
					<skipTests>true</skipTests>
				</configuration>
			</plugin>

			<!-- vaadin update widgetset -->
			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
				<version>7.7.7</version>
				<configuration>
					<extraJvmArgs>-Xmx8196M -Xss2048k</extraJvmArgs>
					<webappDirectory>${basedir}/target/VAADIN/widgetsets</webappDirectory>
					<hostedWebapp>${basedir}/target/VAADIN/widgetsets</hostedWebapp>
					<force>false</force>
					<strict>true</strict>
					<noServer>true</noServer>
					<compileReport>true</compileReport>
					<style>pretty</style>
					<lifecycleMappingMetadata>
						<pluginExecutions>
							<pluginExecution>
								<pluginExecutionFilter>
									<goals>
										<goal>resources</goal>
										<goal>update-widgetset</goal>
										<goal>compile</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<ignore />
								</action>
							</pluginExecution>
						</pluginExecutions>
					</lifecycleMappingMetadata>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<archive>
						<index>true</index>
						<manifest>
							<addClasspath>true</addClasspath>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<!-- Package format version - do not change -->
							<Vaadin-Package-Version>1</Vaadin-Package-Version>
							<Vaadin-License-Title>${Vaadin-License-Title}</Vaadin-License-Title>
							<Vaadin-Widgetsets>org.vaadin.addon.audio.WidgetSet</Vaadin-Widgetsets>
							<Implementation-Vendor>Drew Harvey</Implementation-Vendor>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<appendAssemblyId>false</appendAssemblyId>
					<descriptors>
						<descriptor>assembly/assembly.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>single</goal>
						</goals>
						<phase>install</phase>
					</execution>
				</executions>
			</plugin>

			<!-- Testing -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
			</plugin>
		</plugins>

		<!-- This is needed for the sources required by the client-side compiler 
			to be included in the produced JARs -->
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<excludes>
					<exclude>rebel.xml</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

	</build>

	<profiles>
		<profile>
			<!-- Vaadin pre-release repositories -->
			<id>vaadin-prerelease</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>

			<repositories>
				<repository>
					<id>vaadin-prereleases</id>
					<url>http://maven.vaadin.com/vaadin-prereleases</url>
				</repository>
				<repository>
					<id>vaadin-snapshots</id>
					<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>vaadin-prereleases</id>
					<url>http://maven.vaadin.com/vaadin-prereleases</url>
				</pluginRepository>
				<pluginRepository>
					<id>vaadin-snapshots</id>
					<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
					<releases>
						<enabled>false</enabled>
					</releases>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>

</project>
