{"id":22308,"date":"2016-05-29T03:01:15","date_gmt":"2016-05-28T17:01:15","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=22308"},"modified":"2019-10-29T21:46:55","modified_gmt":"2019-10-29T11:46:55","slug":"jenkins-and-netbeans-maven-project-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/jenkins-and-netbeans-maven-project-primer-tutorial\/","title":{"rendered":"Jenkins and NetBeans Maven Project Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/index.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Jenkins and NetBeans Maven Project Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/jenkins.jpg\" title=\"Jenkins and NetBeans Maven Project Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Jenkins and NetBeans Maven Project Primer Tutorial<\/p><\/div>\n<p>Today we are installing <a target=_blank title='Jenkins landing page' href='https:\/\/jenkins.io\/'>Jenkins<\/a> onto our MacBook Pro laptop.  So what is Jenkins?  Well, we quote from the Jenkins landing page below &#8230;<\/p>\n<blockquote cite='https:\/\/jenkins.io\/'><p>\nAs an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.<br \/>\n<b><\/b><br \/>\nJenkins 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.\n<\/p><\/blockquote>\n<p> &#8230; and more explanation from Wikipedia &#8230;<\/p>\n<blockquote cite='https:\/\/en.wikipedia.org\/wiki\/Jenkins_%28software%29'><p>\nJenkins is an open source continuous integration tool written in Java. The project was forked from Hudson after a dispute with Oracle.<br \/>\n<b><\/b><br \/>\nJenkins 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]<br \/>\n<b><\/b><br \/>\nBuilds 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.\n<\/p><\/blockquote>\n<p> &#8230; and via really useful <a target=_blank title='Useful link' href='https:\/\/chromatichq.com\/blog\/automated-servers-and-deployments-ansible-jenkins'>link<\/a> &#8230;<\/p>\n<blockquote cite='https:\/\/chromatichq.com\/blog\/automated-servers-and-deployments-ansible-jenkins'><p>\nJenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron.\n<\/p><\/blockquote>\n<p> &#8230; 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 &#8230;<\/p>\n<ul>\n<li>creating a Mac OS X new user &#8220;jenkins&#8221; in group &#8220;applications&#8221; for future use (that we talked about with <a target=_blank title='Mac OS X Users and Groups Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/mac-os-x-users-and-groups-primer-tutorial\/'>Mac OS X Users and Groups Primer Tutorial<\/a><\/li>\n<li>set up <a target=_blank title='GitHub source control' href='https:\/\/github.com\/'>Git<\/a> for a new remote Jenkins usage username <a target=_blank title='Git rjmprogramming-com-au' href='https:\/\/github.com\/rjmprogramming-com-au\/tictactoe-nimh\/'><img title='Git rjmprogramming-com-au' src='http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/jenkins-08of.jpg'><\/img><i>rjmprogramming-com-au<\/i><\/a> to interface to Jenkins (and\/or NetBeans) later, including the creation of &#8220;jenkins&#8221; user ssh public and private keyfiles via <a target=_blank title='ssh-keygen information' href='https:\/\/help.github.com\/articles\/generating-an-ssh-key\/'><i>ssh-keygen<\/i><\/a><\/li>\n<li>installing Jenkins via its <a target=_blank title='Jenkins landing page' href='https:\/\/jenkins.io\/'>landing page<\/a> with a first &#8220;warts &#8216;n all&#8221; &#8220;not quite there&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/index2.html\">earlier try<\/a> at interfacing to a freestyle Xcode C++ project (which we&#8217;ll probably return to now that we know a lot more via the wonderful book <i>Jenkins: The Definitive Guide<\/i> 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)<\/li>\n<\/ul>\n<p> &#8230; and then &#8230;<\/p>\n<p><!--ul>\n\n\n<li>researching Jenkins a bit first<\/li>\n\n\n\n\n<li>installing in on a Mac OS X MacBook Pro laptop<\/li>\n\n\n\n\n<li>installing and updating plugins, in particular to incorporate Git source control functionality<\/li>\n\n\n\n\n<li>use it in conjunction with an Xcode command line OSX C++ project using the default Git source code repository Xcode provides on the MacBook Pro hard disk ... like a \"Hello World\" scenario<\/li>\n\n\n<\/ul-->\n<ul>\n<li>consider interfacing Jenkins to a <a target=_blank title='NetBeans home page' href='https:\/\/netbeans.org\/'>NetBeans<\/a> IDE project we talked about with <a target=_blank title='Netbeans Maven Java Web Application Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/netbeans-maven-java-web-application-primer-tutorial\/'>Netbeans Maven Java Web Application Primer Tutorial<\/a> that used the NetBeans IDE and a GlassFish web server to create a Java web application &#8230;<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/jenkins-7of.jpg\"><\/img><br \/>\n &#8230; whose Git source control we are presenting at our <a target=_blank title='Git tictactoe-nimh' href='https:\/\/github.com\/rjmprogramming-com-au\/tictactoe-nimh\/'>TicTacToe Nimh Git repository<\/a><\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>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&#8217;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 &#8230;<\/p>\n<p><code><br \/>\nsudo vi \/Applications\/NetBeans\/glassfish-4.1\/glassfish\/domains\/domain1\/config\/domain.xml<br \/>\n<\/code><\/p>\n<p>&#8230; and changing all (two) references to <i>8080<\/i> to be <i>9190<\/i>.<\/p>\n<\/li>\n<li>so, armed with the incredible <i>Jenkins: The Definitive Guide<\/i> by John Ferguson Smart we follow lots of the advice there to present you with screenshots there that &#8230;\n<ol>\n<li>set up Jenkins System Configuration &#8230;<\/li>\n<li>set up Jenkins Manage Plugins (for today) where <b><i>all<\/i><\/b> (and we mean <b><i>all<\/i><\/b>, unlike what the &#8220;warts &#8216;n all&#8221; link above may show) we asked for was the <i>Git Plugin<\/i> (and its dependencies flow on from that) &#8230;<\/li>\n<li>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 &#8230;<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/jenkins-18of.jpg\"><\/img><br \/>\n&#8230; for changes, and rebuild the Java web application via the brilliance of <a target=_blank title='Maven landing page' href='https:\/\/maven.apache.org\/'>Maven<\/a> by Apache<\/li>\n<li> &#8230; all the while getting ready for Git source control &#8220;friendliness&#8221;<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>We hope you like the resulting <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/Jenkins\/index.html\" title='Click picture'>slideshow<\/a>, as more food for thought, along with <a target=_blank title='Ansible landing page' href='https:\/\/www.ansible.com\/'>Ansible<\/a> (we last talked about with <a target=_blank title='Ansible Dynamic Inventory Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/ansible-dynamic-inventory-tutorial\/'>Ansible Dynamic Inventory Tutorial<\/a>), for some deployment and development tools of huge value.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d22308' onclick='var dv=document.getElementById(\"d22308\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/netbeans\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d22308' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we are installing Jenkins onto our MacBook Pro laptop. So what is Jenkins? Well, we quote from the Jenkins landing page below &#8230; As an extensible automation server, Jenkins can be used as a simple CI server or turned &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/jenkins-and-netbeans-maven-project-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24,29,31,33,37],"tags":[119,241,274,1768,327,494,495,496,497,558,585,644,1894,757,833,1772,997,999,1893,1190,1319,1411],"class_list":["post-22308","post","type-post","status-publish","format-standard","hentry","category-elearning","category-netbeans","category-operating-system","category-projects","category-software","category-tutorials","tag-automation","tag-compile","tag-crontab","tag-deployment","tag-did-you-know","tag-git","tag-github","tag-glassfish","tag-glassfish-web-server","tag-hello-world","tag-ide","tag-java","tag-jenkins","tag-maven","tag-netbeans","tag-port","tag-programming","tag-project","tag-schedule","tag-ssh","tag-tutorial","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22308"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=22308"}],"version-history":[{"count":21,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22308\/revisions"}],"predecessor-version":[{"id":22341,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22308\/revisions\/22341"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=22308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=22308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=22308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}