1.] The primary purpose of Apache Maven is to provide uniform, easy, and standardized ___ .
- project structure
- builds
- source code style
- versioning
2.] When building a web application with WAR type project, which project directory should contain the style sheet, JavaScript, and other static files?
- src/main/resources
- src/main/webapp
- src/main/web
- src/main/static
3.] When building a Maven EAR project and specifying the configuration of which project to include,what is the element in the plugin configuration that contains Enterprise Java Beans projects?
- modules/services
- modules/enterpriseModules
- modules/webModule
- modules/ejbModule
4.] Which plugin is used to copy, filter, include, and exclude non-Java files into your final project?
- Files
- Resources
- Copy
- Build
5.] Many organizations set up local mirrors to the Maven central repository. In order to leverage your company's Maven repository as a proxy for a Maven central repository, which element should you put into the setting.xml?
- LocalRepositories
- Mirrors
- Proxies
- Replacements
6.] What will the mvn dependency:tree command do?
- Verify the dependencies defined in the POM file.
- Print out a report of your project's dependencies in a tree format.
- Prune unused dependencies from your dependency tree.
- Download all the transitive dependencies.
7.] Which argument do you pass to Maven in order to update SNAPSHOTs from the remote repository?
- -X
- -s
- -U
- -J
8.] In order to leverage a single execution of an Apache Maven goal on a multimodule project, from which directory should you execute the goal?
- the directory with the parent POM
- the module directory
- the development directory
- the workspace directory
9.] How can Maven profiles be triggered?
- based on environment variables
- through Maven settings
- by explicitly calling the profiles using the -P flag
- all of these answers
10.] Suppose you want to include a properties file in the JAR generated by your Maven build. What directory should you put it?
- ${basedir}/src/main/properties
- ${basedir}/resources
- ${basedir}/src/main/java/resources
- ${basedir}/src/main/resources
11.] Why might you NOT want to include groupid and version elements in child POM files?
- The values in the parent POM will be overridden by what is define in child POM.
- Child POM files should include definitions of only dependencies and plugins.
- These elements are inherited from the parent POM file, and do not need to repeated.
- if you include these elements, an error will be thrown when you try to build the project.
12.] How can you use Maven to run unit tests in parallel?
- Move each test suits into a separate submodule.
- Specify the Maven Surefire Plugin and add a configuration that sets the parallel element to true.
- It is not possible to do this.
- Implement the JUnit dependency and add a configuration that sets the parallel element to true.
13.] Which Maven plugin would you leverage to specify the version of compiler to target as well as the source level of language?
- Target
- Compiler
- Surefire
- Versions
14.] How do you run a single unit test in Maven?
- Use a plugin that can specified the test you want to run.
- Maven runs only a single unit test by default.
- Use the -Dtest = flag and pass in the name of the test.
- It is not possible to do this.