Java Continuous Integration and Delivery Infrastructure


Below is a list of items used for implementing the continuous integration and delivery infrastructure for Java projects.

Active Directory User

This is needed for Maven and Jenkins to get through the proxy server.  

  • Maven needs to pull 3rd party dependencies from Maven Central.
  • Jenkins needs to pull from the central plugin sites.

Linux User

This user is needed to pull the source code from Git, as Jenkins.  

Create a Git Source Code Repository

cd /home/continuous/git/
git init --shared --bare project-name

Here is an example of how to clone the repository from another machine on the same network:

git clone roberto@

Tomcat Server

  • Run in headless mode:
    export CATALINA_OPTS=-Djava.awt.headless=true
    Alternatively, create a start script at the following location that has export for headless mode.

    The alternative start script is only needed if you are seeing the following error:

    java.awt.AWTError: Can't connect to X11 window server                        

  • Install Tomcat 8.0 as a service.
  • This server is used to host the following:
    • Jenkins
    • developer documentation
    • any other Web apps used by the project
  • Configure the proxy server for Jenkins.

  • /home/rmarquez $ cp workspace/jenkins.war /opt/tomcat/apache-tomcat-8.0.50/webapps/continuous.war

Maven Proxy Server Configuration

Install the settings.xml file on the Linux box under the tomcat user's ~/.m2/ directory. 

Be sure to update the password in the example settings.xml file.


Continuous Instance

Jenkins WAR Download

  • $ cp workspace/jenkins.war /opt/tomcat/apache-tomcat-8.0.50/webapps/continuous.war

As a last resort, have Jenkins skip the SSL certificate if configuring secure connections is not configurable on the network.  

Allow the Javadoc frames to populate by running the following in the Jenkins Script console:

    System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'none'; img-src 'self'; style-src 'self'; child-src 'self'; frame-src 'self'; script-src 'unsafe-inline';");                

Git Credentials Configuration (for use with ssh protocol)

  • On the host with the git Repositories, execute the following as the Unix user used for accessing the Git repositories.
    $ ssh-keygen
  • Scope: Global
    user: unix-username
    Private Key: From a file on Jenkins master
    Description: Git with ssh protocol

Access Control List

  • Active Directory plugin
  • Configure Global Security
    • Security Realm -> Active Directory

Source Code Repository Browser

The source code repository browser provides an easy way to

  • view a file's history
  • view diffs between versions of the file

Current front runner:


  • Gitblit Instance
  • Download the WAR version and deploy it to Tomcat
  • Edit the configuration file


    to contian the location of Git repositories.

    git.repositoriesFolder = /home/continuous/git

Source Code Static Analysis Tool


back    |    top