I requested Maven training at work, and the bosses want to hire someone who knows Maven to come work with us as a consultant so that we'll learn Maven from a real-world perspective instead of a training perspective.
I've been tasked with coming up with questions of various difficulty to ask potential hires in order to ascertain their Maven ability. The problem is that I don't fully understand Maven yet (hence the training request).
What questions would you ask someone to determine their Maven ability, and what level of knowledge would someone have to have of Maven to answer them?
What is your knowledge on Maven?
Maven is a popular open-source build tool developed by the Apache Group to build, publish, and deploy several projects at once for better project management. The tool provides allows developers to build and document the lifecycle framework.
What are the issues you faced while working on Maven projects?
Check if the jar is corrupted. Check if the company repository is caching the internet repositories and didn't not issue a request to get the new libraries. Check if the dependency definition is being overridden by something. Use mvn help:effective-pom for the actual maven setting building the project.
In my opinion, a "Maven consultant" should:
- Have a good understanding of how Maven differs from other build tools like Ant (Maven provides a "lingua franca" for project management).
- Have a good understanding of Maven principles: Conventions over Configuration, the default layout, the naming conventions, the philosophy of the tool (one primary output per project).
- Have a good understanding of how Maven works: from where the conventions are coming from (the super POM), the lifecycles (main, clean, site), the phases, how plugins are bound to phases, the influence of packaging, etc
- Know what profiles are and how they can be used to deal with different environments, how to trigger them.
- Know how to use plugins, how to configure them, how to plug them in a maven build.
- Know how repositories work, the difference between local and remote repositories, what SNAPSHOT dependencies are.
- Know how dependencies are resolved, what transitive dependencies are, how to control them, what dependencies scope are, how to use
dependencyManagement
.
- Know how to implement code health checks, the essential plugins (Checkstyle, PMD and Findbugs plugins), how to implement various kind of tests (unit, integration, functional), how to measure coverage, when to fail the build, when to report.
- Know how to setup maven in a corporate environment (using a shared repository, setting up CI, a company POM).
- Know how to handle advanced packaging scenarii (with the assembly plugin)
- Know how to handle deployment, the various protocols, the deploy plugin, the release plugin, the SNAPSHOT resolution.
- Know how to setup a Maven build for a Java EE project, how to setup a multi-modules build, what modules are required, how to test in the development environment, how to handle the production environment.
Someone with these skills should put you on the right path (and has very likely a decent experience of Maven).