maven pom.xml文件续

更多的项目信息
  • name:项目除了artifactId外,可以定义多个名称
  • description: 项目描述
  • url: 项目url
  • inceptionYear:创始年份
Licenses
xml 代码
 
  1. <licenses>  
  2.   <license>  
  3.     <name>Apache 2name>  
  4.     <url>http://www.apache.org/licenses/LICENSE-2.0.txturl>  
  5.     <distribution>repodistribution>  
  6.     <comments>A business-friendly OSS licensecomments>  
  7.   license>  
  8. licenses> 

Organization
配置组织信息
 
xml 代码
 
  1. <organization>  
  2.     <name>Codehaus Mojoname>  
  3.     <url>http://mojo.codehaus.orgurl>  
  4.   organization>  

Developers
配置开发者信息
xml 代码
 
  1. <developers>  
  2.     <developer>  
  3.       <id>ericid>  
  4.       <name>Ericname>  
  5.       <email>eredmond@codehaus.orgemail>  
  6.       <url>http://eric.propellors.neturl>  
  7.       <organization>Codehausorganization>  
  8.       <organizationUrl>http://mojo.codehaus.orgorganizationUrl>  
  9.       <roles>  
  10.         <role>architectrole>  
  11.         <role>developerrole>  
  12.       roles>  
  13.       <timezone>-6timezone>  
  14.       <properties>  
  15.         <picUrl>http://tinyurl.com/prv4tpicUrl>  
  16.       properties>  
  17.     developer>  
  18.   developers>  

Contributors
 
xml 代码
 
  1. <contributors>  
  2.    <contributor>  
  3.      <name>Noellename>  
  4.      <email>some.name@gmail.comemail>  
  5.      <url>http://noellemarie.comurl>  
  6.      <organization>Noelle Marieorganization>  
  7.      <organizationUrl>http://noellemarie.comorganizationUrl>  
  8.      <roles>  
  9.        <role>testerrole>  
  10.      roles>  
  11.      <timezone>-5timezone>  
  12.      <properties>  
  13.        <gtalk>some.name@gmail.comgtalk>  
  14.      properties>  
  15.    contributor>  
  16.  contributors>  

环境设置

Issue Management

    定义相关的bug跟踪系统,如bugzilla,testtrack,clearQuest等
 
xml 代码
 
  1. <issueManagement>  
  2.     <system>Bugzillasystem>  
  3.     <url>http://127.0.0.1/bugzillaurl>  
  4.   issueManagement>  

Continuous Integration Management
连续整合管理,基于triggers或者timings
 
xml 代码
 
  1. <ciManagement>  
  2.    <system>continuumsystem>  
  3.    <url>http://127.0.0.1:8080/continuumurl>  
  4.    <notifiers>  
  5.      <notifier>  
  6.        <type>mailtype>  
  7.        <sendOnError>truesendOnError>  
  8.        <sendOnFailure>truesendOnFailure>  
  9.        <sendOnSuccess>falsesendOnSuccess>  
  10.        <sendOnWarning>falsesendOnWarning>  
  11.        <configuration><address>continuum@127.0.0.1address>configuration>  
  12.      notifier>  
  13.    notifiers>  
  14.  ciManagement>  

Mailing Lists
 
xml 代码
 
  1. <mailingLists>  
  2.    <mailingList>  
  3.      <name>User Listname>  
  4.      <subscribe>user-subscribe@127.0.0.1subscribe>  
  5.      <unsubscribe>user-unsubscribe@127.0.0.1unsubscribe>  
  6.      <post>user@127.0.0.1post>  
  7.      <archive>http://127.0.0.1/user/archive>  
  8.      <otherArchives>  
  9.        <otherArchive>http://base.google.com/base/1/127.0.0.1otherArchive>  
  10.      otherArchives>  
  11.    mailingList>  
  12.  mailingLists>  


SCM
  软件配置管理,如cvs 和svn
 
xml 代码
 
  1. <scm>  
  2.     <connection>scm:svn:http://127.0.0.1/svn/my-projectconnection>  
  3.     <developerConnection>scm:svn:https://127.0.0.1/svn/my-projectdeveloperConnection>  
  4.     <tag>HEADtag>  
  5.     <url>http://127.0.0.1/websvn/my-projecturl>  
  6.   scm>  

Repositories

配置同setting.xml中的开发库

Plugin Repositories
配置同 repositories

Distribution Management
用于配置分发管理,配置相应的产品发布信息,主要用于发布,在执行mvn deploy后表示要发布的位置
1 配置到文件系统
xml 代码
 
  1. <distributionManagement>  
  2. <repository>  
  3. <id>proficio-repositoryid>  
  4. <name>Proficio Repositoryname>  
  5. <url>file://${basedir}/target/deployurl>  
  6. repository>  
  7. distributionManagement>  

2 使用ssh2配置
xml 代码
 
  1. <distributionManagement>  
  2. <repository>  
  3. <id>proficio-repositoryid>  
  4. <name>Proficio Repositoryname>  
  5. <url>scp://sshserver.yourcompany.com/deployurl>  
  6. repository>  
  7. distributionManagement>  

3 使用sftp配置
xml 代码
 
  1. <distributionManagement>  
  2. <repository>  
  3. <id>proficio-repositoryid>  
  4. <name>Proficio Repositoryname>  
  5. <url>sftp://ftpserver.yourcompany.com/deployurl>  
  6. repository>  
  7. distributionManagement>  

4 使用外在的ssh配置
    编译扩展用于指定使用wagon外在ssh提供,用于提供你的文件到相应的远程服务器。
xml 代码
 
  1. <distributionManagement>  
  2. <repository>  
  3. <id>proficio-repositoryid>  
  4. <name>Proficio Repositoryname>  
  5. <url>scpexe://sshserver.yourcompany.com/deployurl>  
  6. repository>  
  7. distributionManagement>  
  8. <build>  
  9. <extensions>  
  10. <extension>  
  11. <groupId>org.apache.maven.wagongroupId>  
  12. <artifactId>wagon-ssh-externalartifactId>  
  13. <version>1.0-alpha-6version>  
  14. extension>  
  15. extensions>  
  16. build>  


5 使用ftp配置
xml 代码
 
  1. <distributionManagement>  
  2. <repository>  
  3. <id>proficio-repositoryid>  
  4. <name>Proficio Repositoryname>  
  5. <url>ftp://ftpserver.yourcompany.com/deployurl>  
  6. repository>  
  7. distributionManagement>  
  8. <build>  
  9. <extensions>  
  10. <extension>  
  11. <groupId>org.apache.maven.wagongroupId>  
  12. <artifactId>wagon-ftpartifactId>  
  13. <version>1.0-alpha-6version>  
  14. extension>  
  15. extensions>  
  16. build>  


repository 对应于你的开发库,用户信息通过settings.xml中的server取得

Profiles
类似于settings.xml中的profiles,增加了几个元素,如下的样式:
 
xml 代码
 
  1. <profiles>  
  2.     <profile>  
  3.       <id>testid>  
  4.       <activation>...activation>  
  5.       <build>...build>  
  6.       <modules>...modules>  
  7.       <repositories>...repositories>  
  8.       <pluginRepositories>...pluginRepositories>  
  9.       <dependencies>...dependencies>  
  10.       <reporting>...reporting>  
  11.       <dependencyManagement>...dependencyManagement>  
  12.       <distributionManagement>...distributionManagement>  
  13.     profile>  
  14.   profiles>  
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值