Here we have compiled the most probable DevOps interview questions asked in the industry. You will learn about software version control, Git repository, reverting a commit in Git, Vagrant, continuous testing elements, and the importance of continuous integration, testing, and deployment. These questions are curated after discussing with many interviewers and DevOps Training experts.
By Using an Exclusion Element in pom.xml dependencies can be excluded. For example, you have to add this in your project's pom.xml file.
The surefire plugin is used to run the test classes in Maven & check and configure your settings in setting.xml and pom.xml for a property named 'test'. Here is an example of adding surefire plugin to Pom.xml.
And then you have to execute this command
$ mvn test //for single test
$ mvn -Dtest=UsersServiceImplTest test //for all tests.
Build directory is your "Target" directory, Source is your "src/main/java" and test is "src/main/test" directory all these will be under "src" directory.
Build tool does the following:
MOJO (Maven Plain Old Java Object) is the smallest executable unit that maven recognizes. MOJO has its own goal, a plugin has one or more goals to execute as it is a collection of one or more MOJOs. It is the smallest unit of maven plugin. Or the smallest plugin.
Decide Artifact type and its storage path in local/central/remote repositories. And decides Jar/War names Identify a particular version of JAR file to be downloaded during dependency resolution. And all this GAV parameters are used in POM.xml file.
There are various commands to produce debug messages, For instance, more popular is -x flag or --debug. There are various commands to produce error messages ,For instance ,more popular is -e flag or --error.
Default POM of Maven is the Parent POM or Super POM. All POMs are derived from super pom.
An Artifact is a file, usually it is a JAR/WAR file that gets deployed into a Maven Repository. A Maven build creates one or more artifacts. This file includes all the project.