| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| <modelVersion>4.0.0</modelVersion> |
| <parent> |
| <groupId>org.apache.sentry</groupId> |
| <artifactId>sentry-tests</artifactId> |
| <version>1.3.0-incubating</version> |
| </parent> |
| <artifactId>sentry-tests-hive</artifactId> |
| <name>Sentry Hive Tests</name> |
| <description>end to end tests for sentry-hive integration</description> |
| <properties> |
| <hadoop-dist></hadoop-dist> |
| <hive-dist>${hadoop-dist}</hive-dist> |
| <HADOOP_CONF_DIR>${env.HADOOP_CONF_DIR}</HADOOP_CONF_DIR> |
| <HIVE_CONF_DIR>${env.HIVE_CONF_DIR}</HIVE_CONF_DIR> |
| </properties> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.thrift</groupId> |
| <artifactId>libthrift</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.derby</groupId> |
| <artifactId>derby</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.thrift</groupId> |
| <artifactId>libthrift</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.derby</groupId> |
| <artifactId>derby</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-service</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-shims</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-serde</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-metastore</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-jdbc</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-hbase-handler</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-exec</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-contrib</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-common</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-cli</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-common</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-annotations</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-auth</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-hdfs</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-mapreduce-client-common</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-mapreduce-client-core</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-mapreduce-client-jobclient</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-mapreduce-client-shuffle</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-yarn-api</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-yarn-common</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-yarn-server-common</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-yarn-server-nodemanager</artifactId> |
| <version>${hadoop.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.zookeeper</groupId> |
| <artifactId>zookeeper</artifactId> |
| <version>${zookeeper.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.easytesting</groupId> |
| <artifactId>fest-reflect</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.sentry</groupId> |
| <artifactId>sentry-binding-hive</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.shiro</groupId> |
| <artifactId>shiro-core</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.sentry</groupId> |
| <artifactId>sentry-provider-file</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.sentry</groupId> |
| <artifactId>sentry-policy-db</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-minicluster</artifactId> |
| <scope>test</scope> |
| <exclusions> |
| <exclusion> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-mapreduce-client-jobclient</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| </dependencies> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <systemPropertyVariables> |
| <buildDirectory>${project.build.directory}</buildDirectory> |
| </systemPropertyVariables> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <configuration> |
| <skipTests>false</skipTests> |
| </configuration> |
| <executions> |
| <execution> |
| <id>download-hadoop</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <echo file="target/download.sh"> |
| set -e |
| set -x |
| /bin/pwd |
| BASE_DIR=./target |
| DOWNLOAD_DIR=./thirdparty |
| download() { |
| url=$1; |
| tarName=$2 |
| finalName=$3 |
| rm -rf $BASE_DIR/$finalName |
| if [[ ! -f $DOWNLOAD_DIR/$tarName ]] |
| then |
| wget -nv -O $DOWNLOAD_DIR/$tarName $url |
| fi |
| tar -zxf $DOWNLOAD_DIR/$tarName -C $BASE_DIR |
| mv $BASE_DIR/${finalName}* $BASE_DIR/$finalName |
| } |
| mkdir -p $DOWNLOAD_DIR |
| download "http://archive.cloudera.com/cdh5/cdh/5/hadoop-latest.tar.gz" hadoop.tar.gz hadoop |
| download "http://archive.cloudera.com/cdh5/cdh/5/hive-latest.tar.gz" hive.tar.gz hive |
| </echo> |
| <exec executable="bash" dir="${basedir}" failonerror="true"> |
| <arg line="target/download.sh"/> |
| </exec> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>link-hadoop</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <configuration> |
| <skipTests>false</skipTests> |
| </configuration> |
| <executions> |
| <execution> |
| <id>link-hadoop</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <echo file="target/link_dist.sh"> |
| set -e |
| set -x |
| /bin/pwd |
| BASE_DIR=./target |
| rm -f $BASE_DIR/hadoop |
| ln -s $1/hadoop $BASE_DIR/. |
| rm -f $BASE_DIR/hive |
| ln -s $2/hive $BASE_DIR/. |
| </echo> |
| <exec executable="bash" dir="${basedir}" failonerror="true"> |
| <arg line="target/link_dist.sh ${hadoop-dist} ${hive-dist}"/> |
| </exec> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>cluster-hadoop</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <version>1.0</version> |
| <executions> |
| <execution> |
| <id>enforce-property</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireProperty> |
| <property>HADOOP_CONF_DIR</property> |
| <message>HADOOP_CONF_DIR env. variable has to be set</message> |
| </requireProperty> |
| <requireProperty> |
| <property>HIVE_CONF_DIR</property> |
| <message>HIVE_CONF_DIR env. variable has to be set</message> |
| </requireProperty> |
| </rules> |
| <fail>true</fail> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <systemPropertyVariables> |
| <buildDirectory>${project.build.directory}</buildDirectory> |
| </systemPropertyVariables> |
| <additionalClasspathElements> |
| <additionalClasspathElement>${HIVE_CONF_DIR}</additionalClasspathElement> |
| <additionalClasspathElement>${HADOOP_CONF_DIR}</additionalClasspathElement> |
| </additionalClasspathElements> |
| <includes> |
| <include>**/TestCrossDbOps.java</include> |
| <include>**/TestEndToEnd.java</include> |
| <include>**/TestMetadataObjectRetrieval.java</include> |
| <include>**/TestMetadataPermissions.java</include> |
| <include>**/TestMovingToProduction.java</include> |
| <include>**/TestPerDatabasePolicyFile.java</include> |
| <include>**/TestPrivilegeAtTransform.java</include> |
| <include>**/TestPrivilegesAtDatabaseScope.java</include> |
| <include>**/TestPrivilegesAtTableScope.java</include> |
| <include>**/TestSandboxOps.java</include> |
| <include>**/TestExportImportPrivileges.java</include> |
| <include>**/TestUriPermissions.java</include> |
| <include>**/TestRuntimeMetadataRetrieval.java</include> |
| <include>**/TestPrivilegesAtFunctionScope.java</include> |
| </includes> |
| <argLine>-Dsentry.e2etest.hiveServer2Type=UnmanagedHiveServer2 -Dsentry.e2etest.DFSType=ClusterDFS</argLine> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |