Challenge - 5 Problems
Build Tools Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this Maven build command?
You run the following command in a Jenkins pipeline:
What will be the main effect of this command?
mvn clean install -DskipTests
What will be the main effect of this command?
Jenkins
mvn clean install -DskipTests
Attempts:
2 left
💡 Hint
The 'clean' phase removes previous build files, 'install' compiles and packages, and '-DskipTests' skips tests.
✗ Incorrect
The 'mvn clean install' command cleans old files, compiles, runs tests, and packages the project. Adding '-DskipTests' skips the test execution but still compiles and packages.
❓ Configuration
intermediate2:00remaining
Which Gradle build script snippet correctly applies the Java plugin and sets the Java version to 17?
Choose the correct Gradle build script snippet to apply the Java plugin and set the Java source and target compatibility to version 17.
Attempts:
2 left
💡 Hint
Use JavaVersion constants for version 17 and the plugins block for modern Gradle scripts.
✗ Incorrect
Option B uses the plugins block and sets source and target compatibility to JavaVersion.VERSION_17, which is correct for Java 17. Other options either use old syntax or wrong versions.
🔀 Workflow
advanced2:00remaining
In a Jenkins pipeline, which npm command sequence correctly installs dependencies and runs tests with coverage?
You want to install npm dependencies and then run tests with coverage reporting in a Jenkins pipeline. Which command sequence is correct?
Attempts:
2 left
💡 Hint
Dependencies must be installed before running tests.
✗ Incorrect
Option A installs dependencies first, then runs the test script with coverage. Option A runs tests before installing, which fails. Option A runs tests without coverage and installs after. Option A is invalid syntax.
❓ Troubleshoot
advanced2:00remaining
What error will this Maven command produce if the pom.xml file is missing?
You run this command in a Jenkins job:
But the pom.xml file is missing in the workspace. What error will Maven show?
mvn clean package
But the pom.xml file is missing in the workspace. What error will Maven show?
Jenkins
mvn clean package
Attempts:
2 left
💡 Hint
Maven requires a pom.xml file to run goals like clean or package.
✗ Incorrect
Without pom.xml, Maven cannot find project info and shows error about missing POM. Other errors relate to different issues.
✅ Best Practice
expert2:00remaining
Which npm script configuration in package.json ensures tests run only after dependencies are installed in Jenkins?
You want to configure your package.json scripts so that running
npm run ci-test in Jenkins installs dependencies and then runs tests. Which scripts section is correct?Jenkins
{
"scripts": {
"install": "npm install",
"test": "jest",
"ci-test": "???"
}
}Attempts:
2 left
💡 Hint
Tests should run after dependencies are installed; use && to chain commands.
✗ Incorrect
Option D runs 'npm install' first, then 'npm test'. Option D runs tests before install, which can fail. Option D uses semicolon which works but is less safe in cross-platform scripts. Option D skips install.