Learn free maven tutorials


3 ways to debug maven build : maven debug tutorials

September 26, 2021 ·  4 min read

Maven is an automated build project management tool and automates the build process by defining the all the dependencies in pom.xml. Developers encounter a lot of issues while build and running a maven project in the development phase as well as release phase. This article explains multiple ways about how to debug any issues with maven build. You can check my other posts on maven commands There are a number of ways to debug a maven project....


Different ways to Fix OutOfMemoryError Gradle| Solution in Android studio

August 18, 2021 ·  3 min read

Gradle is a build management tool for java and android projects. Usually javalangoutofmemoryerror comes running android application for following tasks Building phase compile phase Package phase Loading app in Android studio Starting Android studio application Did you got below errors while compiling android project? java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: Perm Gen space java.lang.OutOfMemoryError: GC overhead limit exceeded The system is out of resources What is the reason for java....


How to copy files to target build directory in maven?

July 26, 2021 ·  2 min read

This is an short tutorials how how to copy property files from a input directory to target build directory in maven. Maven creates the [standard directory structure] (/2011/12/maven-project-structure.html) for an application. You can check my other posts on maven commands Default resources files are located in src/main/resources folder. which will be copied to target/classes during build and WEB-INF/classes in war file generation When you are packaging the project, these properties automatically copied to target folder....


Difference between package and install command in maven

July 25, 2021 ·  2 min read

This is an short tutorial on Difference between package and install command in maven. You can check my other posts on maven commands. clean, package and install are the goal phases of maven life cycle. Before that first understand the maven life cycle goals on the order execution. maven default life cycle goals execution order validate: validate checks all the valid information of an maven application compile: Compile source code into class files i....


How to add local jar files to maven projects

July 19, 2021 ·  2 min read

In this tutorials, We are going to learn how to installs local jar repository By default, Maven installs the dependencies from maven remote repository or nexus repository. Some times, we need to install the jar files from local repository or lib folder or custom path folder. There are multiple ways we can install local dependencies into maven projects maven install:install-file command Adding local dependencies systemPath in pom.xml Adding local repository How to install jar file to local repository with command line install-file goal is a maven commands used to install local jar files...


How to fix OutOfMemoryError issue in Maven| Perm Gen space |Java heap space

June 28, 2021 ·  3 min read

java.lang.OutOfMemoryError in maven Maven is an automation build project management tool. if the project has 10000 or more java files and you try to build the project using “maven clean install”, build failed with an error - java.lang.OutOfMemoryError. maven clean install will tries to clean/delete the project and compile the project, and test the project and build the application. OutOfMemoryError issues occur either in the compile phase of your project or test phase of your project while building your maven project...


Understand versions maven plugin basics with examples

June 15, 2021 ·  3 min read

versions-maven-plugin basics Versions Maven Plugin is a plugin in maven project used to update the versions of application/artifact of a project. Each artifact is a single module which has a dependency on other artifacts. Always Latest versions are stable with fixing bugs. This has advantages to check the latest versions of dependencies as well as parent dependencies. Keeping and managing this version is a tedious task for a developer. This plugin automates this managing version of dependencies in an application....


20+ Maven Interview Questions and answers. You must prepare for 2021

June 15, 2021 ·  5 min read

This tutorials covers an interview questions and answers for java developers. This also useful for experience persons as well as for Devops engineer. You can check my other posts on maven commands Contents What is Maven?. Why it is used for? How to know maven version using the command line What are different build phases/golas of an maven project? What are things we can do with maven ? How do you create a war file using maven?...


Best tutorial for Maven settings file | Sample settings.xml example

June 15, 2021 ·  4 min read

Maven is a build tool for java projects. Most of the developers have used maven over ant these days because of maven resolve their dependencies. Contents What is maven settings.xml file? user and global settings xml file Location what is a repository in Maven What is a mirror in settings.xml of maven? Settings.xml sample file How to find which settings.xml file is used? How to read maven settings file in java projects?...


How to add maven compiler plugin in java project

June 15, 2021 ·  4 min read

