What are the differences between Gradle and Maven?

Gradle is nowadays getting more popular. Google uses it for Android development and release. Companies like LinkedIn also use Gradle.

What is the difference between Inheritance and Multi-module in Maven?

In Maven, we can create a parent project that will pass its values to its children projects. A multi-module project

Sometimes Maven compiles the test classes but doesn’t run them? What could be the reason for it?

In Maven, Surefire plugin is used for running the Tests. We can configure it to run certain test classes. Sometimes

How can we skip the running of tests in Maven?

We can use the parameter -Dmaven.test.skip=true or -DskipTests=true in the command line for skipping the tests. The parameter -Dmaven.test.skip=true skips

Can we create our own directory structure for a project in Maven?

Yes, Maven gives us the flexibility of creating our own directory structure. We just need to configure the elements like

How can we exclude a dependency in Maven?

To exclude a dependency we can add the tag under the section of the pom. E.g. <dependencies> <dependency> <groupId>test.ProjectX</groupId> <artifactId>ProjectX</artifactId>

How Maven searches for JAR corresponding to a dependency?

Maven first looks for a JAR related to a dependency in the local repository. If it finds it there then