Book Image

Jenkins Essentials - Second Edition

By : Mitesh Soni
Book Image

Jenkins Essentials - Second Edition

By: Mitesh Soni

Overview of this book

<p>In agile development practices, developers need to integrate their work frequently to fix bugs or to create a new feature or functionality. Jenkins is used specifically for Continuous Integration, helping to enforce the principles of agile development. This book focuses on the latest and stable release of Jenkins (2.5 and later), featuring the latest features, such as Pipeline as Code, the new setup experience, and the improved UI. With the all-new Pipeline as Code feature, you will be able to build simple or advanced pipelines easily and rapidly, hence improving your teams' productivity.</p> <p>This book begins by tackling the installation of the necessary software dependencies and libraries you'll need to perform Continuous Integration for a Java application. From there, you'll integrate code repositories, applications, and build tools for the implementation of Continuous Integration.</p> <p>Finally, you will also learn how to automate your deployment on cloud platforms such as AWS and Microsoft Azure, along with a few advanced testing techniques.</p>
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Dedication
Preface

Creating and configuring a build job for a Java application with Ant


We always say that tools are not important, but it is always a good idea to have some understanding of tools so we can perform operations and troubleshoot in an easy manner.

Ant uses the build.xml file to execute different tasks that lead to the creation of a package file.

We will use a sample project for Ant that is available at https://github.com/mitesh51/AntExample.

Its build.xml file contains the following details:

<?xml version="1.0" ?> 
<project name="AntExample1" default="war"> 
 
<path id="compile.classpath"> 
<fileset dir="WebContent/WEB-INF/lib"> 
<include name="*.jar"/> 
</fileset> 
</path> 
 
<target name="init"> 
<mkdir dir="build/classes"/> 
<mkdir dir="dist" /> 
</target> 
 
<target name="compile" depends="init"> 
<javac destdir="build/classes" debug="true" srcdir="src"> 
<classpath refid="compile.classpath"/> 
</javac>...