Setting Java Version used by Maven Compiler
Learn to configure the Java compiler version in a Maven project and a Spring boot application using Maven as a build tool.
Learn to configure the Java compiler version in a Maven project and a Spring boot application using Maven as a build tool.
Learn to fix Maven invalid target release error which indicates that Java versions used in Maven and in the application are not compatible.
Maven is a build tool based on POM and is generally used for Java projects to automatically download the project dependencies in build time.
Learn to run JUnit tests using Maven Surefire Plugin. We will learn to run a single test, run only selected tests or run all the tests in the project.
Learn to rebuild local repository by deleting all corrupt jars from repository and fix missing maven dependencies problem or force update a maven project.
Learn to create a spring boot project having multiple modules. The parent project will work as a container for base maven configurations. The child modules will be actual spring boot projects – inheriting the maven properties from the parent project. 1. Parent Spring Boot Project The parent project is single …
Learn how to create multi-module maven project from console IDE. In this maven tutorial, we will learn to create nested maven projects maven cli commands.
Learn how to create a multi-module maven project in eclipse IDE. In this maven tutorial, we will learn to create nested maven projects in Eclipse. 1. Multi-module Project Structure Let’s create a maven project having modules packaging ear, war and jar types. We are creating the structure of an enterprise …
In Spring boot applications, the default packaging is jar which is deployed in embedded servers. Learn to generate a war file for deployment.
The spring-boot-starter-parent is a special project that provides default configuration and default dependencies for Spring Boot-based applications.
In this maven tutorial, learn to add and configure tomcat plugin to pom.xml and use it deploy the web application without any tomcat installation in machine.
Learn to create maven custom archetypes which helps in creating a specific type of project structure which is not available in any standard maven archetype.
Maven parent POM (or super POM) is used to structure the project to avoid redundancies or duplicate configurations using inheritance between pom files.
Maven dependency scope is used to specify the visibility of a dependency. It provides six scopes i.e. compile, provided, runtime, test, system, and import.
Maven repositories are physical directories that contain packaged JAR files along with extra metadata. Learn about local, remote and central repositories.
In this Maven tutorial, learn about Maven dependency management, including external dependency, transitive dependency tree, excluding dependencies and version ranges. 1. What is Maven Dependency? In Maven, a dependency is just another archive—JAR, ZIP, and so on—which our current project needs in order to compile, build, test, and/or run. These project dependencies are collectively specified in …
POM (Project Object Model) is an XML file that contains information about the project and configuration details used by Maven to build the project i.e. sourcecode location, project dependencies etc. This file must be named as pom.xml and placed under root folder of project.
Maven settings.xml file contains configurations that are not specific to a project, but are global in nature. It also contains information that is not meant to be distributed (e.g. passwords).
Learn to configure junit 5 with maven, its jupiter and platform different modules and how to use them to create and execute tests.
You may get this error when you have incompatible version of maven and it’s maven shade plugin. Fixing version number mismatch will solve the issue.
This is a very strange problem but this is the fact that when you create a maven web application using “-DarchetypeArtifactId=maven-archetype-webapp” then Java source folders are not created. Rather a ‘/resources‘ folder is created. Files placed in ‘/resources‘ folder are placed in your classpath when a jar or war file …
To solve the version mismatch issue, you can use the concept of a “bill of materials” (BOM) dependency. A BOM dependency keeps track of version numbers and ensures that all dependencies (both direct and transitive) are at the same version. 1. Why do we need the BOM file? If you …
Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executable files. In this post, we will learn making such an executable file for a demo java application. Step1 ) Create a java application I am creating a very basic java class which simply …
Learn to create a new Maven project in IntelliJ, run commonly used Maven commands and fix Maven issues in IntelliJ with examples.
Many times, we need to enforce that java build process should halt immediately if deployment environment does not have not a specific operating system, or it does not contain a minimum required java version. If you are using maven for build process, then these limitations can be easily be configured …
Suppose you had created and maintained your project from maven for long time, but now you have instructions to move it to ant build environment. Well, it does not look easy, but it really is very much. All you need to use if maven ant plugin which is specifically only …
Learn how to change the Maven local repository location in Eclipse by updating M2_REPO variable and, temporarily, only for current Maven execution.
Maven proxy settings. Learn to configure maven proxy settings in settings.xml file. Learn to configure and use maven https proxy settings in eclipse.
Learn where is maven local repository location? Learn how to change maven local repository location. Change repo location in windows 7, windows 10 & linux.
Learn to create a Maven web project in Eclipse, which we should be able to import into the Eclipse IDE for further development. To create an Eclipse-supported web project, we will need to create a normal Maven web application and then make it compatible with the Eclipse IDE. Step 1: …
Learn to create a Java application project with maven, using interactive and non-interactive modes from the command prompt. 1. Using Maven Non-interactive Mode In non-interactive mode, Maven creates a blank Java project with all default options applicable for the selected Maven template. To create this, type the below command. This …
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.