<?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>com.vaadin.addon</groupId>
	<artifactId>vaadin-touchkit-agpl</artifactId>
	<packaging>jar</packaging>
	<version>4.0.0.alpha3</version>
	<name>Vaadin TouchKit</name>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>properties-maven-plugin</artifactId>
						<version>1.0-alpha-2</version>
						<executions>
							<execution>
								<phase>initialize</phase>
								<goals>
									<goal>read-project-properties</goal>
								</goals>
								<configuration>
									<files>
										<file>${gpg.passphrase.file}</file>
									</files>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<skip>${gpg.skip}</skip>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.1.2</version>
						<executions>
							<execution>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<version>2.2.1</version>
						<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>
					<!-- Extracts the TouchKit chapter from BoV -->
					<plugin>
						<groupId>com.github.zch</groupId>
						<artifactId>pdfsplit-maven-plugin</artifactId>
						<version>1.0.1</version>
						<executions>
							<execution>
								<id>pdfsplit</id>
								<phase>package</phase>
								<goals>
									<goal>split</goal>
								</goals>
								<configuration>
									<inputUrl>https://vaadin.com/download/book-of-vaadin/vaadin-7/pdf/book-of-vaadin.pdf</inputUrl>
									<chapter>Chapter 22. Mobile Applications with TouchKit</chapter>
									<outFile>${project.build.directory}/vaadin-touchkit-manual.pdf</outFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<organization>
		<name>Vaadin Ltd</name>
		<url>http://vaadin.com/</url>
	</organization>
	<url>http://vaadin.com/</url>
	<scm>
		<connection>scm:svn:http://dev.vaadin.com/svn/addons/TouchKit</connection>
		<developerConnection>scm:svn:http://dev.vaadin.com/svn/addons/TouchKit</developerConnection>
		<url>http://dev.vaadin.com/browser/addons/TouchKit</url>
	</scm>
	<issueManagement>
		<system>trac</system>
		<url>http://dev.vaadin.com/</url>
	</issueManagement>
	<developers>
		<developer>
			<name>Matti Tahvonen</name>
			<id>matti</id>
			<email>matti at vaadin.com</email>
			<organization>Vaadin Ltd</organization>
			<timezone>+2</timezone>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>GNU Affero General Public License version 3.0</name>
			<url>http://www.gnu.org/licenses/agpl-3.0.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- May be overridden by the build system -->
		<license.short.name>agpl</license.short.name>
		<vaadin.version.maven>7.2.0</vaadin.version.maven>
		<gpg.passphrase.file>empty.properties</gpg.passphrase.file>
		<gpg.skip>true</gpg.skip>
		<snapshot.repository.url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</snapshot.repository.url>

		<Implementation-Version>${project.version}</Implementation-Version>
		<!-- Must not change this because of the Directory -->
		<Implementation-Title>Vaadin TouchKit</Implementation-Title>
		<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
		<Vaadin-Addon>vaadin-touchkit-${license.short.name}-${project.version}.jar</Vaadin-Addon>
		<jetty.version>8.1.12.v20130726</jetty.version>
	</properties>

	<distributionManagement>
		<repository>
			<id>vaadin-staging</id>
			<name>Vaadin release staging repository</name>
			<url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>vaadin-snapshots</id>
			<name>Vaadin snapshot repository</name>
			<url>${snapshot.repository.url}</url>
		</snapshotRepository>
	</distributionManagement>

	<description>Provides components and features for mobile devices.</description>

	<repositories>
		<repository>
			<id>vaadin-snapshots</id>
			<url>${snapshot.repository.url}</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>vaadin-snapshots</id>
			<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</pluginRepository>
		<pluginRepository>
			<id>pdfsplit-plugin</id>
			<url>https://raw.github.com/zch/maven/releases/</url>
		</pluginRepository>
	</pluginRepositories>

	<build>

		<resources>
			<!-- These are also needed for the sources required by the GWT compiler
				to be included in the produced JARs -->
			<resource>
				<directory>src/main/java</directory>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<archive>
						<index>true</index>
						<manifest>
							<addClasspath>true</addClasspath>
							<!-- Implementation-Title and Implementation-Version come from the
								POM by default -->
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<!-- Package format version - do not change -->
							<Vaadin-Package-Version>1</Vaadin-Package-Version>
							<AdVaaLicen>${license.short.name}</AdVaaLicen>
							<AdVaaName>vaadin-touchkit</AdVaaName>
							<!-- Comma-separated list of widgetsets in the package -->
							<Vaadin-Widgetsets>com.vaadin.addon.touchkit.gwt.TouchKitWidgetSet</Vaadin-Widgetsets>
						</manifestEntries>
					</archive>
					<!-- exclude other META-INF data under build directory -->
					<includes>
						<include>META-INF/maven/${project.groupId}/${project.artifactId}/**</include>
						<include>com/**</include>
					</includes>
				</configuration>
			</plugin>
			<!-- Compiles your custom GWT components with the GWT compiler -->
			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
				<version>7.1.1</version>
				<configuration>
					<webappDirectory>${project.build.directory}/testwebapp/VAADIN/widgetsets</webappDirectory>
					<modules>
						<module>com.vaadin.addon.touchkit.gwt.TouchKitWidgetSet</module>
					</modules>
					<extraJvmArgs>-Xmx1024M -Xss4024k</extraJvmArgs>
					<runTarget>http://localhost:7777/</runTarget>
					<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
					<noServer>true</noServer>
					<soyc>false</soyc>
					<draftCompile>true</draftCompile>
					<strict>true</strict>
					<style>OBF</style>
					<force>true</force>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--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.codehaus.mojo
										</groupId>
										<artifactId>
											properties-maven-plugin
										</artifactId>
										<versionRange>
											[1.0-alpha-2,)
										</versionRange>
										<goals>
											<goal>
												read-project-properties
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-dependency-plugin
										</artifactId>
										<versionRange>
											[2.1,)
										</versionRange>
										<goals>
											<goal>
												copy-dependencies
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencies>
		<!-- This ought to be transient dependency from Vaadin? -->
		<dependency>
			<groupId>org.eclipse.jetty.orbit</groupId>
			<artifactId>javax.servlet</artifactId>
			<version>3.0.0.v201112011016</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-server</artifactId>
			<version>${vaadin.version.maven}</version>
		</dependency>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-client</artifactId>
			<version>${vaadin.version.maven}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-client-compiler</artifactId>
			<version>${vaadin.version.maven}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.vaadin</groupId>
			<artifactId>vaadin-themes</artifactId>
			<version>${vaadin.version.maven}</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-webapp</artifactId>
			<version>${jetty.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>LATEST</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-jsp-2.1</artifactId>
			<version>LATEST</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jsp-2.1-glassfish</artifactId>
			<version>2.1.v20100127</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

</project>
