Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

1.

the ______ plugin:goal can be used to a build failure if uses old version of
maven or java.
a. Verifier:verify -> checks the existence of files/directories.
b. failsafe:verify -> verify the integration test with
surefile(testreports.xml).
c. enforcer:enforce -> Excutes rules to check constrainrs. X
c. help:evaluate -> Evaluates Maven expressions given by the user in an
interactive mode.

2. Maven includes transitive dependencies automatically for th eproject.


a. Ture. X
b. False.

3. The phase process-sources in Maven lifecycle copies and processes the resources
into the destination directory, ready for packaging phase.
Is this satement valid or invalid?
a. Valid. (Valid for process-resoources)
b. Invalid. X

4.Shade plugin's shade goal is bound by default to the ______ phase.


a. build
b. package X
c. install
d. compile

5. A profiles is invoked by passing the ______ command-line argument to Maven.


a. -p<profile_id>
b. -d<profile_id>
c. -D<profile_id>
d. -P<profile_id> X

6. ______ is false statement about project Aggregation in Maven.


a. By convention, the module name is expected to be identical to the folder
name. X
b. The modules are not aware of the aggregation.
c. The reactor determines the correct build oreder from the plugins.
d. A Maven command runs on the parent POM of the aggregate project and it will
also apply to all the modules that it contains.

7. Upon executing mvn resources:resources, what will be the contents of


targets/classes/hellow.txt?
Hello.txt -> Hello ${name}
a. Hello name.
b. Hello My resource Plugin Practice project. X (MAL)
c. Hello ${name}.
d. none of the options.

8. ______ Maven command generates a POM that contains all the configurations from
all sources, icluiding
settings.xml
a. mvn help:effective-pom. X
b. mvn resources:super-pom.
c. mvn help:super-pom.
d. mvn help:generate-pom.

9. Which dependency specifies that a dependent artifact only applies to a certain


build phase?
a. Dependency Management.
b. Dependency Scope. X

This study source was downloaded by 100000843637402 from CourseHero.com on 08-29-2022 02:46:13 GMT -05:00

https://www.coursehero.com/file/60448729/pregruntastxt/
c. Dependency Exclusion.
d. Dependency Mediation.

10. ______ is an environment variable that contains parametes used to start up the
JVM running Maven.
a. MAVEN_OPTS. X
b. MVN_OPTIONS.
c. MAVEN_ENV.
d. MAVEN_VARS.

11. Maven command mvn dependency:analyze analyzes the dependencies of the project
and determines ______
a. Unused and declared dependencies.
b. Used and declared dependencies.
c. Used and undeclared dependencies.
d. All the options. X

12. Maven assenbly plugin has a ______ built-in descriptor, which creates a Uber-
jar.
a. jar.
b. project.
c. bin.
d. jar-with-dependencies. X

13.______ distributable formats could not be created by the Maven Assemble plugin.
a. dir.
b. zip.
c. tar.
d. tar.gz.
e. None of the options. X
f. All of the options.

14.In Maven the project resource files are copied from src/main/resources to
target/classes.
a. True. X
b. False.

15. Which of the bellow options are true about Maven Plugin?
a. Multiple plugin goals can be bound to the same phase.
b. Maven allows to use third-party plugins.
c. Maven provides a mechanism for users to develop their own plugins if they
choose to do so.
d. None of the above.
e. All the options. X

16. Which elements are used to identify a dependent artifact in a pom.xml profile?
a. groupId, artifactId, configuration.
b. groupId, artifactd, Scope.
c. groupdId,artifactId.
d. groupdId,artifactId,version. X

17. Which of the below features is not a qualifier for a multi-module project in
Maven?
a. none of the options. X
b. All the options.
c. Specify the child projects a module in the parent pom.
d. Child projects POM must specify its minimum co-
ordinates:groupdId,artifactId,version
e. The child project need not be a subfolder of the parent project.

This study source was downloaded by 100000843637402 from CourseHero.com on 08-29-2022 02:46:13 GMT -05:00

https://www.coursehero.com/file/60448729/pregruntastxt/
f. specify the parent element in the child POM to indicate the parent.

18. Which is not true about Apache Maven and Apache Ant?
a. Ant does not hace lifecycle but Maven has.
b. Ant is a toolbox whereas MAven a framework.
c. Ant scripts are reusable but Maven plugins are not. X
d. Ant does not hace formal project directry structure but MAven has.

19. Which element cannot be modified in the settings.xml when using Maven Profile?
a. <properties>.
b. <plginRepositories>.
c. <repositories>.
d. <dependencies>. X

20. for the below dependency graph, choose the ______ resolution that will allows
App to exclude Util 1.0.
App -> EJB -> Util1.0
App -> Model -> Util2.0
a. EBJ marks until 1.0 as optional.
b. EBJ marks until 1.0 as excluded. X
c. App marks EBJ as excluded. X
d. App marks model as included.

21. MAven Exec plugin supports which of the below tasks?


1.Excute Javsa Programs in the same VM.
2.Execute programs in the same process.
3.Execute programs in a separate process
4.Execute Java programs in a separate process.
a. 1&3
b. 2,3&4
c. 1,2&3
d. 1,3&4 X

22. __________________________ element specifies how often Maven should check for a
newer snapshot
artifact in the remote repository.
q. <checksumInterval>.
b. <updatePolicy>. X
c. <checksumPolicy>.
d. <updateInterval>.

23. Maven Profiles are allowed to override which of the below default
configurations?
a. All the options. X
b. Final name of a project's artifact. X
c. Configuration of project distribution settings
d. configuration maven settings.

24. Which of the below Maven command line option is used to log errors or other
server problems?
a. -error.
b. -e. X (MAL)
c. -X.
d. -q.

25. If a Maven project depends on the _________ version of an artifact, Maven will
always fetch
the latest version of it from the repository.

This study source was downloaded by 100000843637402 from CourseHero.com on 08-29-2022 02:46:13 GMT -05:00

https://www.coursehero.com/file/60448729/pregruntastxt/
a. Beta.
b. Snapshot.
c. Release. X (MAL)
d. Final.

26. Which of the following is not a type of Maven Assembly plugin's built-in
descriptors?
a. build. X
b. bin.
c. src.
d. project.

27. What would the jar:jar goal do?


a. It is an invalid goal.
b. none of the options.
c. It always recompile resources and after that creates jar from
target/classes.
d. It does not recompile, just creates jar from files under target/classes. X

28. Which of the below file extensions are excluded for resource filtering by
default?
a. None of the options.
b. All of the options.
c. pdf.
d. txt.
e. jpg. X

29. ____________ artifacts are considered to be stable and can be used in


production applications.
a. Release. X
b. Snapshot.
c. Final.
d. Production.

This study source was downloaded by 100000843637402 from CourseHero.com on 08-29-2022 02:46:13 GMT -05:00

https://www.coursehero.com/file/60448729/pregruntastxt/
Powered by TCPDF (www.tcpdf.org)

You might also like