Table of Contents Introduction Wny do you need a single jar or war Prerequisites Generating Jar Generating Thin Jar Generating Fat Jar Generating War Generating Thin War Generating Fat War Source Code Introduction Generally most of the Spring Boot applications generate jar archive for deployment. Very few Spring Boot applications generate war archive for deployment…

Posted in Gradle

Generate Single Jar Or War In Spring Boot App Using Gradle Build Tool

Table of Contents Introduction Prerequisites Project Setup The Junit 5 Test Class Generating Test Reports Scanning Project with Sonar Source Code Introduction In this Spring Boot based application I am going to show you how to generate Junit 5 test report using SonarQube Jacoco gradle build tool. You need to generate such test reports to…

Posted in Gradle Junit

Junit 5 Test Report Using SonarQube Jacoco Gradle

Table of Contents Introduction Prerequisites Angular Project Settings Gradle Properties Spring Boot Project Build App Testing Angular Spring Boot Integration Source Code Introduction In this tutorial I will show you how to integrate Angular into Spring Boot using Gradle build tool. So, let’s say you have two different projects – Angular application and Spring Boot…

Posted in Angular Gradle Spring Boot

Integrate Angular into Spring Boot using Gradle

Table of Contents Introduction Prerequisites Include Non-classpath Jars In Gradle Script Introduction Here in this example I am going to tell you how to include non-classpath jars in gradle based Java project. You may need to include non-classpath jar files in order to make your application run. Non-classpath jars are those jar files which are not included in your classpath through dependency…

Posted in Gradle

Include Non-Classpath Jars In Gradle Based Java Project

Table of Contents Introduction Why do you need to create Gradle project in CLI Prerequisites Create Gradle Project in CLI Introduction Here I am going to show you how to create a new Gradle in CLI (command line interface). Command line interface is basically a command prompt in Windows system and Shell terminal in Unix…

Posted in Gradle

How To Create A New Gradle Project In CLI

Table of Contents Introduction Prerequisites Exclude Dependencies/Libraries Exclude Per Configuration Exclude Per Dependency Introduction I am going to show you how to exclude dependency from build.gradle script in gradle based Java project. Specially when you use several starter dependencies in your Spring Boot project, then many children dependencies are found and hence many libraries are downloaded in the project’s classpath. These many libraries may…

Posted in Gradle

How To Exclude Dependencies In Gradle Based Java Project

Introduction In this example, I am going to show you how to find dependency hierarchy using gradle build tool in your Java based projects. Your Spring Boot projects might be using gradle build tool and you want to check what dependencies are used in your project. You can easily find what libraries are used in your project by looking…

Posted in Gradle

Find Dependency Tree Hierarchy In Gradle Based Java Project

Introduction Are you stuck or confused how to build a Java or Spring Boot project when your system has multiple versions of Java or JDK installed? I will show you how to use specific jdk version for gradle build. Java version might be different in your classpath than what you want to use in your…

Posted in Gradle

How To Use Specific JDK Version For Gradle Build

Here I will tell you how to include the required gradle project into another project. Situation may occur when you need to have dependency of another gradle project into your current gradle project, but neither of these projects is a multi-module project. So in this case you can easily add the required project into your…

Posted in Gradle Spring Boot

How include required gradle project into another project

Introduction Here in this tutorial I will tell you how to exclude Junit test cases from build automation in Java applications. It’s not about skipping test cases but it’s about excluding test cases for a particular package. Situations may arise when you want to exclude some Junit test cases from running in some environments (for…

Posted in Gradle Junit Maven

How To Exclude Junit Tests Using Gradle Or Maven In Java Applications

Introduction In this tutorial I will tell you how to create executable jar using gradle or maven build tool in Spring Boot application. Generally maven or gradle tool is used in Java applications to automate the build process. I will also see how to control the target jar name with version appended into it. Spring…

Posted in Gradle Maven Spring Boot

How to create executable jar using Gradle or Maven in Spring Boot Application

Introduction Here we will see how to create Microservices using Spring Boot and Spring Cloud and build using Gradle tool. What are Microservices? Before I tell you about the microservices, I would like to tell you about monolithic architectural style, which is built as a single, autonomous unit. So let’s say an web application with…

Posted in Gradle Microservices Spring Boot

Create Microservices using Spring Boot and build using Gradle