5/12/17

Maven Questions & Answers

  1. What is Maven?
    1. software tool for project management
    2. build automation
    3. building and managing Java projects
    4. All of the above
    Ans: 1
  2. How to compile application sources using Maven?
    1. change to the directory where pom.xml is created by archetype:generate
    2. "execute the following command:mvn compile"
    3. Both 1 & 2
    4. None of the above
    Ans: 3
  3. What is an archetype?
    1. building and managing Java projects
    2. An archetype can be defined as an original pattern from which all other things of the same kind are made.
    3. Both 1 & 2
    4. None of the above
    Ans: 2
  4. What are the different dependency scopes have you used?
    1. compile
    2. provided
    3. test
    4. import
    5. All of the above
    Ans: 5
  5. How to prevent including JARs in WEB-INF/lib? I need a "compile only" scope!
    1. The scope should be used for this is:
    2. provided
    3. compile
    4. import
    5. test
    Ans: 1
  6. How to determine what version of a plugin being used?
    1. mvn=install help:describe
    2. mvn -Dplugin=help:describe
    3. Both 1 & 2
    4. mvn -Dplugin=install help:describe
    Ans: 4
  7. Is it possible to create my own directory structure?
    1. Yes
    2. No
    Ans: 1
  8. What is POM?
    1. Project Object Model
    2. xml file that contains information about project and configuration
    3. It contains default value for most projects.
    4. All of the above
    Ans: 4
  9. When you compile a Maven project, where do you find the class files?
    1. ${basedir}/target/classes
    2. ${basedir}/target
    3. $/target/classes
    4. None of the above
    Ans: 1
  10. What is the command to install JAR file in local repository?
    1. mvn jar
    2. mvn package
    3. mvn install
    4. None of the above
    Ans: 3

2 comments:

  1. Thanks for sharing Post

    ReplyDelete
  2. Really nice post. Thanks for sharing with us..

    ReplyDelete