<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>BaiduMobileMap</groupId> <artifactId>Stats</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Stats</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- 本地jar 文件包 --> <dependency> <groupId>org.apache</groupId> <artifactId>hadoop-core</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>/Users/baidu/workspace/Stats/lib/hadoop-core-1.1.3.2.jar</systemPath> </dependency> <dependency> <groupId>org.apache</groupId> <artifactId>hive-exec</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>/Users/baidu/workspace/Stats/lib/hive-exec-2.3.38.jar</systemPath> </dependency> </dependencies> <build> <plugins> <!-- jdk 使用1.6 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <!-- 打成jar包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.4</version> <configuration> <createDependencyReducedPom>true</createDependencyReducedPom> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <!-- 主類 --> <mainClass>BaiduMobileMap.HelloHiveUDF</mainClass> </transformer> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>