0% found this document useful (0 votes)
4 views

Lab Program 1

This document outlines the first lab program for the DEVOPS course, focusing on build automation tools Maven and Gradle. It provides an introduction to these tools, their features, and key differences, along with installation and setup instructions for both Maven and Gradle. The document emphasizes the importance of build automation in streamlining software development processes.

Uploaded by

Bhavana Biradar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lab Program 1

This document outlines the first lab program for the DEVOPS course, focusing on build automation tools Maven and Gradle. It provides an introduction to these tools, their features, and key differences, along with installation and setup instructions for both Maven and Gradle. The document emphasizes the importance of build automation in streamlining software development processes.

Uploaded by

Bhavana Biradar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Prof. K.

Navya
Assistant Professor
Department of ISE

LAB PROGRAM -1

Course Name : DEVOPS


Course Code:BCSL657D
LAB PROGRAM-1

1. Introduction to Maven and Gradle: Overview of Build


Automation Tools, Key Differences Between Maven and
Gradle, Installation and Setup.
What is Build Automation Tools?
• A build automation tool is a software tool that automates the process of
building software . It allows users to sequence tasks in a non-interactive way.
• Build automation tools help developers streamline the process of building,
testing, and deploying software projects. They take care of repetitive tasks like
compiling code, managing dependencies, and packaging applications, which
makes development more efficient and error-free.
• Three popular tools in the Java ecosystem are Maven ,Gradle and Jenkins.
These are great for managing project builds and dependencies, but they have
some key differences.
What is MAVEN?

• Maven is a widely used build automation tool for Java-based projects. It


follows the convention-over-configuration paradigm, meaning it provides
predefined project structures and build lifecycles, reducing the need for
extensive manual configuration.
• It uses an XML configuration file called pom.xml (Project Object Model)
to define project settings, dependencies, and build steps.
Features of Maven
• Predefined project structure and lifecycle phases.
• Automatic dependency management through Maven Central.
• Wide range of plugins for things like testing and deployment.
• Supports complex projects with multiple modules.
• XML-Based Configuration: Uses a pom.xml file to define dependencies, plugins, and project metadata.
• Dependency Management: Automatically downloads and manages dependencies from repositories such as
Maven Central.
• Lifecycle Management: Offers predefined phases like compile, test, package, and deploy.
• Plugin Support: Provides a wide range of plugins to extend functionality.
• Wide IDE and CI/CD Support: Integrates seamlessly with popular IDEs and CI/CD tools
What is Gradle?

• Gradle is a modern and flexible build automation tool that enhances


Maven’s capabilities by using a more expressive and efficient
configuration language that supports multiple programming languages,
including Java, Groovy, and Kotlin. It uses a domain-specific language
(DSL) for build scripts, written in Groovy or Kotlin.
Features of Gradle
• Faster builds thanks to task caching and incremental builds.
• Flexible and customizable build scripts.
• Works with Maven repositories for dependency management.
• Excellent support for multi-module and cross-language projects.
• Integrates easily with CI/CD pipelines.
• Script-Based Configuration: Uses Groovy or Kotlin scripts instead of XML for build scripts.
• Incremental Builds: Executes only necessary tasks to improve build speed.
• Superior Performance: Utilizes a directed acyclic graph (DAG) for optimized task execution,
enabling parallel execution and caching.
• Rich Plugin Ecosystem: Supports a variety of plugins and custom task configurations.
• Multi-Language Support: Compatible with Java, Kotlin, C++, and other programming
languages.
Key Differences Between Maven and Gradle
Installation and Setup
Installing jdk 17 or above
Step 1:
1. Goto google download jdk 17 version and install
2. Set environment variables for jdk 17

Or
1. Goto google download jdk 23 version and install
2. Goto google download jdk 23 version and install
Installing Maven
1. Download Maven:
o Get the latest version from the official website:
https://maven.apache.org/download.cgi
Step1:
1. download apache-maven-3.9.9-bin zip for window 64bit
2. extract apache-maven-3.9.9-bin zip file to normal folder
3. create empty folder BuildTool in C directory
4. copy unzipped apache-maven-3.9.9-bin into c:\BuilTool folder
2. Extract and Configure Environment Variables:
•Add the MAVEN_HOME and PATH environment variables.
3. Verify Installation:
o Run in command prompt
C:\>users\krithika\ > mvn -version
Installing Gradle
1.Download Gradle:
•Get the latest version from the official website: https://gradle.org/install/
2.Extract and Configure Environment Variables:
•Add GRADLE_HOME and update the PATH.
3. Verify Installation:
o Run in command prompt
C:\>users\krithika\ >gradle -v

You might also like