美文网首页
pom.xml模版

pom.xml模版

作者: _helloliang | 来源:发表于2016-12-11 09:26 被阅读41次
<groupId>com.liangxw.mapreduce</groupId>
<artifactId>MapReduce-PageRank</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<name>MapReduce-PageRank</name>
<url>http://maven.apache.org</url>

<!-- CDH版本的maven库地址 -->
<repositories>
    <repository>
        <id>cloudera</id>
        <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
    </repository>
</repositories>


<properties>
    <!-- 指定版本号 -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <hadoop.version>2.5.0-cdh5.3.6</hadoop.version>
    <hive.version>0.13.1-cdh5.3.6</hive.version>
    <hbase.version>0.98.6-cdh5.3.6</hbase.version>
    <mysql.version>0.13.1-cdh5.3.6</mysql.version>
</properties>

<!-- 依赖 -->
<dependencies>

    <!-- hadoop -->
    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-client</artifactId>
        <version>${hadoop.version}</version>
    </dependency>

    <!-- hive -->
    <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-jdbc</artifactId>
        <version>${hive.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-exec</artifactId>
        <version>${hive.version}</version>
    </dependency>

    <!-- hbase -->
    <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-server</artifactId>
        <version>${hbase.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-client</artifactId>
        <version>${hbase.version}</version>
    </dependency>

    <!-- mysql -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.18</version>
    </dependency>
    
    <!-- 浏览器连接解析 -->
    <dependency>
        <groupId>cz.mallat.uasparser</groupId>
        <artifactId>uasparser</artifactId>
        <version>0.6.1</version>
    </dependency>
        
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>

</dependencies>


<!-- 环境概念 -->
<profiles>
    <profile>
        <!-- 唯一id,表示本地 -->
        <id>local</id>
        <activation>
            <!-- maven编译的时候,默认环境,该参数为true只能存在一个 -->
            <activeByDefault>true</activeByDefault>
        </activation>
        <build>
            <!-- 插件信息 -->
            <plugins>
                <plugin>
                    <!-- 将指定包的java文件进行编译打包操作 -->
                    <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>
        <!-- 需要最终形成一个jar文件 -->
        <id>dev</id>
        <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>
                    <!-- 将第三方的依赖包,一起打入到最终形成的jar文件中 -->
                    <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>
                                        <include>cz.mallat.uasparser:uasparser</include>
                                        <include>net.sourceforge.jregex:jregex</include>
                                        <include>mysql:mysql-connector-java</include>
                                    </includes>
                                </artifactSet>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

</profiles>


<!-- 手动指定源 -->
<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>*.*</include>
            </includes>
        </resource>
    </resources>
    
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
    </plugins>
    
    
    
</build>


相关文章

  • pom.xml常用模版

    父项目pom.xml模版 WEB项目常用pom.xml模版 WEB项目web.xml常用模版

  • pom.xml模版

  • springboot-模版

    模版 [toc] thymeleaf pom.xml 添加依赖和配置

  • 2. Spring Boot 编写 Controller

    说明 这篇日志需要使用页面模版,这里选用 thymeleaf,在 pom.xml 中 ...

  • 10.1KOA ejs 模版引擎

    ejs 模版引擎 安装模版引擎中间件 安装模版引擎 定义模版 使用模版引擎 具体 ejs 模版引擎使用 http:...

  • 10.2KOA handlebars 模版引擎

    handlebars 模版引擎 安装模版引擎中间件 安装模版引擎 定义模版文件 使用模版引擎 具体 handleb...

  • 三十二:Django之模版使用

    一:创建模版文件夹 二:配置模版目录 三:使用模版文件 四:给模版文件传递数据 模版变量使用:{{ 模版变量名 }...

  • day06-模版使用

    1)创建模版文件夹2)配置模版目录 3)使用模版文件 给模版文件传递数据模版变量的使用{{ 模版变量名 }}ind...

  • pom

    父pom.xml 子pom.xml

  • 模版

    模版 模版函数 使用模版函数不需要指定类型,直接传参就可以了。 模版类 使用模版类需要指定类型。

网友评论

      本文标题:pom.xml模版

      本文链接:https://www.haomeiwen.com/subject/pgzumttx.html