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