[Solved] Maven-compiler-plugin: release version 21 not supported
Learn the root cause and the solution behind the error “Maven-compiler-plugin: release version not supported” while upgrading a Java project.
Learn the root cause and the solution behind the error “Maven-compiler-plugin: release version not supported” while upgrading a Java project.
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 use the Maven assembly plugin for creating executable Jar files with dependencies, its various goals, descriptors using an example.
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 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 …
Learn to create fat or uber jar or war build for spring boot applications using the spring-boot-maven-plugin with an example.
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).
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.
Learn to use the Maven Shade plugin for packaging a java application with its dependencies into a fat jar or uber jar.
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 …
I have been facing this issue from quite long time as I didn’t took care of it. Everytime I faced this issue, I just went and changed the project compiler level for projects facets menu in eclipse. Today, I decided to end this for all. This error looks like in …
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 …
Learn to install Maven on a Windows operating system. In this maven installation guide, we are installing Maven on a Windows 11 machine. The steps are the same for a Windows 10 machine as well. 1. Windows Environmant Variables Maven is a build and dependency management tool for Java applications …
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.