<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.github.joshelser</groupId>
  <artifactId>legacy-avatica-1.6.0-hsqldb-server</artifactId>
  <version>0.0.1</version>
  <url>https://github.com/joshelser/legacy-avatica-hsqldb-server</url>
  <name>Standalone HSQLDB-backed Avatica server for old Avatica installs</name>
  <description>An artifact for older Avatica versions where this is not already in Avatica</description>
  <licenses>
    <license>
        <name>Apache License, Version 2.0</name>
        <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        <distribution>repo</distribution>
    </license>
  </licenses>
  <issueManagement>
    <system>Github</system>
    <url>https://github.com/joshelser/legacy-avatica-hsqldb-server/issues</url>
  </issueManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <scm>
    <connection>scm:git:https://github.com/joshelser/legacy-avatica-hsqldb-server.git</connection>
    <developerConnection>scm:git:git@github.com:joshelser/legacy-avatica-hsqldb-server.git</developerConnection>
    <url>https://github.com/joshelser/legacy-avatica-hsqldb-server</url>
    <tag>legacy-avatica-1.6.0-hsqldb-server-0.0.1</tag>
  </scm>
  <developers>
    <developer>
      <id>elserj</id>
      <name>Josh Elser</name>
      <email>joshelser@gmail.com</email>
    </developer>
  </developers>
  <properties>
    <calcite.version>1.6.0</calcite.version>
    <hsqldb.version>2.3.1</hsqldb.version>
    <jcommander.version>1.48</jcommander.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-source-plugin.version>2.4</maven-source-plugin.version>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <scott-data-hsqldb.version>0.1</scott-data-hsqldb.version>
    <slf4j.version>1.7.13</slf4j.version>
    <surefire-plugin.version>2.19.1</surefire-plugin.version>
  </properties>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${maven-gpg-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <!-- Create a standalone JAR capable of running the server -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <excludes>
                  <exclude>com.google.protobuf:protobuf-java</exclude>
                  <exclude>org.apache.httpcomponents:*</exclude>
                  <exclude>commons-codec:commons-codec</exclude>
                </excludes>
                </artifactSet>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                    <addHeader>false</addHeader>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                  <resources>
                    <resource>LICENSE.txt</resource>
                  </resources>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>com.github.joshelser.avatica.HsqldbServer</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </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>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.beust</groupId>
      <artifactId>jcommander</artifactId>
      <version>${jcommander.version}</version>
    </dependency>
    <dependency>
      <groupId>net.hydromatic</groupId>
      <artifactId>scott-data-hsqldb</artifactId>
      <version>${scott-data-hsqldb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>${hsqldb.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>pre-avatica-split</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.calcite</groupId>
          <artifactId>calcite-avatica</artifactId>
          <version>${calcite.version}</version>
        </dependency>
        <dependency>
          <groupId>org.apache.calcite</groupId>
          <artifactId>calcite-avatica-server</artifactId>
          <version>${calcite.version}</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>post-avatica-split</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.calcite.avatica</groupId>
          <artifactId>avatica</artifactId>
          <version>${calcite.version}</version>
        </dependency>
        <dependency>
          <groupId>org.apache.calcite.avatica</groupId>
          <artifactId>avatica-server</artifactId>
          <version>${calcite.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
