<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>ru.xpoft.vaadin</groupId>
    <artifactId>spring-vaadin-integration</artifactId>
    <version>3.0.1</version>
    <name>SpringVaadinIntegration</name>
    <packaging>bundle</packaging>
    <url>https://github.com/xpoft/spring-vaadin</url>

    <properties>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring.version>4.0.5.RELEASE</spring.version>
        <vaadin.version>7.2.0</vaadin.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>

    <scm>
        <url>git://github.com/xpoft/spring-vaadin.git</url>
        <connection>scm:git:git://github.com/xpoft/spring-vaadin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:/xpoft/spring-vaadin.git</developerConnection>
        <tag>spring-vaadin-integration</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/xpoft/spring-vaadin/issues</url>
    </issueManagement>

    <dependencies>
        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.7</version>
        </dependency>

        <!-- Web API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>

        <!-- Portlet API -->
        <dependency>
            <groupId>javax.portlet</groupId>
            <artifactId>portlet-api</artifactId>
            <version>2.0</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Spring Portlet -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc-portlet</artifactId>
            <version>${spring.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <!-- Vaadin -->
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-server</artifactId>
            <version>${vaadin.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Apache Shiro -->
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
            <version>1.2.3</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

    </dependencies>

    <distributionManagement>
        <repository>
            <id>repo</id>
            <url>file:///${basedir}/repository</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.4.0</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Export-Package>ru.xpoft.vaadin,ru.xpoft.vaadin.*</Export-Package>
                        <Import-Package>*</Import-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>

                        <!-- Vaadin headers, copied to manifest as is -->
                        <Vaadin-Package-Version>1</Vaadin-Package-Version>
                        <Implementation-Title>${project.name}</Implementation-Title>
                        <Implementation-Version>${project.version}</Implementation-Version>

                    </instructions>
                </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.4</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <descriptors>
                        <descriptor>assembly/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>