记录一下自己常用的maven工程的pom.xml模板
来源:互联网 发布:丁丁软件是什么情况 编辑:程序博客网 时间:2024/06/16 15:36
1. 带有hadoop-CDH4.2.1的pom.xml模板
2. assembly.xml文件
<?xml version="1.0" encoding="UTF-8"?><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.cxz</groupId> <artifactId>IntoRedis</artifactId> <version>1.0-SNAPSHOT</version> <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <repositories> <repository> <id>cloudera</id> <name>cloudera maven repository</name> <url>https://repository.cloudera.com/content/repositories/releases</url> </repository> </repositories> <dependencies> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.1.0</version> <type>jar</type> </dependency> <dependency> <groupId>commons-pool</groupId> <artifactId>commons-pool</artifactId> <version>1.6</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-examples</artifactId> <version>2.0.0-mr1-cdh4.2.1</version> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.mrunit</groupId> <artifactId>mrunit</artifactId> <version>1.0.0</version> <classifier>hadoop1</classifier> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.0.0-cdh4.2.1</version> <type>jar</type> <exclusions> <exclusion> <artifactId>kfs</artifactId> <groupId>net.sf.kosmosfs</groupId> </exclusion> </exclusions> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <descriptors> <descriptor>assembly.xml</descriptor> </descriptors> <archive> <manifest> <mainClass>com.cxz.redis.IntoRedis</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
2. assembly.xml文件
<?xml version="1.0" encoding="UTF-8"?><assembly xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0' xsi:schemaLocation='http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd'> <id>job</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <unpack>false</unpack> <scope>runtime</scope> <outputDirectory>lib</outputDirectory> <excludes> <exclude>${groupId}:${artifactId}</exclude> </excludes> </dependencySet> <dependencySet> <unpack>true</unpack> <includes> <include>${groupId}:${artifactId}</include> </includes> </dependencySet> </dependencySets></assembly>
3. maven的基本使用命令
mvn compile
mvn test
mvn test-compile
mvn package
mvn clean
- 记录一下自己常用的maven工程的pom.xml模板
- 一个maven工程的pom.xml模版
- maven的父子工程pom.xml
- Maven pom.xml配置常用的变量
- 我最常用的maven pom.xml
- MAVEN的pom.xml
- maven的pom.xml
- Maven工程pom.xml
- maven工程pom.xml的依赖查找网站
- Maven 构件工程的属性文件-----pom.xml文件
- 记录一下自己常用的方法
- 自己常用的maven项目中pom的配置
- maven的pom.xml的build常用配置
- Maven的SSM项目常用配置文件pom.xml
- maven的pom.xml详解
- Maven的配置文件pom.xml
- Maven的配置文件pom.xml
- Maven的pom.xml笔记
- 在 Linux里设置环境变量的方法(export PATH)
- Jquery清空(获取)当前页面所有的input和textarea的两种写法
- 反调试技巧总结-原理和实现(1)(2)(3)(4)(5)(6)......
- 企业战略(Enterprise Strategy)
- centos下ftp的架设和配置
- 记录一下自己常用的maven工程的pom.xml模板
- HOJ分类 转载自图灵老兄
- shell语法之case; if 语句
- 阿里巴巴2014校园招聘算法题
- Android常用控件之Fragment仿Android4.0设置界面
- 看看自己楼下的猫好奇感啊
- hdu 4738 Caocao's Bridges(求割边和桥)
- 2013华为校园招聘上机题 C++ 练习
- kobject和kset .