This post talks about adding maven compiler plugin dependency to projects with pom.xml, Maven is an open-source apache tool to automate the build process for Java-based projects. maven-compiler-plugin is a basic plugin that every developer uses to compile the source code of the maven project. By Default, this plugin is not configured.compile goal will be called as part of the maven lifecycle process without defining it in pom.xml. If you want to do some configurations....


How to create maven project with command line| Eclipse | Intelli

June 15, 2021 ·  5 min read

Maven is a build tool for the java projects. It speeds up the java development build process. maven is one of the Java tools for continuous build integration. Maven has predefined phases or goals. The goals are similar to ant targets. the developer will invoke goals to do their tasks. You can check my other posts on maven commands. First, Please make sure that you download maven from the Apache software and install it....


maven assembly plugin example with tutorial in maven

June 15, 2021 ·  3 min read

Maven is a project build management tool, it automates the build phase of any java projects.whenever the project is built, it creates single modules with the format of jar or war. so it builds zip your project including configuration files and other XML files into different customized output module types like zipping, jar, war, and other tar.gz formats. As you know maven-war-plugin generates only war files, but in the projects, you need to archive in different formats like zipped formats, in that case, we will use this plugin....


Top 20 Maven Commands list | Maven command cheatsheet

June 15, 2021 ·  6 min read

Maven is a build automation project management tool in java projects. Most of the people working on java related technologies know about the maven usage. I am listing down the list of Maven commands with examples reference which is very helpful for developer. This list are helpful for all the Java developers for their daily usage in projects. Please have a look of my previous article maven installation. Listing down all the maven command cheat sheet and examples....


Maven dependency example explained

May 30, 2021 ·  3 min read

Maven is an project build tool for java and android applications. One of the features of Maven over ant tool is dependencies management for software projects. When you are using maven in your project, you need to define the dependencies in pom.xml. Once the dependencies have been configured, they will be downloaded from repositories to your local machine. When installing with Maven, you must use the dependency plugin to configure the dependencies, which manipulates the artefacts....


Learn Maven tutorial

May 22, 2021 ·  1 min read

This is an index page for maven Tutorial. Maven is a project management tool to automates the build process for Java applications. Maven is based on project object model configuration which contains all the plugins configured in XML file - pom.xml. Following are the different posts about maven tool. Maven Installation and Setup Maven Dependency Example Generate Maven Project from Scratch Maven Commands Tutorials Maven Interview questions Maven Setting.xml issues Top 10 Maven Commands maven assembly plugin example maven clirr plugin example maven compiler plugin example ...


How to force update dependencies commandline eclipse Intelli

April 6, 2021 ·  2 min read

This post describes how to do the command line and Eclipse to force snapshot and release dependencies in a Maven project. During development, maven do installation by download all snapshot and release dependencies for the first time. Build fails with a reason of not downloading some of its dependencies. The reason might be not downloaded the dependencies completely because of network latency issues. Maven download the repositories from remote repositories like maven central or nexus....


How to install maven on Windows and Linux/Unix

April 5, 2021 ·  2 min read

Maven is a java-based project build tool that automates the build process. To installs Maven on any platform, you’ll need a Java development environment. Before installing maven, make sure you have the most recent JDK version installed. You can check my other posts on maven commands Install and setup maven on local windows Download maven software from apache site and extract the files, copy it local drive example D:\java\apache-maven-3.0.3. Before that, you need to set below environment variables on your local box...


Maven Clirr plugin example : maven3 plugins tutorials

April 4, 2021 ·  2 min read

This tutorials covers Clirr Maven Plugin, configure and generate report tutorial with examples. Maven Clirr plugin is used to give the report of your current project by comparing with another same old project. Basically, if we configured this plugin to your project, it checks your project jar with an older version jar that is configured in pom.xml to compare. This plugin is to compare the source code as well as jar comparisons for incompatible issues to find in the early stage of any module before releasing the module....


How to configure Character Encoding in Maven

March 25, 2021 ·  2 min read

Sometimes, java files compiling with maven or building war file get encoding error as described below. File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! maven character encoding source not working maven read the source code for building and installing artifacts, So It should define the character encoding to read and write files of different encoding types- ASCII, UTF-8 or UTF-16 maven uses default encoding of running platform, i....


Subscribe
You'll get a notification every time a post gets published here.