| <?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-hdfs</artifactId> |
| <version>2.0.1</version> |
| </parent> |
| |
| <artifactId>sentry-hdfs-common</artifactId> |
| <name>Sentry HDFS Common</name> |
| |
| <dependencies> |
| |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-minicluster</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>com.google.guava</groupId> |
| <artifactId>guava</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive-metastore</artifactId> |
| <scope>provided</scope> |
| <version>${hive.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-common</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.curator</groupId> |
| <artifactId>curator-x-discovery</artifactId> |
| <version>${curator.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-minikdc</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.sentry</groupId> |
| <artifactId>sentry-provider-file</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.directory.jdbm</groupId> |
| <artifactId>apacheds-jdbm1</artifactId> |
| <version>2.0.0-M2</version> |
| </dependency> |
| <dependency> |
| <groupId>org.mockito</groupId> |
| <artifactId>mockito-all</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| </dependencies> |
| <build> |
| <sourceDirectory>${basedir}/src/main/java</sourceDirectory> |
| <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>src/gen/thrift/gen-javabean</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>thriftif</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>generate-thrift-sources</id> |
| <phase>generate-sources</phase> |
| <configuration> |
| <target> |
| <taskdef name="for" classname="net.sf.antcontrib.logic.ForTask" |
| classpathref="maven.plugin.classpath" /> |
| <property name="thrift.args" value="-I ${thrift.home} --gen java:beans,hashcode"/> |
| <property name="thrift.gen.dir" value="${basedir}/src/gen/thrift"/> |
| <delete dir="${thrift.gen.dir}"/> |
| <mkdir dir="${thrift.gen.dir}"/> |
| <for param="thrift.file"> |
| <path> |
| <fileset dir="${basedir}/src/main/resources/" includes="**/*.thrift" /> |
| </path> |
| <sequential> |
| <echo message="Generating Thrift code for @{thrift.file}"/> |
| <exec executable="${thrift.home}/bin/thrift" failonerror="true" dir="."> |
| <arg line="${thrift.args} -I ${basedir}/src/main/resources/ -o ${thrift.gen.dir} @{thrift.file} " /> |
| </exec> |
| </sequential> |
| </for> |
| </target> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>enforce-property</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireProperty> |
| <property>thrift.home</property> |
| </requireProperty> |
| </rules> |
| <fail>true</fail> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| |
| </project> |