|
|
Maven Release Plugin : http://maven.apache.org/plugins/maven-release-plugin/index.html
Copy the url path https://InfoTech-HP/svn/greenfield/trunk mvn archetype:create -DgroupId=com.greenfield.app -DartifactId=greenfield email notification, scm, deployment mvn scm:status scm:svn:https://localhost/svn/greenfield/trunk/greenfield
cd C:\projects\workspaces\programmer01 1.1. svn co https://InfoTech-HP/svn/greenfield/trunk greenfield 1.2. (使用 pom.xml 的 checkout 方式) mvn scm:checkout -DcheckoutDirectory=greenfield mvn scm:checkout -DconnectionUrl=scm:svn:file:////app/svn/repos/branches/one -DscmRevision=2289 -DscmVersionType=revision -DcheckoutDirectory=sample
Verify the automatic building results 程式有變更 時間往後壓(未來的時間)
Fully implemented SCM's Bazaar CVS Mercurial Perforce StarTeam Subversion CM Synergy Partially implemented SCM's Accurev ClearCase Git File system Visual Source Safe
The SCM Plugin has 16 goals: scm:branch - branch the project scm:validate - validate the scm information in the pom scm:add - command to add file scm:unedit - command to stop editing the working copy scm:export - command to get a fresh exported copy scm:bootstrap - command to checkout and build a project 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
Continuous Integration with Continuum, SVN & Maven 報告人:高明權 DATE :2009/10/12 Released V1.01 BLOG:http://tommykao.blogspot.com EMAIL : MCK6214@gmail.com
OVERVIEW
Practices of Continuous Integration Maintain a single source repository Automate the build Make the build self-testing Everyone commits to mainline every day Every commit (to mainline) should be built Keep the build fast Test in a clone of the production environment Easy to get the latest deliverables Everyone can see the results of the latest build Automate Deployment 資料來源: http://martinfowler.com/articles/continuousIntegration.html
Environments – Apache Continuum JDK 5.0 (or above) & JAVA_HOME Download Continuum URL : http://continuum.apache.org/download.html Installation instructions URL : http://continuum.apache.org/docs/1.3.4/installation/installation.html Start App. Sever and verify the results (admin account) Edit user accounts & roles
Environments – VisualSVN Server Download VisualSVN Server URL : Http://www.visualsvn.com/server/download/ Run the setup program Start VisualSVN Server Manager
1st demonstration Green field Project
Scenario Create new project Development Automate Build Checkout Build Unit Test Release & Deployment
Create new project Roles : Software Architect, SE Tools : Subversion, Maven Procedures : create new repository (subversion) create new project (maven) modify the pom.xml setting verify the pom.xml setting import project (subversion)
Development Roles : Programmer Tools : Subversion, Maven Procedures : check out the Greenfield project execute programming tasks (coding, unit test…) check in sources & unit test cases
Automate Build Roles : Software Architect, SE Tools : Subversion, Maven, Continuum Procedures : add new project (continuum) manual build scheduling the automatic build
Step 0: Login Login
Step 1: Add New Project Check the URL path of the configuration file EX: https://localhost/svn/greenfield/trunk/pom.xml Add New Project Confirm the results
Step 2: Manual Build Manual Build Check the results Build History Build Output Quality Reports
Step 3: Scheduling the automatic build Managing Schedules Setup a new schedule pattern Setup the automatic build Build Definitions Add an automate building schedule Verify the automatic building results
Release & Deployment Roles : Software Architect, SE Tools : Subversion, Maven, Continuum Procedures : Prepare for release (continuum) Perform project release Modify pom.xml setting file - add the automate deployment section. Perform project release (continuum)
Modify POM.XML Setting Automate Deployment Section 1/3 Automate Deployment Methods File-based deployment FTP deployment SFTP deployment SSH2 deployment External SSH deployment Deploying to the File System <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> file://${basedir}/target/deploy </url> </repository> </distributionManagement>
Modify POM.XML Setting Automate Deployment Section 2/3 Deploying with FTP <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> ftp://ftpserver.yourcompany.com/deploy </url> </repository> </distributionManagement> <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ftp</artifactId> <version>1.0-alpha-6</version> </extension> </extensions> </build> Deploying with SFTP <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> sftp://ftpserver.yourcompany.com/deploy </url> </repository> </distributionManagement>
Modify POM.XML Setting Automate Deployment Section 3/3 Deploying with SSH2 <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> scp://sshserver.yourcompany.com/deploy </url> </repository> </distributionManagement> Deploying with an External SSH <distributionManagement> <repository> <id>project-repository</id> <name>Project Repository</name> <url> scpexe://sshserver.yourcompany.com/deploy </url> </repository> </distributionManagement> <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ssh-external</artifactId> <version>1.0-alpha-6</version> </extension> </extensions> </build>
Step 1: Prepare for release Prepare for release Setup release plan / tag View release output Confirm with SVN Perform Release
Step 2: Perform project release Modify pom.xml setting Add the automate deployment section Verify with Marven command EX : mvn deploy Commit (check-in) into SVN Perform project release Confirm the release
Continuous Integration Know-How, ExAct, Knowledge 23
參考資料 Apache Maven Better Builds With Maven Maven project descriptor (pom.xml) Apache Continuum Apache Archiva Continuous Integration by Martin Fowler
SCM Repository Fully implemented SCM‘s CVS StarTeam Subversion Mercurial Bazaar Perforce CM Synergy Partially implemented SCM's ClearCase Visual Source Safe File system Accurev Git
Maven SCM Provider Matrix 資料來源:http://maven.apache.org/scm/matrix.html
| URL: |
No comments posted yet
Comments