Social Icons

Pages

Wednesday, 21 November 2012

How to build a svn release using Maven.

Hey guys today I will teach you or rather guide you through the steps to create a temporary and a major release using SVN Subversion and using maven.
You may choose a list of IDE's in order to write the code for your project.
I use Intelllij however, I have also developed a project in eclipse. Now before doing too much chatterboxing let me show you a detailed explaination of how to build your very own release using maven

1.Complete your project ready for packaging for the client. :)

2. Download SVN client
    There is a list of SVN clients to choose from and the following wikipedia link will guide you as to which one to choose.

http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients

3. I personally chose Tortoise as it was simple.However, you can make your own choice by choosing from the others too.

Install the SVN client on your machine.

4. For tortoise
   To check if it is working or not
      ->   Create  a new folder
      ->   Right click on the folder
      ->   Click on svn Checkout
      ->  Enter the URL of the place where your project was created.
            Usually in company settings it is a server's URL link followed by the name of your project.
            For example :
            https://companyname.com/ProjectName/
      -> If the link exists then the project will get checked out in this location.
      -> Do also keep in mind that the URL link you enter is case sensitive for Tortoise.
 
TEMPORARY RELEASE
5.Do not check in the code.
Simply build the project using either command line or the IDEA maven build.
From command line

5.1 COMMAND:
                         D:\ProjectFolder\rootOfProject> mvn clean install
5.2 Obtain the war file in the target source folder of your project
5.3 Deploy the war file on the  glassfish server on the server where you have the project running.


FORMAL RELEASE (INCLUDES PATCHES)
1.For formal releases
Steps are as follows:
1. Check all code is checked in
2. Maintain your own build folder.
3. Inside your development environment ProjectRELEASE Folder
4. Check out the code in this folder
5. After check out a folder called trunk will be created
    D:\ProjectFolder\ProjectRELEASE> cd trunk
6. D:\ProjectFolder\ProjectRELEASE>mvn release:prepare
 What will this command do  ?
  -> CREATE the version for the formal release
  ->Update all the POM’s in your project
Link in maven
http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
Check to see that this step is SUCCESSFUL
7. Release perform
 D:\ProjectFolder\ProjectRELEASE > Mvn release:perform
This will recheckout all the code and do a formal build of the project. Remember the  POM’s were update by the prepare step.
Check to see that this step is SUCCESSFUL
8. You will see ProjectRelease/projectname/target/checkout










No comments:

Post a Comment

 

Contact Us

info@intellozene.com

Our Website:
www.intellozene.com