<?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>
  <parent>
    <groupId>org.apache.hbase</groupId>
    <artifactId>hbase-hindex-global</artifactId>
    <version>2.6.1-h0.cbu.mrs.360.r18</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>hbase-global-index-protocol</artifactId>
  <name>Huawei HBase - Global Secondary Index Protocol</name>

  <properties>
    <maven.javadoc.skip>true</maven.javadoc.skip>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-protocol</artifactId>
    </dependency>
    <!-- General dependencies -->
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Make a jar and put the sources in the jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <!--Make it so assembly:single does nothing in here-->
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <skipAssembly>true</skipAssembly>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <!-- Always skip the second part executions, since we only run simple unit tests in this module -->
        <executions>
          <execution>
            <id>secondPartTestsExecution</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>test</phase>
            <configuration>
              <skip>true</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>compile-protoc</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.revelc.code</groupId>
        <artifactId>warbucks-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>replacer</artifactId>
        <version>1.5.3</version>
        <configuration>
          <basedir>${basedir}/target/generated-sources/</basedir>
          <includes>
            <include>**/*.java</include>
          </includes>
          <replacements>
            <replacement>
              <token>(public)(\W+static)?(\W+final)?(\W+class)</token>
              <value>@javax.annotation.Generated("proto") $1$2$3$4</value>
            </replacement>
            <!-- replacer doesn't support anchoring or negative lookbehind -->
            <replacement>
              <token>(@javax.annotation.Generated\("proto"\) ){2}</token>
              <value>$1</value>
            </replacement>
          </replacements>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>replace</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <!-- Skip the tests in this module -->
    <profile>
      <id>skipProtocolTests</id>
      <activation>
        <property>
          <name>skipProtocolTests</name>
        </property>
      </activation>
      <properties>
        <surefire.skipFirstPart>true</surefire.skipFirstPart>
        <surefire.skipSecondPart>true</surefire.skipSecondPart>
      </properties>
    </profile>
    <profile>
      <id>build-with-jdk11</id>
      <activation>
        <jdk>[1.11,)</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>eclipse-specific</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.hadoop</groupId>
                        <artifactId>hadoop-maven-plugins</artifactId>
                        <versionRange>[2.0.5-alpha,)</versionRange>
                        <goals>
                          <goal>protoc</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore/>
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>com.google.code.maven-replacer-plugin</groupId>
                        <artifactId>replacer</artifactId>
                        <versionRange>[1.5.3,)</versionRange>
                        <goals>
                          <goal>replace</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore/>
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

</project>
