什么是POM maven pom jar

如何写Maven的POM文件?
[问题点数:100分,结帖人CSDN]
如何写Maven的POM文件?
[问题点数:100分,结帖人CSDN]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
本帖子已过去太久远了,不再提供回复功能。自己常用的Maven工程的pom.xml模板_Linux编程_Linux公社-Linux系统门户网站
你好,游客
自己常用的Maven工程的pom.xml模板
来源:Linux社区&
作者:cxz_hijacker
1. 带有-CDH4.2.1的pom.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&/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-compile
mvn package
Maven 的详细介绍:Maven 的下载地址:
相关阅读:
Maven 3.1.0 发布,项目构建工具
Linux 安装 Maven
Maven3.0 配置和简单使用
下搭建sun-jdk和Maven2
Maven使用入门
相关资讯 & & &
& (11月19日)
& (10月25日)
& (11月03日)
& (06月25日)
图片资讯 & & &
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款1)">1)">1" ng-class="{current:{{currentPage==page}}}" ng-repeat="page in pages"><li class='page' ng-if="(endIndex<li class='page next' ng-if="(currentPage
相关文章阅读}

我要回帖

更多关于 eclipse maven pom 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信