- <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>com.ibeifeng.bigdata.offline</groupId>
<artifactId>offline_data_analystics</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>offline_data_analystics</name>
<url>http://maven.apache.org</url>
- <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hadoop.version>2.5.0-cdh5.3.6</hadoop.version>
<hbase.version>0.98.6-cdh5.3.6</hbase.version>
<hive.version>0.13.1-cdh5.3.6</hive.version>
<mysql.version>5.1.18</mysql.version>
<gson.version>2.6.2</gson.version>
<uasparser.version>0.6.1</uasparser.version
</properties>
- <repositories>
- <repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
- <repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
- <dependencies>
- <dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
</dependency>
- <dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>${hbase.version}</version>
</dependency>
- <dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<version>${hbase.version}</version>
</dependency>
- <dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive.version}</version>
</dependency>
<!--
mysql start
-->
- <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<!--
mysql end
-->
<!--
用來解析useragent的依賴jar
-->
- <dependency>
<groupId>cz.mallat.uasparser</groupId>
<artifactId>uasparser</artifactId>
<version>${uasparser.version}</version>
</dependency>
- <dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<!--
jar的依賴範圍設置爲test時,編譯打包是不會該jar包打包進去的
-->
<scope>test</scope>
</dependency>
</dependencies>
- <profiles>
- <profile>
<id>local</id>
- <activation>
<!--
集羣運行這裏需要改成false
-->
<activeByDefault>false</activeByDefault>
</activation>
- <build>
- <plugins>
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.4</version>
- <executions>
- <execution>
<id>add-source</id>
<phase>generate-sources</phase>
- <goals>
<goal>add-source</goal>
</goals>
- <configuration>
- <sources>
<source>${basedir}/src/main/java</source>
<source>${basedir}/src/main/extr</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
- <profile>
<id>dev</id>
- <activation>
<!--
集羣運行 設置true
-->
<activeByDefault>true</activeByDefault>
</activation>
- <build>
- <plugins>
- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.4</version>
- <executions>
- <execution>
<id>add-source</id>
<phase>generate-sources</phase>
- <goals>
<goal>add-source</goal>
</goals>
- <configuration>
- <sources>
<source>${basedir}/src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
- <executions>
- <execution>
<phase>package</phase>
- <goals>
<goal>shade</goal>
</goals>
- <configuration>
- <artifactSet>
- <includes>
<!--
groupId:artifactId
-->
<include>cz.mallat.uasparser:uasparser</include>
<include>net.sourceforge.jregex:jregex</include>
<include>mysql:mysql-connector-java</include>
<include>org.apache.commons:commons-lang3</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
- <build>
<testSourceDirectory>src/test/java</testSourceDirectory>
- <plugins>
- <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
- <configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
- <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.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<versionRange>[1.4,)</versionRange>
- <goals>
<goal>add-source</goal>
</goals>
</pluginExecutionFilter>
- <action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
離線項目pom文件
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.