1, Compile, Deploy
1) pom.xml
<project>
...
</build>
...
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://127.0.0.1:8080/manager</url>
<server>mytomcat</server>
</configuration>
</plugin>
</plugins>
</build>
</project>
2) settings.xml in \Users\[account]\.m2\ of Operation System
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
<server>
<id>mytomcat</id>
<username>test</username>
<password>pass</password>
</server>
</servers>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
3) tomcat-users.xml
<role rolename="manager"/>
<role rolename="admin"/>
<user username="test" password="pass" roles="manager"/>
2, Get latest code from SVN
1) pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.3</version>
<configuration>
<goals>install</goals>
<username>***</username>
<password>***</password>
</configuration>
</plugin>
...
<scm>
<connection>scm:svn:file://192.168.1.***//repository/***/</connection>
<developerConnection>scm:svn:file://192.168.1.***//repository/***//</developerConnection>
<url>scm:svn:file://192.168.1.180/repository/***//</url>
</scm>
</project>
3, install software with svn command. i.e. Slik-Subversion-1.6.12-win32.msi
svn --username *** --password *** --non-interactive update F:\***
svn help update
http://www.sliksvn.com/en/download
4, batch DOS command
Echo ------Start To Deploy Project------
Echo ------
Echo ------Start To Retrieve Latest Content From SVN------
call mvn scm:update
Echo ------
Echo ------Start To Install Application------
call mvn install
Echo ------
Echo ------Start To Deploy Application On Tomcat------
call mvn tomcat:redeploy
Echo ------
Echo ------Deploy Done------
Note:
1, SCM URL
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
2, SCM example
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
3, SCM Command
mvn scm:changelog
mvn -DstartDate=YYYY-MM-DD -DendDate=YYYY-MM-DD scm:changelog
mvn scm:diff
mvn -DstartRevision=<revision> -DendRevision=<revision> scm:diff
mvn scm:validate
分享到:
相关推荐
Maven: The Complete Reference The essential reference for anyone working with Apache Maven. Explore the details of the POM, Maven Settings, Maven Archetypes.
maven-deploy-plugin-2.8.2.jar
maven the complete refrence 英文版
maven Maven 是一种流行且功能强大的项目管理工具,主要用于构建、发布和管理 Java 项目。本文将介绍 Maven 的基本概念、核心功能和优势,以及它在项目开发中的重要作用。 第一部分:Maven 的基本概念 解释 Maven...
Maven: the complete reference
Maven: The Complete Reference 英文版的 学习Maven很好的书啊
maven:modbus.jar modbus4j
如何输入关键字,寻找需要依赖jar的MAVEN坐标,需要提供确切的MAVEN坐标 1.Sonatype Nexus 地址: https://repository.sonatype.org 2. Jarvana 地址: http://www.jarvana.com/jarvana 3.MVNbrowser 地址: ...
Maven更新问题 今天Maven在更新的时候发现一直更新不成功,总结下解决方法。 在apache-maven-3.5.2/conf/setting.xml中加入以下配置即可解决 alimaven aliyun maven ...
maven-deploy-plugin-2.7.jar
datax_maven:“ before_maven:1)Datax:将各个阅读器和写入器目录下的文件,分别放到datax源码的对应目录下2)maven:修改maven安装包的配置文件,或者.m2下的配置文件。-然后2.after_maven:1)...
魅力Maven插件 该插件在Maven构建过程中通过生成Allure报告。入门pom.xml添加到pom.xml构建部分: <plugin><groupId>io.qameta.allure</groupId><artifactId>allure-maven</artifactId><version>2.9</version></...
rules_maven 规则 Maven 规则用于处理传递Maven依赖项。...load ( "@org_pubref_rules_maven//maven:rules.bzl" , "maven_repositories" ) maven_repositories () 2a。 定义一个初始的maven_repository
解决tomcat8-maven-plugin-3.0-r1655215.jar阿里云同有的问题。放到路径org\apache\tomcat\maven\tomcat8-maven-plugin\3.0-r1655215\就可以了
Java构建工具Maven的权威指南,详细介绍Maven的使用方法。英文原版。
Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project
February 2010 Edition 0.4 Copyright © 2010 Sonatype, Inc
CircleMenu for Android Check this library on other platforms: Looking for developers for your project?...The Android mockup available here. ...Android 4.1 Jelly Bean (API lvl 16) or greater ...Maven: