Jenkins and NetBeans Maven Project Primer Tutorial

Jenkins and NetBeans Maven Project Primer Tutorial

Jenkins and NetBeans Maven Project Primer Tutorial

Today we are installing Jenkins onto our MacBook Pro laptop. So what is Jenkins? Well, we quote from the Jenkins landing page below …

As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.

Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems.

… and more explanation from Wikipedia …

Jenkins is an open source continuous integration tool written in Java. The project was forked from Hudson after a dispute with Oracle.

Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. The primary developer of Jenkins is Kohsuke Kawaguchi.[2] Released under the MIT License, Jenkins is free software.[3]

Builds can be started by various means, including being triggered by commit in a version control system, by scheduling via a cron-like mechanism, by building when other builds have completed, and by requesting a specific build URL.

… and via really useful link

Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron.

… and we think it will be a great tool to use for software deployment purposes, as we start out learning about Jenkins today after the preparatory …

  • creating a Mac OS X new user “jenkins” in group “applications” for future use (that we talked about with Mac OS X Users and Groups Primer Tutorial
  • set up Git for a new remote Jenkins usage username rjmprogramming-com-au to interface to Jenkins (and/or NetBeans) later, including the creation of “jenkins” user ssh public and private keyfiles via ssh-keygen
  • installing Jenkins via its landing page with a first “warts ‘n all” “not quite there” earlier try at interfacing to a freestyle Xcode C++ project (which we’ll probably return to now that we know a lot more via the wonderful book Jenkins: The Definitive Guide by John Ferguson Smart that we highly recommend, and is almost solely the reason for some success below, and that we cannot hope to show as much detail as is there)

… and then …

  • consider interfacing Jenkins to a NetBeans IDE project we talked about with Netbeans Maven Java Web Application Primer Tutorial that used the NetBeans IDE and a GlassFish web server to create a Java web application …

    … whose Git source control we are presenting at our TicTacToe Nimh Git repository

    Did you know?

    Perhaps you noticed the use of http://localhost:9190 for the Glassfish server today, inferring the use of port 9190, rather than the default 8080 port that is the default, but clashes with Jenkins’s default port 8080? How we got the two to live together was to change the web server HTTP port of Glassfish to be 9190, via, command …


    sudo vi /Applications/NetBeans/glassfish-4.1/glassfish/domains/domain1/config/domain.xml

    … and changing all (two) references to 8080 to be 9190.

  • so, armed with the incredible Jenkins: The Definitive Guide by John Ferguson Smart we follow lots of the advice there to present you with screenshots there that …
    1. set up Jenkins System Configuration …
    2. set up Jenkins Manage Plugins (for today) where all (and we mean all, unlike what the “warts ‘n all” link above may show) we asked for was the Git Plugin (and its dependencies flow on from that) …
    3. in Jenkins add a New Item which is a new Maven Project (interface) setup that will end up polling for changes at a crontab 1 minute interval …

      … for changes, and rebuild the Java web application via the brilliance of Maven by Apache
    4. … all the while getting ready for Git source control “friendliness”

We hope you like the resulting slideshow, as more food for thought, along with Ansible (we last talked about with Ansible Dynamic Inventory Tutorial), for some deployment and development tools of huge value.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, NetBeans, Operating System, Projects, Software, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

3 Responses to Jenkins and NetBeans Maven Project Primer Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *