<?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>ch.meemin</groupId>
	<artifactId>component-help</artifactId>
	<packaging>jar</packaging>
	<version>0.9</version>
	<name>ComponentHelp</name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<vaadin.version>7.3.3</vaadin.version>
		<vaadin.plugin.version>${vaadin.version}</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>${project.organization.name}</Implementation-Vendor>
		<Vaadin-License-Title>Apache License 2.0</Vaadin-License-Title>
		<Vaadin-Addon>${artifactId}-${project.version}.jar</Vaadin-Addon>
	</properties>

	<organization>
		<name>Meemin</name>
		<url>https://meemin.ch/</url>
	</organization>
    
	<scm>
		<url>https://gitlab.com/qwasli/component-help</url>
		<connection>scm:git:https://gitlab.com/qwasli/component-help.git</connection>
		<developerConnection>scm:git:ssh://git@gitlab.com:qwasli/component-help.git</developerConnection>
		<tag>ComponentHelp add-on for Vaadin</tag>
	</scm>

	<issueManagement>
		<system>GitLab</system>
		<url>https://gitlab.com/qwasli/component-help/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>
		<repository>
			<id>vaadin-snapshots</id>
			<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</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>
	</pluginRepositories>

	<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>
	</dependencies>

	<build>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.0</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</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>
							<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>ch.meemin.comphelp.WidgetSet</Vaadin-Widgetsets>
							<Vaadin-Stylesheets>VAADIN/addons/componenthelp/componenthelp.scss</Vaadin-Stylesheets>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9</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>2.2.1</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>
				<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>

			<!-- Testing -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.14.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>

</project>
