Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to specify the Maven phase that compiles the source code.
Selenium Java
mvn [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'test' instead of 'compile' runs tests but does not compile code.
Using 'package' skips compilation if not done before.
✗ Incorrect
The compile phase compiles the source code of the project.
2fill in blank
mediumComplete the code to run the Maven phase that runs unit tests.
Selenium Java
mvn [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' runs more than just tests, including packaging and installing.
Using 'clean' deletes previous build files but does not run tests.
✗ Incorrect
The test phase runs the unit tests of the project.
3fill in blank
hardFix the error in the Maven command to clean the project before building.
Selenium Java
mvn [1] package Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' does not clean old files.
Using 'compile' only compiles but does not clean.
✗ Incorrect
The clean phase removes previous build files before packaging.
4fill in blank
hardFill both blanks to create a Maven command that cleans and installs the project.
Selenium Java
mvn [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the order causes errors or unexpected behavior.
Using 'test' instead of 'install' does not install the package.
✗ Incorrect
The command mvn clean install cleans old files and installs the built package to the local repository.
5fill in blank
hardFill all three blanks to create a Maven command that cleans, compiles, and tests the project.
Selenium Java
mvn [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Skipping 'clean' may cause stale files to affect the build.
Running 'test' before 'compile' causes errors.
✗ Incorrect
The command mvn clean compile test cleans old files, compiles the source code, and runs tests.