
Maven
文章平均质量分 72
liugang594
这个作者很懒,什么都没留下…
展开
-
Maven使用入门
【Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a cent...原创 2011-09-29 10:10:33 · 115 阅读 · 0 评论 -
maven-dependency-plugin插件的使用
maven-dependency-plugin是处理与依赖相关的插件。它有很多可用的goal,大部分是和依赖构建、分析和解决相关的goal,这部分goal可以直接用maven的命令操作,例如:mvn dependency:tree、mvn dependency:analyze;这类操作在平时的maven应用中很少会用到。这里主要介绍除此之外的、用得最多的几个操作:copy, copy-depe...原创 2014-07-17 18:18:12 · 1675 阅读 · 0 评论 -
build-helper-maven-plugin的使用
build-helper-maven-plugin 插件主要的作用就是用来指定额外的源码路径和资源路径。它总共有15个goal:build-helper:add-source Add more source directories to the POM.build-helper:add-test-source Add test source directories to the ...原创 2014-07-16 16:36:26 · 2694 阅读 · 0 评论 -
maven-antrun-plugin的使用
maven-antrun-plugin提供在maven中运行ant任务的能力。 基本配置如下: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ant...原创 2014-07-16 11:01:12 · 1223 阅读 · 0 评论 -
maven-replacer-plugin的使用
插件主页: https://code.google.com/p/maven-replacer-plugin/插件介绍:maven-replacer-plugin:replacer is a build plugin to replace tokens within a file with a given value and fully supports regular expressi...原创 2014-07-16 09:49:02 · 2505 阅读 · 0 评论 -
在Ubuntu中配置Nexus
详细请参考:http://www.sonatype.com/books/nexus-book/reference/install-sect-service.html在Ubuntu中安装Nexus 服务1. 首先下载适合于当前系统版本的Nexus:http://www.sonatype.org/nexus/2. 下载完以后解压到某个目录,假设是${NEXUS_HOME}3. 设...原创 2012-10-10 13:43:18 · 147 阅读 · 0 评论 -
【摘】Maven中的Profile
一、定义Profilepom.xml 中的profiles 元素,它包含了一个或者多个profile 元素。由于profile 覆盖了pom.xml 中的默认设置,profiles 通常是pom.xml 中的最后一个元素。每个 profile 必须要有一个id 元素。这个id 元素包含的名字将在命令行调用profile 时被用到。我们可以通过传给Maven 一个-P<profile...原创 2012-10-08 14:24:04 · 388 阅读 · 0 评论 -
【摘】Maven中父子模块间的共享关系
一个Maven POM 从它父POM 中继承的项目列表:• 定义符(groupId 和artifactId 中至少有一个必须被覆盖)• 依赖• 开发者和贡献者• 插件列表• 报告列表• 插件执行 (id 匹配的执行会被合并)• 插件配置 Maven中,一个模块会在以下位置查找父模块的pom.xml:本地仓库当前模块的父目录中<parent />结点的relat...原创 2012-09-28 11:18:03 · 346 阅读 · 0 评论 -
[摘录] Maven中的DependencyManagement和Dependencies
这里介绍一个在父项目中的根结点中声明dependencyManagement和dependencies的区别dependencyManagementMaven 使用dependencyManagement 元素来提供了一种管理依赖版本号的方式。通常会在一个组织或者项目的最顶层的父POM 中看到dependencyManagement 元素。使用pom.xml 中的dependencyMan...原创 2012-09-28 10:36:59 · 505 阅读 · 0 评论 -
在Maven中怎么配置外部Jar
假设我们有一个Maven的project,其中有些Jar包不是来自Maven库的,是存在本地的某些Jar文件,比如说在project下有一个lib,里面放了一些额外需要的Jar。 默认情况下,如果用mvn 命令去编译或运行它,并且其中有使用到这些外部jar的类,那么可能报x.x.x包找不着。这是因为maven在它当前的配置里找不到你需要的这些外部jar的配置。 那么如何在maven...原创 2012-09-13 13:53:48 · 169 阅读 · 0 评论 -
在Eclipse中使用Maven
上一篇讲了Maven的基础知识,这一篇讲怎么在Eclipse里使用Maven 一、安装 要在eclipse里使用maven,首先需要安装一个插件:m2eclipse。这是专门针对maven的eclipse插件。 具体的安装指导,可以看:http://m2eclipse.sonatype.org/installing-m2eclipse.html 如果是用eclips...原创 2011-09-29 13:41:23 · 122 阅读 · 0 评论 -
maven-assembly-plugin的使用
maven-assembly-plugin使用描述(拷自 maven-assembly-plugin 主页) The Assembly Plugin for Maven is primarily intended to allow users to aggregate the project output along with its dependencies, modules, si...原创 2014-07-18 18:04:48 · 307 阅读 · 0 评论