maven的scm插件介绍及使用示例
格式说明
scm:svn:svn://[username[:password]@]server_name[:port]/path_to_repository
scm:svn:svn+ssh://[username@]server_name[:port]/path_to_repository
scm:svn:file://[hostname]/path_to_repository
scm:svn:http://[username[:password]@]server_name[:port]/path_to_repository
scm:svn:https://[username[:password]@]server_name[:port]/path_to_repository
Examples
scm:svn:file:///svn/root/module
scm:svn:file://localhost/path_to_repository
scm:svn:file://my_server/path_to_repository
scm:svn:http://svn.apache.org/svn/root/module
scm:svn:https://username@svn.apache.org/svn/root/module
scm:svn:https://username:password@svn.apache.org/svn/root/module
Maven中为我们集成了软件配置管理的(SCM:Software Configuration Management)功能,他可以支持我们常用SVN、CVS等,到现在我使用的1.8.1版本,共支持18个命令:
scm:branch - branch the project(创建项目的分支)
scm:validate - validate the scm information in the pom(校验SCM的配置信息)
scm:add - command to add file(增加一个文件)
scm:unedit - command to stop editing the working copy(停止编辑当前COPY)
scm:export - command to get a fresh exported copy(拉一个全新的分支)
scm:bootstrap - command to checkout and build a project(checkout并编译工程)
scm:changelog - command to show the source code revisions(显示源码版本)
scm:list - command for get the list of project files(列出工程的文件)
scm:checkin - command for commiting changes(提交变更)
scm:checkout - command for getting the source code(获取源码)
scm:status - command for showing the scm status of the working copy(获取本地项目的状态)
scm:update - command for updating the working copy with the latest changes(从服务器获取最新的版本)
scm:diff - command for showing the difference of the working copy with the remote one(比较本地与远程服务器的差异)
scm:update-subprojects - command for updating all projects in a multi project build(更新子项目)
scm:edit - command for starting edit on the working copy(编辑)
scm:tag - command for tagging a certain revision(打标签)
常用命令介绍
而我们常用只有以下这两个命令:
Usage
The SCM Plugin maps a lot of commands to a variety of scm implementations. But there are only 2 frequently used commands:
checkin - 提交变更
update - 从服务器上获取最新的版本
配置及使用
其它的SCM都有自己独特的命令来操作提交变更、或从服务器上获取最新的源吗,如SVN及CVS的操作就很不相同,使用Maven担任的SCM机制,就可以使得SCM的操作变得统一,以下是一个SVN配置示例,将以下的示例配置到pom.xml文件中
…
jar
1.0-SNAPSHOT
SCM Sample Project
http://somecompany.com
scm:svn:http://somerepository.com/svn_repo/trunk
scm:svn:https://somerepository.com/svn_repo/trunk
http://somerepository.com/view.cvs
…
照这样配置好的,现在我们要做提交或者更新,就按如下按行命令
提交:
mvn -Dmessage=”” scm:checkin
获取最新版本:
mvn scm:update
SCM支持的连接类型
SCM支持两种连接类型:connection 及 developerConnection。
以下是一个连接类型为connection的配置示例:
…
[…]
org.apache.maven.plugins
maven-scm-plugin
1.8.1
connection
…
…
…
以下是一个连接类型为developerConnection的配置示例:
…
…
org.apache.maven.plugins
maven-scm-plugin
1.8.1
developerConnection
…
…
…
maven的scm插件介绍及使用示例相关推荐
- Maven实战——常用Maven插件介绍
http://www.infoq.com/cn/news/2011/04/xxb-maven-7-plugin 我们都知道Maven本质上是一个插件框架,它的核心并不执行任何具体的构建任务,所有这些任 ...
- 常用Maven插件介绍(下)(转)
我们都知道Maven本质上是一个插件框架,它的核心并不执行任何具体的构建任务,所有这些任务都交给插件来完成,例如编译源代码是由maven- compiler-plugin完成的.进一步说,每个任务对应 ...
- Maven打包插件介绍
文章目录 1. maven介绍 2. 生命周期及插件 2.1 总览生命周期 2.2 打包插件 2.2.1 maven-jar-plugin 2.2.2 maven-assembly-plugin 2. ...
- Notepad++的第三方插件介绍中文翻译
最近发现Markdown编辑器Typora的内测免费版也过期不能使用了,不过这个问题最后通过下载更早的版本解决了. 但是也因此,我彻底了解了一下各大编辑器对Markdown支持的情况,其中了解了一下N ...
- Maven使用原型插件来创建项目
2019独角兽企业重金招聘Python工程师标准>>> 转自:http://www.yiibai.com/spring/maven_creating_project.html Mav ...
- scm maven_在运行时访问工件的Maven和SCM版本
scm maven 您可以轻松地告诉Maven在JAR清单文件中包含工件的版本及其Git / SVN /-修订版,然后在运行时通过getClass().getPackage访问该信息. getImpl ...
- 在运行时访问工件的Maven和SCM版本
您可以轻松地告诉Maven在JAR清单文件中包含工件的版本及其Git / SVN /-修订版,然后在运行时通过getClass().getPackage访问该信息. getImplementation ...
- maven 构建 springmvc + spring security 权限控制示例
2019独角兽企业重金招聘Python工程师标准>>> maven 构建 springmvc + spring security 权限控制示例. 介绍 :Spring Securit ...
- maven之打包插件(maven-assembly-plugin,maven-shade-plugin与maven-assembly-plugin)
一. 介绍 maven提供的打包插件有如下三种: plugin function maven-jar-plugin maven 默认打包插件,用来创建 project jar maven-shade- ...
- Java代码安装maven jar_Java中Maven项目导出jar包配置的示例代码
具体代码如下所示: src/main/java src/main/resources ${project.build.directory} **/*.java src/test/java src/te ...
最新文章
- 适合win7的python版本_windows下多个python版本共存,如何在Windows7系统上安装最新的64位Python3.6.2...
- Python enumerate索引迭代
- Atom飞行手册翻译: 2.11 Atom中的版本控制
- maven缺失ojdbc6解决方案 :Missing artifact com.oracle:ojdbc6:jar:11.2.0.1.0问题解决 ojdbc包pom.xml出错
- 【渝粤教育】国家开放大学2018年秋季 0553-22T色彩 参考试题
- 34.卷1(套接字联网API)---常用函数
- Adobe 字体显示不清楚----解决方案
- php币对人民币汇率_php汇率(php等于多少人民币)
- 计算机编程ebcdic码,ASCII码和EBCDIC码
- 300个VB全面控制Excel方法
- html+text+shadow语法,text-shadow属性怎么用
- Unity 编辑器开发实战【Custom Editor】- 为UI视图制作动画编辑器
- 超详细的抖音运营全攻略
- Jarvisoj_WP
- 为什么说Java匿名内部类是残缺的闭包
- 2554. 【NOIP2011模拟9.7】帕秋莉·诺蕾姬 (Standard IO)
- React-native之友盟(UMeng)推送集成(超详细)(android版)----------小白的天堂
- java aspectj_AspectJ初探
- /mnt/asec /mnt/secure文件夹
- Django开发中经常出现的问题