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
Normally, when working with the Node.js project, we usually ignore the node_modules directory, which is used to store Node.js dependencies, when committed to source code management systems such as Git, SVN because it’s not necessary. You can use the “npm install” command to install dependencies… Read More
Imagine you are building an application with many different projects, for each project you need to declare to use some dependencies with the fixed versions. Some projects need to use the same dependencies and of course the same version. How do we feel when we… Read More
In the previous tutorial, I showed you some of the basic configurations in the Apache Maven settings.xml file with <localRepository />, <interactiveMode />, <offline />, <pluginGroups />, <proxies /> tags. In this tutorial, we will learn more about some of the more important parts of… Read More