Open Liberty is also a Java Server runtime that helps us run Java web applications. Using the Liberty Maven plugin will help us quickly deploy the application to Open Liberty easily during development. In this tutorial, I will show you how to use this Liberty… Read More
Maven Archetype is a feature of Maven, you can understand it roughly, it allows us to quickly create a Maven project with a predefined structure. We just need to change values like Group Id, Artifact Id, and Version according to the value we want. I… Read More
Maven Shade Plugin is a Maven plugin that allows us to build uber-jars. In a nutshell, uber-jar are .jar files that, besides containing the source code of the application, also contain the dependencies that the application is using. From there, it helps us to build… Read More
When you develop an application with different Maven projects, we will often use a Maven parent project to manage these Maven projects. It will help us to centralize the version management of the dependencies used for the application, when we want to upgrade the version… Read More
Sometimes when working with Java applications, you will need to use Groovy code to solve your problems. In these cases, you’ll need to compile Groovy code so it can run with the application’s Java code. In this tutorial, I will show you how to install… Read More
Usually when you create any new Maven project, the src/main/java, src/test/java, src/main/resources, src/test/resources directories will be the default source and resources directory of the project. If you want to add a new source or resource directory from a directory in this project, for example, the… Read More
When working with Apache Maven in Eclipse, I am convinced that no one didn’t encountered an error as below when building the application:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project example: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_101\..\lib\tools.jar -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
What is the cause? This is because by default Apache Maven will use the Maven Compiler Plugin plugin to compile the… Read More
Code coverage is a measure of how many lines of our code are covered by the Unit Test. This is very helpful, so we can evaluate the quality of our code, how many of our code has been and have not been covered by the… Read More
In my previous tutorial, I talked about the Apache Maven’s Maven Surefire Plugin plugin to run Unit Test in Maven projects. I used JUnit 4 in the example of this tutorial. If I now upgrade my JUnit library from version 4 to version 5 in… Read More
The Maven Surefire Plugin is a core Apache Maven plugin that allows us to run the Maven project’s Unit Test. It can also generate reports to help you see how many test passes, how many test failures, and what the causes are for the Unit… Read More