|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +Copyright 2015 Google LLC |
| 4 | +
|
| 5 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +you may not use this file except in compliance with the License. |
| 7 | +You may obtain a copy of the License at |
| 8 | +
|
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +
|
| 11 | +Unless required by applicable law or agreed to in writing, software |
| 12 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +See the License for the specific language governing permissions and |
| 15 | +limitations under the License. |
| 16 | +--> |
| 17 | +<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"> |
| 18 | + <modelVersion>4.0.0</modelVersion> |
| 19 | + |
| 20 | + <parent> |
| 21 | + <groupId>com.google.cloud.bigtable</groupId> |
| 22 | + <artifactId>bigtable-hbase-2.x-parent</artifactId> |
| 23 | + <version>2.14.0-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} --> |
| 24 | + </parent> |
| 25 | + |
| 26 | + <artifactId>bigtable-hbase-2.x-mapreduce</artifactId> |
| 27 | + <packaging>jar</packaging> |
| 28 | + <name>${project.groupId}:${project.artifactId}</name> |
| 29 | + <description> |
| 30 | + This project contains tweaks to the hbase 2.* map reduce jobs that work for |
| 31 | + bigtable. |
| 32 | + Specifically, HBase's Import M/R job has ZooKeeper referrence which needed |
| 33 | + to be removed |
| 34 | + in order to work with Bigtable. |
| 35 | + </description> |
| 36 | + |
| 37 | + <!-- NOTE: this artifact is designed to be used alongside hbase-server via |
| 38 | + the bin/hbase script. Its primary intention is to produce a single jar that can |
| 39 | + be added to hbase's classpath to kick off mapreduce jobs targeted at bigtable. |
| 40 | + A secondary goal is for some java orchestration program to kick off the jobs. |
| 41 | +
|
| 42 | + Thus the dependencies here must be exactly: |
| 43 | + - bigtable-hbase-1.x-hadoop |
| 44 | + - any hbase provided jars |
| 45 | +
|
| 46 | + In the primary usecase we will shade bigtable-hbase-1.x-hadoop allowing the |
| 47 | + enduser to drop a single jar in the hbase classpath. In the secondary case, |
| 48 | + the enduser can explcitly add their own version hbase-server. |
| 49 | + --> |
| 50 | + |
| 51 | + <dependencies> |
| 52 | + <!-- Primary Group --> |
| 53 | + <dependency> |
| 54 | + <groupId>org.apache.hbase</groupId> |
| 55 | + <artifactId>hbase-mapreduce</artifactId> |
| 56 | + <version>${hbase2.version}</version> |
| 57 | + <scope>provided</scope> |
| 58 | + </dependency> |
| 59 | + |
| 60 | + <dependency> |
| 61 | + <groupId>${project.groupId}</groupId> |
| 62 | + <artifactId>bigtable-hbase-2.x-hadoop</artifactId> |
| 63 | + <version>2.14.0-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} --> |
| 64 | + <exclusions> |
| 65 | + <!-- we need hbase-server instead of hbase-client --> |
| 66 | + <exclusion> |
| 67 | + <groupId>org.apache.hbase</groupId> |
| 68 | + <artifactId>hbase-client</artifactId> |
| 69 | + </exclusion> |
| 70 | + |
| 71 | + <!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced |
| 72 | + pom.xml files when invoking the build from a parent project. So we have to manually exclude |
| 73 | + the dependencies. Note that this works in conjunction with the manually promoted dependencies |
| 74 | + in bigtable-hbase-1.x-shaded/pom.xml --> |
| 75 | + <exclusion> |
| 76 | + <groupId>${project.groupId}</groupId> |
| 77 | + <artifactId>bigtable-hbase-2.x-shaded</artifactId> |
| 78 | + </exclusion> |
| 79 | + </exclusions> |
| 80 | + </dependency> |
| 81 | + |
| 82 | + <!-- Test Group --> |
| 83 | + <dependency> |
| 84 | + <groupId>junit</groupId> |
| 85 | + <artifactId>junit</artifactId> |
| 86 | + <version>${junit.version}</version> |
| 87 | + <scope>test</scope> |
| 88 | + </dependency> |
| 89 | + <dependency> |
| 90 | + <groupId>com.google.truth</groupId> |
| 91 | + <artifactId>truth</artifactId> |
| 92 | + <version>${truth.version}</version> |
| 93 | + <scope>test</scope> |
| 94 | + <exclusions> |
| 95 | + <!-- exclusion to avoid conflict with hbase-mapreduce --> |
| 96 | + <exclusion> |
| 97 | + <groupId>com.google.guava</groupId> |
| 98 | + <artifactId>guava</artifactId> |
| 99 | + </exclusion> |
| 100 | + <exclusion> |
| 101 | + <groupId>com.google.errorprone</groupId> |
| 102 | + <artifactId>error_prone_annotations</artifactId> |
| 103 | + </exclusion> |
| 104 | + <exclusion> |
| 105 | + <groupId>org.checkerframework</groupId> |
| 106 | + <artifactId>checker-qual</artifactId> |
| 107 | + </exclusion> |
| 108 | + </exclusions> |
| 109 | + </dependency> |
| 110 | + <dependency> |
| 111 | + <groupId>org.mockito</groupId> |
| 112 | + <artifactId>mockito-core</artifactId> |
| 113 | + <version>${mockito.version}</version> |
| 114 | + <scope>test</scope> |
| 115 | + </dependency> |
| 116 | + <dependency> |
| 117 | + <groupId>com.google.cloud</groupId> |
| 118 | + <artifactId>google-cloud-bigtable-emulator-core</artifactId> |
| 119 | + <version>${google-cloud-bigtable-emulator.version}</version> |
| 120 | + <scope>test</scope> |
| 121 | + </dependency> |
| 122 | + <dependency> |
| 123 | + <groupId>org.apache.hbase</groupId> |
| 124 | + <artifactId>hbase-testing-util</artifactId> |
| 125 | + <version>${hbase2.version}</version> |
| 126 | + <scope>test</scope> |
| 127 | + <exclusions> |
| 128 | + <exclusion> |
| 129 | + <!-- Exclude conflict with hbase-server --> |
| 130 | + <groupId>org.slf4j</groupId> |
| 131 | + <artifactId>slf4j-log4j12</artifactId> |
| 132 | + </exclusion> |
| 133 | + </exclusions> |
| 134 | + </dependency> |
| 135 | + <dependency> |
| 136 | + <groupId>com.google.cloud.bigtable</groupId> |
| 137 | + <artifactId>bigtable-internal-test-helper</artifactId> |
| 138 | + <version>2.14.0-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} --> |
| 139 | + <scope>test</scope> |
| 140 | + </dependency> |
| 141 | + </dependencies> |
| 142 | + |
| 143 | + <build> |
| 144 | + <plugins> |
| 145 | + <plugin> |
| 146 | + <groupId>org.codehaus.mojo</groupId> |
| 147 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 148 | + <executions> |
| 149 | + <execution> |
| 150 | + <id>add-source</id> |
| 151 | + <phase>generate-sources</phase> |
| 152 | + <goals> |
| 153 | + <goal>add-source</goal> |
| 154 | + </goals> |
| 155 | + <configuration> |
| 156 | + <sources> |
| 157 | + <source>../../third_party/third_party_hbase_server/src/main/mapreduce/</source> |
| 158 | + </sources> |
| 159 | + </configuration> |
| 160 | + </execution> |
| 161 | + </executions> |
| 162 | + </plugin> |
| 163 | + <plugin> |
| 164 | + <groupId>org.apache.maven.plugins</groupId> |
| 165 | + <artifactId>maven-jar-plugin</artifactId> |
| 166 | + <configuration> |
| 167 | + <archive> |
| 168 | + <manifest> |
| 169 | + <mainClass>com.google.cloud.bigtable.mapreduce.Driver</mainClass> |
| 170 | + </manifest> |
| 171 | + </archive> |
| 172 | + </configuration> |
| 173 | + </plugin> |
| 174 | + |
| 175 | + |
| 176 | + <plugin> |
| 177 | + <groupId>com.google.cloud.bigtable.test</groupId> |
| 178 | + <artifactId>bigtable-build-helper</artifactId> |
| 179 | + <version>2.14.0-SNAPSHOT</version> <!-- {x-version-update:bigtable-client-parent:current} --> |
| 180 | + <executions> |
| 181 | + <execution> |
| 182 | + <id>verify-mirror-deps-hbase</id> |
| 183 | + <phase>verify</phase> |
| 184 | + <goals> |
| 185 | + <goal>verify-mirror-deps</goal> |
| 186 | + </goals> |
| 187 | + <configuration> |
| 188 | + <targetDependencies> |
| 189 | + <targetDependency>org.apache.hbase:hbase-mapreduce</targetDependency> |
| 190 | + </targetDependencies> |
| 191 | + </configuration> |
| 192 | + </execution> |
| 193 | + </executions> |
| 194 | + </plugin> |
| 195 | + </plugins> |
| 196 | + </build> |
| 197 | +</project> |
0 commit comments