Skip to content

Maven Questions

illyfrancis edited this page Nov 15, 2013 · 21 revisions

Given that,

There are three lifecycle phases:

  • clean
  • default
  • site

And within each lifecylcle, there are multiple phases.

  • clean
    • pre-clean, clean, post-clean
  • default
    • validate, initialize, ... , compile, ... , test-compile, ... , test, ...
    • package ...
    • integration-test ...
    • verify
    • install
    • deploy

Questions

  1. when invoking a goal, can it be skipped? E.g. can test be called without it invoking compile?
  2. for multi module projects, how does it manage dependencies between modules? does it install sub modules first?
  3. how does maven manage SNAPSHOT etc versioning? what's the best practise?
  4. not clear on built-in lifecycle bindings, refer to this
  5. What is WAR overlays? When to use it?
  6. how to publish source
  7. where to generate javadoc and produce artifacts
  8. Where to define remote repository and best practise?
  9. how to structure jenkins with maven for pipeline views
  10. usage of mvn release plugin, haven't had much use before
  • see below
  1. can classifier in coordinates be used to produce two builds of the same? refer to book 'definitive guide to maven' chapter 9.5.1

Questions for multi module projects

  1. Should build happen on the root project only?
  2. what about install and deploy?
  • doesn't make sense to install EAR and also its JAR and WAR project?
  1. What about release process?
  2. how to manage application version number? is it different from <version>?
  3. how to keep the version number in sync when working in multi module projects?

Q's relating to CI

Given the lifecycle phases,

... -> compile -> test compile -> test -> package -> it -> verify -> install -> deploy
  • How should we define the jobs in jenkins? compile ... test?
  • Where should the static analysis jobs go? in between or a parallel jobs after compile?
  • how does the user's name map to actual email address? via ldap? (active dir?)

maven release plugin

version plugin (useful?)

Clone this wiki locally