<?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>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>com.vertispan.jsinterop</groupId>
  <artifactId>base</artifactId>
  <version>1.0.1-1</version>
  <packaging>pom</packaging>

  <name>JsInterop Base</name>
  <description>
    Base classes and utilities that provide access to JavaScript language constructs
    that are not available in pure Java.
    This distribution is slightly modified from the original in order to be compatible
    with J2CL and, where possible, GWT2 (though this is not heavily tested). The links
    and references in this pom.xml will reference the Vertispan fork, to ensure that
    any error introduced by our changes are not incorrectly blamed on the upstream
    Google repository.
  </description>
  <url>https://www.gwtproject.org</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:https://github.com/vertispan/jsinterop-base.git</connection>
    <developerConnection>scm:git:git@github.com:vertispan/jsinterop-base.git</developerConnection>
    <url>https://github.com/vertispan/jsinterop-base</url>
  </scm>

  <issueManagement>
    <url>https://github.com/vertispan/jsinterop-base/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <developers>
    <developer>
      <name>J2CL team</name>
      <organization>Google</organization>
      <organizationUrl>http://www.google.com</organizationUrl>
    </developer>
    <developer>
      <name>Colin Alworth</name>
      <email>colin@vertispan.com</email>
      <organization>Vertispan LLC</organization>
      <organizationUrl>https://www.vertispan.com/</organizationUrl>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>com.google.jsinterop</groupId>
      <artifactId>jsinterop-annotations</artifactId>
      <version>2.0.2</version>
    </dependency>
    <dependency>
      <groupId>com.vertispan.j2cl</groupId>
      <artifactId>gwt-internal-annotations</artifactId>
      <version>0.11.0-9336533b6</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>jsinterop-base.jar</file>
                  <type>jar</type>
                </artifact>
                <artifact>
                  <file>../bazel-bin/java/jsinterop/base/libbase-src.jar</file>
                  <type>jar</type>
                  <classifier>sources</classifier>
                </artifact>
                <artifact>
                  <file>../bazel-bin/java/jsinterop/base/base-javadoc.jar</file>
                  <type>jar</type>
                  <classifier>javadoc</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <name>Sonatype staging repository for Maven Central</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>vertispan-snapshots</id>
      <name>Vertispan hosted artifacts-snapshots</name>
      <url>https://repo.vertispan.com/j2cl</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>