Maven and Jenkins

How to work with Maven and Jenkins. I have a testNg frame work . so i want to work with Maven and Jenkins for that project for better results and continuous integration.

I need the total set up  and a sample project

Train Asked on December 2, 2014 in Selenium WebDriver.
Add Comment
  • 4 Answer(s)

    Hi Ranjit

    I cannot give you full setup , but will surely help you with some pointers

    why you require maven? , i assume just for dependency management , if yes then there is very nice tutorial on toolsqa which you should follow .

    Once you have maven setup with Testng then running it on jenkins is pretty straight forwards, install maven plugin (may be it is pre-installed) –> create new Job with template as Maven –>Configure the job and add you root pom and your goal to build(mvn clean install)

    And i think you are done , simply run the job

    Kapil Aggarwal

    Supporter Answered on December 3, 2014.
    Add Comment

    Hi Kapil

    Yes  I am done with Maven. But need the work through for Jenkins.

    Thank you.

    Train Answered on December 4, 2014.
    Add Comment

    What is to choose from this options


    Source Code Management

    Build Triggers

    Build –  Root POM

    Goals and options

    Train Answered on December 4, 2014.

    Is it fresh Jenkins installation? Or you using existing one

    on December 4, 2014.

    First of all please use comments to have discussions , dont overflow the question with multiple answers

    Source Code Management – I think you are not using one , so simple select no
    Build Trigger – None
    Root Pom – Your Pom xml name in root of your project which
    Goals – mvn clean install

    create this job and then run this job , for obvious reason there will be nothing there as we have not put any source code , but once you run your job then it create a empty workspace ,

    Now the jenkins is on your local machine, so you can copy all your code and paste it in the workspace and then again run the job

    Do check the console logs

    but do consider using source code management which should be git , cvs or svn for future

    Kapil Aggarwal

    on December 5, 2014.

    I am using SVN visual server for subversion.  So how to edit field  for  Source Code Management.

    How to set version for Maven Version . Root POM

    Getting warning as Please set a valid host name, instead of localhost.

    on December 8, 2014.

    Ahh ohk so you need to set path for Maven as well , well its more of same what you do for command line , and its difficult for me to help you over here

    As lakshay mentioned in your other same question that he will be posting Jenkins tutorial soon , so lets wait for that

    Kapil Aggarwal

    on December 9, 2014.
    Add Comment

    This is my first time to Jenkins . so its a fresh Jenkins installation.

    Train Answered on December 5, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.