<?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>com.vaadin</groupId>
  <artifactId>vaadin-archetype-application-multimodule</artifactId>
  <version>7.4.0</version>
  <packaging>maven-archetype</packaging>

  <name>vaadin-archetype-application-multimodule</name>
  <url>http://vaadin.com</url>
  <description>
      This archetype generates a sample Vaadin application as a multi-module Maven project.
  </description>
  <scm>
    <url>https://github.com/vaadin/maven-integration</url>
    <connection>https://github.com/vaadin/maven-integration.git</connection>
    <developerConnection>ssh://user@dev.vaadin.com:29418/maven-integration</developerConnection>
  </scm>

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.archetype</groupId>
        <artifactId>archetype-packaging</artifactId>
        <version>2.2</version>
      </extension>
    </extensions>

    <!-- Filter root POM to replace project version -->
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <configuration>
          <encoding>UTF-8</encoding>
          <escapeString>\</escapeString>
        </configuration>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>archetype-resources/pom.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>archetype-resources/pom.xml</exclude>
        </excludes>
      </resource>
    </resources>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-archetype-plugin</artifactId>
          <version>2.2</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <developers>
    <developer>
      <name>Petter Holmström</name>
      <email>petter@vaadin.com</email>
      <organization>Vaadin</organization>
      <organizationUrl>https://vaadin.com</organizationUrl>
    </developer>
    <developer>
      <name>Henri Sara</name>
      <email>hesara@vaadin.com</email>
      <organization>Vaadin</organization>
      <organizationUrl>https://vaadin.com</organizationUrl>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>UNLICENSE</name>
      <url>http://unlicense.org/</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <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>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <repository>
      <id>vaadin-staging</id>
      <name>Vaadin release staging repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>vaadin-snapshots</id>
      <name>Vaadin snapshot repository</name>
      <url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

</project>
