maven 配置之pom.xml(2)

更多的项目信息

  • name:项目除了artifactId外,可以定义多个名称
  • description: 项目描述
  • url: 项目url
  • inceptionYear:创始年份
Licenses
xml 代码
<licenses> <license> <name>Apache 2name> <url>http://www.apache.org/licenses/LICENSE-2.0.txturl> <distribution>repodistribution> <comments>A business-friendly OSS licensecomments> license> licenses>
 
Organization
配置组织信息
 
xml 代码
<organization> <name>Codehaus Mojoname> <url>http://mojo.codehaus.orgurl> organization>
 
Developers
配置开发者信息
xml 代码
<developers> <developer> <id>ericid> <name>Ericname> <email>[email protected]> <url>http://eric.propellors.neturl> <organization>Codehausorganization> <organizationUrl>http://mojo.codehaus.orgorganizationUrl> <roles> <role>architectrole> <role>developerrole> roles> <timezone>-6timezone> <properties> <picUrl>http://tinyurl.com/prv4tpicUrl> properties> developer> developers>  
 
Contributors
 
xml 代码
  <contributors> <contributor> <name>Noellename> <email>[email protected]> <url>http://noellemarie.comurl> <organization>Noelle Marieorganization> <organizationUrl>http://noellemarie.comorganizationUrl> <roles> <role>testerrole> roles> <timezone>-5timezone> <properties> <gtalk>[email protected]> properties> contributor> contributors>
 
环境设置

Issue Management

    定义相关的bug跟踪系统,如bugzilla,testtrack,clearQuest等
 
xml 代码
<issueManagement> <system>Bugzillasystem> <url>http://127.0.0.1/bugzillaurl> issueManagement>
 
Continuous Integration Management
连续整合管理,基于triggers或者timings
 
xml 代码
<ciManagement> <system>continuumsystem> <url>http://127.0.0.1:8080/continuumurl> <notifiers> <notifier> <type>mailtype> <sendOnError>truesendOnError> <sendOnFailure>truesendOnFailure> <sendOnSuccess>falsesendOnSuccess> <sendOnWarning>falsesendOnWarning> <configuration><address>[email protected]>configuration> notifier> notifiers> ciManagement> 
 
  Mailing Lists
 
xml 代码
<mailingLists> <mailingList> <name>User Listname> <subscribe>[email protected]> <unsubscribe>[email protected]> <post>[email protected]> <archive>http://127.0.0.1/user/archive> <otherArchives> <otherArchive>http://base.google.com/base/1/127.0.0.1otherArchive> otherArchives> mailingList> mailingLists>
 
SCM
  软件配置管理,如cvs 和svn
 
xml 代码
<scm> <connection>scm:svn:http://127.0.0.1/svn/my-projectconnection> <developerConnection>scm:svn:https://127.0.0.1/svn/my-projectdeveloperConnection> <tag>HEADtag> <url>http://127.0.0.1/websvn/my-projecturl> scm>
 
Repositories

配置同setting.xml中的开发库

Plugin Repositories
配置同 repositories

Distribution Management
用于配置分发管理,配置相应的产品发布信息,主要用于发布,在执行mvn deploy后表示要发布的位置
1 配置到文件系统
xml 代码
<distributionManagement> <repository> <id>proficio-repositoryid> <name>Proficio Repositoryname> <url>file://${basedir}/target/deployurl> repository> distributionManagement>
 
2 使用ssh2配置
xml 代码
<distributionManagement> <repository> <id>proficio-repositoryid> <name>Proficio Repositoryname> <url>scp://sshserver.yourcompany.com/deployurl> repository> distributionManagement>
 
3 使用sftp配置
xml 代码
<distributionManagement> <repository> <id>proficio-repositoryid> <name>Proficio Repositoryname> <url>sftp://ftpserver.yourcompany.com/deployurl> repository> distributionManagement>
 
4 使用外在的ssh配置
    编译扩展用于指定使用wagon外在ssh提供,用于提供你的文件到相应的远程服务器。
xml 代码
<distributionManagement> <repository> <id>proficio-repositoryid> <name>Proficio Repositoryname> <url>scpexe://sshserver.yourcompany.com/deployurl> repository> distributionManagement> <build> <extensions> <extension> <groupId>org.apache.maven.wagongroupId> <artifactId>wagon-ssh-externalartifactId> <version>1.0-alpha-6version> extension> extensions> build>
 
5 使用ftp配置
xml 代码
  <distributionManagement> <repository> <id>proficio-repositoryid> <name>Proficio Repositoryname> <url>ftp://ftpserver.yourcompany.com/deployurl> repository> distributionManagement> <build> <extensions> <extension> <groupId>org.apache.maven.wagongroupId> <artifactId>wagon-ftpartifactId> <version>1.0-alpha-6version> extension> extensions> build>
repository 对应于你的开发库,用户信息通过settings.xml中的server取得

Profiles
类似于settings.xml中的profiles,增加了几个元素,如下的样式:
 
xml 代码
<profiles> <profile> <id>testid> <activation>...activation> <build>...build> <modules>...modules> <repositories>...repositories> <pluginRepositories>...pluginRepositories> <dependencies>...dependencies> <reporting>...reporting> <dependencyManagement>...dependencyManagement> <distributionManagement>...distributionManagement> profile> profiles>
 

你可能感兴趣的:(maven,xml,timezone,properties,Build,extension)