maven学习1

听说maven挺神的 也来学习一下
下载安装不说了 网上资料多的是
maven2的配置文件有两个 pom.xml settings.xml
pom.xml文件的作用是什么? pom ---project object model 项目对象模型
我的理解是这样的 : 一个项目对应一个pom.xml,是用来描述这个项目的 ,描述项目的那些属性呢? 我们来看看pom.xml文件 来一个感性的认识

<project>  //根元素
  <modelVersion>4.0.0</modelVersion> 

  <!-- The Basics -->
  <groupId>...</groupId> //项目的唯一标识 并且配置时生成的路径也是由此生成,如org.codehaus.mojo生成的相对路径为:/org/codehaus/mojo 
  <artifactId>...</artifactId> //项目的通用名称
  <version>...</version>  // 项目版本
  <packaging>...</packaging> 打包机制
  <dependencies>...</dependencies> 项目关系 描述与其他项目之间的关系:依赖 继承 合成等 
  <parent>...</parent>  描述其父项目,
  <dependencyManagement>...</dependencyManagement>  
  <modules>...</modules> 合成多个模块 当一个项目有多个模块时 用之
  <properties>...</properties>

  <!-- Build Settings -->
  <build>...</build>  编译设置 分两部分 项目build 和 profile build
  <reporting>...</reporting>  用于在site阶段输出报表。特定的maven 插件能输出相应的定制和配置报表。不太明白


  <!-- More Project Information -->
  <name>...</name> :项目除了artifactId外,可以定义多个名称
  <description>...</description> 项目描述
  <url>...</url> 项目url
  <inceptionYear>...</inceptionYear> 创建年份
  <licenses>...</licenses>
  <organization>...</organization> 组织信息
  <developers>...</developers>  开发人员信息
  <contributors>...</contributors>  为项目做出贡献的人

  <!-- Environment Settings -->
  <issueManagement>...</issueManagement>
  <ciManagement>...</ciManagement> Continuous Integration Management连续整合管理
  <mailingLists>...</mailingLists>  邮件列表
  <scm>...</scm> 软件配置管理,如cvs 和svn
  <prerequisites>...</prerequisites>
  <repositories>...</repositories> 参考settings.xml
  <pluginRepositories>...</pluginRepositories>
  <distributionManagement>...</distributionManagement> 发布管理
  <profiles>...</profiles> 
</project>


配置信息太多了 有点晕
参考了 http://www.javaresearch.org/article/61260.htm

你可能感兴趣的:(maven,xml,SVN,配置管理,项目管理)