Maven MCQ: Maven Multiple Choice Questions and Answers

Maven MCQ with answers and explanations for placement tests and job interviews. These solved Maven MCQs are useful for the campus placement for all freshers including Engineering Students, MCA students, Computer and IT Engineers, etc.

Our Maven MCQ (Maven multiple Choice Questions ) focuses on all areas of the Maven automation tool and its concept. We will regularly update the quiz and most interesting thing is that questions come in a random sequence. So every time you will feel new questions.

If you want to learn Maven in detail you can follow these courses created by industry experts, Trial of some courses is free.

Guideline of Maven MCQ:

This Maven MCQ is intended for checking your Maven knowledge. It takes 1 hour to pass the Maven MCQ. If you don’t finish the Maven MCQ within the mentioned time, all the unanswered questions will count as wrong. You can miss the questions by clicking the “Next” button and return to the previous questions by the “Previous” button. Every unanswered question will count as wrong. MCQ on Maven has features of randomization which feel you a new question set at every attempt.

In this Maven Quiz, we have also implemented a feature that not allowed the user to see the next question or finish the quiz without attempting the current Maven MCQ.

1 votes, 5 avg

You have 1 hours to take the MAVEN MCQs

Your time has been Over.


Maven MCQ

Maven MCQ

Maven MCQ: Maven Multiple Choice Questions and Answers

1 / 52

The goal that is executed to generate and deploy a documentation website is ___.

2 / 52

Which of the Build Profile is defined in Maven global settings xml file (%M2_HOME%/conf/settings.xml)?

3 / 52

Suppose you want to include a properties file in the JAR generated by your Maven build. What directory should you put it in?

4 / 52

If you want to utilitze a locally developed JAR file in another project and that JAR file has not been deployed to either the Maven central repository or your own locally sourced mirror repository, what Maven goal do you need to execute on the locally developed JAR project?

5 / 52

Which of the following phase in maven life cycle validates that the project is correct and all necessary information is available?

6 / 52

If you want to utilize a locally develop JAR file in another project and that JAR file has not been deployed to either the Maven central repository or your own locally sourced mirror repository, what Maven goal do you need to execute on the locally developed JAR project?

7 / 52

Which of the following refers to the final name of the file created when the built project is packaged?

8 / 52

What environment variable can you alter to increase the memory Maven uses?

9 / 52

If you wish to build and package your artifact using the Maven package goal but don't want to execute the unit tests, which environment variable and value would you use?

10 / 52

In multimodule projects, what do child POMs inherit from the parent POM?

11 / 52

Suppose you are using Maven in a corporate environment and, to save bandwidth, you want to prevent the need for large numbers of developers to download the same dependency from the internet. What do you do to limit this?

12 / 52

When defining a dependency that is included with the runtime container, what scope do you use in the pom.xml?

13 / 52

These are two general uses of plugins. The first is build and the second is _____

14 / 52

How do you run a single unit test in Maven?

15 / 52

Which of the following is true about Maven?

16 / 52

Many organizations set up local mirrors to the Maven central repository. In order to leverage your company's Maven repository as a proxy for the Maven central repository, which element should you put into the settings.xml file?

17 / 52

Suppose you are packaging a Mave project and see the following error "[WARNING] Using platform encoding (CP1252 actually) to copy filtered resources, i.e. build platform dependent!" What do you add to your POM file to set platform encoding to ensure your build is not platform dependet ?

18 / 52

When performing a build, which Maven plugin will allow you to set the specific version of the artifact to be built without manual modifying the pom.xml file?

19 / 52

If your machine is behind a proxy, where should you specify the proxy server settings in order for Maven to access remote resources?

20 / 52

In a multimodule project, if you have a plugin bound to a phase in the parent, it will be bound to the same phase in the module. What strategy could you employ to prevent the plugin from executing in the module?

21 / 52

How can Maven profiles be triggered?

22 / 52

When two dependencies of your Maven project introduce the same transitive dependency with different versions, which one(s) will be included in the dependency list for your project?

23 / 52

The settings.xml file that provides the user-specific settings for Maven is contained in which directory by default?

24 / 52

What is a valid packaging type for a Maven project?

25 / 52

What does the following command do?

> mvn archetype:generate \
-DgroupID=sample-maven-project \
-DartifactID=com.palmer.bethan.sample \
-Dversion=1.0.0 \
-DinteractiveMode=false

 

26 / 52

What is the default packaging type for a Maven project build artifact?

27 / 52

What does it mean if the scope of a dependency is the runtime?

28 / 52

Which structure in a settings.xml file allows for flexing properties based on some value for the runtime of Maven?

29 / 52

What does the mvn clean command do?

30 / 52

When building a web application with a WAR type project, which project directory should contain the style sheet, JavaScript, and other static files?

31 / 52

Why will an mvn install command not deploy any artifacts to a remote repository?

32 / 52

What will the mvn dependency:tree command do?

33 / 52

Which of the following scope indicates that dependency is available in classpath of project?

34 / 52

When building a Maven Archetype, what is the filepath and file of the archetype descriptor that specifies how to lay out the prototype files?

35 / 52

What does the mvn -version command do?

36 / 52

Which of the following command can tell the version of maven?

37 / 52

Which build plugin allows you to create a "fat" JAR file that contains all of the dependencies in the final JAR file?

38 / 52

Which of the following is correct about super POM?

39 / 52

Which goal would you use with the Dependency plugin to determine which included dependencies are not used, as well as those you are using that you have not defined?

40 / 52

How can you use Maven to run unit tests in parallel?

41 / 52

When building a Maven EAR project and specifying the configuration of which projects to include, what is the element in the plugin configuration that contains Enterprise Java Bean projects?

42 / 52

Why might you not want to include groupId and version elements in child POM files?

43 / 52

What element in the pom.xml file allows you to provide values that can be reused in other elements of the pom.xml?

44 / 52

What directory structure contains the source code of your artifact?

45 / 52

Which of the following phase in the maven life cycle generates any test source code to be included in the compilation phase?

46 / 52

Which of the following phase in maven life cycle processes and deploys the package if necessary into an environment where integration tests can be run?

47 / 52

What argument do you pass to Maven in order to update SNAPSHOT from the remote repository?

48 / 52

There are several properties available for use in a pom.xml file that refer to details of the project, such as groupId and version. What do all of these properties start with?

49 / 52

Which of the following is true about 'clean' Maven life cycle?

50 / 52

When performing a release using the Maven release plugin, which environment variable for batch mode is used to define the stamp placed in SCM to indicate the state of the artifact for the actual release?

51 / 52

Bellow is a definition of the Maven JAR Plugin, where the main class is set to com.palmer.bethan.App. What is the effect of this?

<configuration>
    <archive>
        <manifest>
            <addClasspath>true</addClasspath>
            <mainClass>com.palmer.bethan.App</mainClass>
        </manifest>
    </archive>
</configuration>

 

52 / 52

Which Maven plugin would you leverage to specify the version of the compiler to target as well as the source level of the language?

Your score is

The average score is 0%

0%

Recommended Articles for you:

Leave a Reply

Your email address will not be published. Required fields are marked *