Maven Build Lifecycle
Which Maven lifecycle phase is responsible for compiling the project's source code?
- compile
- test-compile
- verify
- initialize
- compilee
Running Unit Tests
What Maven command is used to run unit tests in a project?
- mvn test
- mvn unittest
- mvn verify-tests
- mvn tets
- mvn check
Skipping Tests
Which Maven command disables running tests during the build process?
- mvn install -DskipTests
- mvn install --notest
- mvn install -skipTests
- mvn install -DskippTests
- mvn install -DtestSkip
Testing Plugin
Which Maven plugin is primarily responsible for running tests written using JUnit?
- maven-surefire-plugin
- maven-junit-plugin
- maven-compiler-plugin
- maven-failsafe-plugin
- maven-surfier-plugin
Project Object Model
What is the default name of the file where Maven build configuration is stored?
- pom.xml
- build.gradle
- pomx.xml
- proj.xml
- poml.xml
Integration Tests
Which Maven command runs integration tests and verifies the outcome?
- mvn verify
- mvn integtest
- mvn integration
- mvn checkit
- mvn test-verify
Build Output
By default, in which directory does Maven place compiled Java .class files during the build?
- target/classes
- output/classes
- build/output
- target/classess
- bin/classes
Specifying a Test Class
Which CLI option lets you run a specific test class using Maven?
- -Dtest=ClassName
- --test ClassName
- -test ClassName
- -Dtests=ClassName
- -runtest ClassName
Adding a Plugin
Where in the pom.xml file should you declare build plugins?
- Within the u003Cbuildu003Eu003Cpluginsu003E section
- Inside u003CdependencyManagementu003E
- In the u003Cprofilesu003E tag
- Under u003Crepositoriesu003E
- In the u003Cpropertiesu003E block
Maven Clean Phase
What does the Maven clean phase do when you run 'mvn clean'?
- Deletes the target directory
- Removes unused dependencies
- Cleans all Java code of errors
- Clears your repository cache
- Resets the pom.xml file