<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.github.gwtmaterialdesign</groupId>
  <artifactId>gwt-material-jquery</artifactId>
  <packaging>jar</packaging>
  <version>2.0.1</version>

  <properties>
    <gwt.version>2.8.2</gwt.version>

    <jscore.version>1.0</jscore.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <name>Gwt Material JQuery</name>
  <description>JQuery interface maintained by GWT Material Design</description>
  <url>http://gwtmaterialdesign.github.io/gwt-material-jquery/</url>
  <developers>
    <developer>
      <name>Ben Dol</name>
      <email>dolb90@gmail.com</email>
      <organization>Gwt Material</organization>
      <organizationUrl>http://gwtmaterialdesign.github.io/gwt-material/</organizationUrl>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache License Version 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:GwtMaterialDesign/gwt-material-jquery.git</connection>
    <developerConnection>scm:git:git@github.com:GwtMaterialDesign/gwt-material-jquery.git</developerConnection>
    <url>http://github.com/GwtMaterialDesign/gwt-material-jquery</url>
    <tag>v2.0.1</tag>
  </scm>

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

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt</artifactId>
        <type>pom</type>
        <scope>import</scope>
        <version>${gwt.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.java</include>
          <include>**/*.gwt.xml</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <inherited>true</inherited>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt.version}</version>
        <configuration>
          <gen>${basedir}/gen</gen>
          <incremental>false</incremental>
          <generateJsInteropExports>true</generateJsInteropExports>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <configuration>
          <!-- comment out for now because doesn't work on JDK < 8 -->
          <!--<additionalparam>-Xdoclint:none</additionalparam>-->
          <encoding>${project.build.sourceEncoding}</encoding>
          <locale>en</locale>
          <linksource>true</linksource>
          <validateLinks>true</validateLinks>
          <links>
            <link>https://github.com/gwtproject/gwt/tree/master/doc/validation-package-list</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <tagNameFormat>v@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.6</version>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>sonatype-google-releases</id>
      <name>Sonatype Google Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/google-releases</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>sonatype-google-snapshots</id>
      <name>Sonatype Google Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/google-snapshots</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-google-snapshots</id>
      <name>Sonatype Google Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/google-snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>Codehouse</id>
      <name>Codehouse snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <profiles>
    <!-- Disable doclint on JDK 8 -->
    <profile>
      <id>nodoclint</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <additionalparam>-Xdoclint:none</additionalparam>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
